[EMC]
VERSION = 1.1
MACHINE = manualtoolchange.ini
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0

[DISPLAY]
DISPLAY = axis
GLADEVCP= -c gladevcp -u python/gladevcp-handler.py manualtoolchange.glade
OPEN_FILE= ./nc_files/tcdemo.ngc
CYCLE_TIME = 0.100
HELP_FILE = doc/help.txt
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
MAX_SPINDLE_OVERRIDE = 1.0
PROGRAM_PREFIX = ../../nc_files/
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
#EDITOR = gedit
INCREMENTS = 1 mm, .01 in, .1mm, 1 mil, .1 mil, 1/8000 in

[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 = sim_mm.var
SUBROUTINE_PATH = nc_subroutines:../../nc_files/remap_lib/common_nc_subs
LOG_LEVEL = 9

# optional features - a bit mask to selectively turn on experimental/dubious features
# see
# RETAIN_G43           0x00000001
# OWORD_N_ARGS         0x00000002
# INI_VARS             0x00000004
# HAL_PIN_VARS         0x00000008
# NO_DOWNCASE_OWORD    0x00000010
# turn on all optional features

# turn on all optional features except RETAIN_G43
FEATURES= 30

ON_ABORT_COMMAND= O <on_abort> call

# ------ remapping toolchange - related codes ----------------------
#
# see python/remap.py for the prolog and epilog handlers
# see nc_files/remap-subroutines for the NGC procedures
#
# the prepare_min.ngc and change_min.ngc are templates - fill in as needed
REMAP= M6   modalgroup=6  prolog=change_prolog   ngc=manual_change  epilog=change_epilog


# accessible in interp as #<_[section]name>

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000

[TASK]
TASK = milltask
CYCLE_TIME = 0.001

[HAL]
HALUI = halui
HALFILE = LIB:basic_sim.tcl
POSTGUI_HALFILE= gladevcp.hal

[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 30.48
MAX_LINEAR_VELOCITY = 53.34
DEFAULT_LINEAR_ACCELERATION = 508
MAX_LINEAR_ACCELERATION = 508
POSITION_FILE = position_mm.txt
NO_FORCE_HOMING = 1

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[KINS]
KINEMATICS = trivkins
JOINTS = 3

[AXIS_X]
MIN_LIMIT = -254
MAX_LIMIT = 254
MAX_VELOCITY = 30.48
MAX_ACCELERATION = 508

[JOINT_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 30.48
MAX_ACCELERATION = 508
MIN_LIMIT = -254
MAX_LIMIT = 254
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 127
HOME_LATCH_VEL = 25.4
HOME_SEQUENCE = 1
HOME_IS_SHARED = 1

[AXIS_Y]
MIN_LIMIT = -254
MAX_LIMIT = 254
MAX_VELOCITY = 30.48
MAX_ACCELERATION = 508

[JOINT_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 30.48
MAX_ACCELERATION = 508
MIN_LIMIT = -254
MAX_LIMIT = 254
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 127
HOME_LATCH_VEL = 25.4
HOME_SEQUENCE = 1

[AXIS_Z]
MIN_LIMIT = -50.8
MAX_LIMIT = 101.6
MAX_VELOCITY = 30.48
MAX_ACCELERATION = 508

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 30.48
MAX_ACCELERATION = 508
MIN_LIMIT = -50.8
MAX_LIMIT = 101.6
HOME_OFFSET = 25.4
HOME_SEARCH_VEL = 127
HOME_LATCH_VEL = 25.4
HOME_SEQUENCE = 0
HOME_IS_SHARED = 1

[PYTHON]
# where to find Python code
# code specific for this configuration
PATH_PREPEND= ./python
# generic support code
PATH_APPEND= ../../nc_files/remap_lib/python-stdglue

# import the following Python module
TOPLEVEL= python/toplevel.py

# the higher the more verbose tracing of the Python plugin
LOG_LEVEL = 0

# Part program interpreter section --------------------------------------------
[TOOLSENSOR]
X = 10
Y = 10
Z = 10
# abort change if no toolsensor contact after this probe distance
MAXPROBE= -10
PROBEFEED= 50

# this is not named TOOL_CHANGE_POSITION  on purpose - canon uses it and will
# interfere
[CHANGE_POSITION]
X = 10
Y = 20
Z = 30

# motion.digital-in/out-NN pins
[PINS]
# motion.digital-out-00
CHANGE = 0
# motion.digital-out-01
PROBING = 1
# motion.digital-out-02
ENABLE = 2

# motion.digital-in-00
CHANGED = 0
# motion.digital-in-01
REFTOOL = 1

# motion.analog-out-00
TOOLNO = 0
# motion.analog-out-01
REFLEN = 1
# motion.analog-out-02
CURRLEN = 2

[DWELL]
# timeout the change after 2 minutes
ACK_SECS= 120
