# EMC controller parameters for Mesa 5i20 controlled Smithy 924 Lathe

[EMC]
MACHINE = Smithy 924 Lathe
VERSION = 1.1
DEBUG = 0x00000000
#DEBUG = 0x7FFFFFFF

[DISPLAY]
DISPLAY = axis
#DISPLAY = tklinuxcnc
#HELP_FILE = /usr/share/doc/linuxcnc/tklinuxcnc.txt
LATHE = 1
TKPKG             = Ngcgui    1.0
NGCGUI_FONT       = Helvetica -12 normal
NGCGUI_PREAMBLE   = lathe_std.ngc
NGCGUI_POSTAMBLE  = bye.ngc
NGCGUI_SUBFILE    = backlash.ngc
NGCGUI_SUBFILE    = id.ngc
NGCGUI_SUBFILE    = od.ngc
NGCGUI_SUBFILE    = taper-od.ngc
NGCGUI_SUBFILE    = ""
#NGCGUI_SUBFILE   = "" use when imageframe is specified if 
#                      opening other files is required 
#                      images will be put in a toplevel window 
NGCGUI_OPTIONS    =
#NGCGUI_OPTIONS   = opt1 opt2 ...
# opt items:
#   nonew      -- disallow making a new tab page
#   noremove   -- disallow removing any tab page
#   noauto     -- no autosend (makeFile, then manually send)
#   noiframe   -- no internal image, image on separate toplevel
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.5
MIN_SPINDLE_OVERRIDE = 0.2
MAX_SPINDLE_OVERRIDE = 1.5
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
PROGRAM_PREFIX = ../../nc_files/
#EDITOR = gedit
TOOL_EDITOR = tooledit
DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 3.75
DEFAULT_ANGULAR_VELOCITY = 12.0
MAX_ANGULAR_VELOCITY = 60.0

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[RS274NGC]
PARAMETER_FILE = emc.var
SUBROUTINE_PATH   = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/lathe:../../nc_files/ngcgui_lib/utilitysubs
USER_M_PATH       = ../../nc_files/ngcgui_lib/mfiles

[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
BASE_PERIOD = 1000000
SERVO_PERIOD = 1000000
TRAJ_PERIOD = 1000000

[TASK]
TASK = milltask
CYCLE_TIME = 0.001

[HAL]
HALUI = halui
HALFILE = 924.hal
#HALFILE = naiky.hal

[HALUI]
#No Content

[TRAJ]
COORDINATES = X Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 3.93
MAX_LINEAR_ACCELERATION = 20.0
DEFAULT_LINEAR_VELOCITY = 0.2

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = lathe.tbl
#TOOL_CHANGE_POSITION = 0 0 2
#TOOL_CHANGE_WITH_SPINDLE_ON = 1
#TOOL_CHANGE_QUILL_UP = 1
#TOOL_CHANGE_AT_G30 = 1

[KINS]
KINEMATICS =  trivkins
JOINTS = 3

[AXIS_X]
MIN_LIMIT = -3.6
MAX_LIMIT = 0.2
MAX_VELOCITY = 1.875
MAX_ACCELERATION = 20.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.875
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 2:1
# Steps/Rev = 200 * 40uSteps = 8000
# Vel at 200k Steps/S = 118"/min
SCALE = -101600
OUTPUT_SCALE = 1.000
MIN_LIMIT = -3.6
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0

[AXIS_Z]
MIN_LIMIT = -16.2
MAX_LIMIT = 0.2
MAX_VELOCITY = 3.75
MAX_ACCELERATION = 20.0

[JOINT_2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 3.75
MAX_ACCELERATION = 20.0
STEPGEN_MAXVEL = 0.0
STEPGEN_MAXACCEL = 0.0
BACKLASH = 0.0000
# Leadscrew Pitch = 4mm
# Drive Ratio = 1:1
# Steps/Rev = 200 * 40uSteps = 8000
# Vel at 200k Steps/S = 236"/min
SCALE = -50800
OUTPUT_SCALE = 1.000
MIN_LIMIT = -16.2
MAX_LIMIT = 0.2
FERROR = 0.25
MIN_FERROR = 0.1
HOME_OFFSET = 0.25
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.05
HOME_FINAL_VEL = 0.5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
