# Linuxcnc controller parameters for a simulated machine using QtDragon screen

# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.

[EMC]
VERSION = 1.1
MACHINE = woodpecker
DEBUG =              0x00002000
#DEBUG = 0x00000000

[DISPLAY]
DISPLAY = qtvcp -f woodpecker
TITLE = Woodpecker XYZ Auto Tool Probe
PREFERENCE_FILE_PATH = WORKINGFOLDER/woodpecker.pref
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE       = 1.2
MIN_SPINDLE_0_OVERRIDE    = 0.5
MAX_SPINDLE_0_OVERRIDE    = 1.2
DEFAULT_SPINDLE_0_SPEED   = 12000
SPINDLE_INCREMENT = 200
MIN_SPINDLE_0_SPEED = 1000
MAX_SPINDLE_0_SPEED = 20000
MIN_LINEAR_VELOCITY     = 0
MAX_LINEAR_VELOCITY     = 60.00
DEFAULT_LINEAR_VELOCITY = 50.0
DEFAULT_LINEAR_JOG_VEL  = 50.0
DEFAULT_ANGULAR_VELOCITY = 0
MIN_ANGULAR_VELOCITY = 0
MAX_ANGULAR_VELOCITY = 0
CYCLE_TIME = 100
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 2
PROGRAM_PREFIX = ~/linuxcnc/nc_files
INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch
MDI_HISTORY_FILE = mdi_history.dat
LOG_FILE = woodpecker.log

MACRO = auto_tool_zero auto_tool_zero
MACRO = go_to_zero go_to_zero
MACRO = go_to_home go_to_home
MACRO = go_to_g30 go_to_g30
MACRO = set_g30_position set_g30_position
MACRO = return  Xmm Ymm Srpm Psec Fmm/min Zmm
MACRO = go_to_position  xmm ymm zmm
MACRO = go_home go_home
MACRO = start_line  Srpm Psec Fmm/min Zmm

[MDI_COMMAND_LIST]
MDI_COMMAND = G0 Z0;X0 Y0
MDI_COMMAND = G53 G0 Z0;G53 G0 X0 Y0

[FILTER]
PROGRAM_EXTENSION = .ngc,.nc,.tap G-Code File (*.ngc,*.nc,*.tap)
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3

[KINS]
KINEMATICS = trivkins coordinates=XYZ
JOINTS = 3

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

[RS274NGC]
PARAMETER_FILE = woodpecker.var
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9
SUBROUTINE_PATH = /home/.../linuxcnc/nc_files/probe/basic_probe/macros:/home/.../linuxcnc/nc_files/examples/remap-subroutines:/home/.../linuxcnc/nc_files/remap_lib
# remap
ON_ABORT_COMMAND=O <on_abort> call
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=qt_auto_probe_tool epilog=change_epilog

[PYTHON]
# The path to start a search for user modules
PATH_PREPEND = python
# The start point for all.
TOPLEVEL = python/toplevel.py

[EMCMOT]
EMCMOT = motmod
SERVO_PERIOD = 1000000
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 100000

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[TRAJ]
COORDINATES = XYZ
LINEAR_UNITS = metric
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 60.00
DEFAULT_LINEAR_VELOCITY = 50.00
SPINDLES = 1

[HAL]
HALUI = halui
HALFILE = core_sim.hal
HALFILE = simulated_home.hal
POSTGUI_HALFILE = woodpecker_postgui.hal

[HALUI]
# no content

[PROBE]
USE_PROBE = versaprobe
#USE_PROBE = basicprobe

[CHANGE_POSITION]
# Abs (G53) coordinates remap tool change point
X = 10
Y = 10
Z = -2

[VERSA_TOOLSETTER]
X = 300
Y = 300
Z = -50
MAXPROBE =  -40

[TOOLSENSOR]
X = 5.00
Y = 71.50
TOUCH_HEIGHT = 29.3
SENSOR_HEIGHT = 59.8
MAXPROBE =  -40
SEARCH_VEL = 200
PROBE_VEL = 50

[LASER]
X = 106.9
Y = -16.85

[AXIS_X]
MIN_LIMIT = -0.001
MAX_LIMIT = 520.0
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 500.0

[AXIS_Y]
MIN_LIMIT = -0.001
MAX_LIMIT = 630.0
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 500.0

[AXIS_Z]
OFFSET_AV_RATIO  = 0.2
MIN_LIMIT = -115.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 500.0

[JOINT_0]
AXIS = X
MIN_LIMIT = -0.001
MAX_LIMIT = 520.0
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 500.0
TYPE = LINEAR
SCALE = 160.0
STEPGEN_MAX_VEL = 72.0
STEPGEN_MAX_ACC = 600.0
FERROR = 1.0
MIN_FERROR = 0.5
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 20.0
HOME_OFFSET = 0.00000
HOME_SEARCH_VEL = 20.000000
HOME_LATCH_VEL = 10.000
HOME_SEQUENCE = 1
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
HOME_IS_SHARED = 1

[JOINT_1]
AXIS = Y
MIN_LIMIT = -0.001
MAX_LIMIT = 630.0
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 500.0
TYPE = LINEAR
SCALE = 160.0
STEPGEN_MAX_VEL = 72.0
STEPGEN_MAX_ACC = 600.0
FERROR = 1.0
MIN_FERROR = 0.5
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 20.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 20.00
HOME_LATCH_VEL = 10.00
HOME_SEQUENCE = 2
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False

[JOINT_2]
AXIS = Z
MIN_LIMIT = -115.0
MAX_LIMIT = 10.0
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 500.0
TYPE = LINEAR
SCALE = 160.0
STEPGEN_MAX_VEL = 48.0
STEPGEN_MAX_ACC = 600.0
FERROR = 1.0
MIN_FERROR = 0.5
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = -10.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 20.000000
HOME_LATCH_VEL = 10.00
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
HOME_IS_SHARED = 1

