[EMC]
VERSION = 1.1
MACHINE = SCARA (genserkins,switchkins)
#+ Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0

[DISPLAY]

# sets qtdragon as screen. for debug output to terminal add -d or -v
# sets window title
# sets icon in task manager
DISPLAY = qtvcp qtaxis
TITLE = QtDragon Metric Scara robot

# qtdragon saves most preference to this file
PREFERENCE_FILE_PATH = WORKINGFOLDER/qtdragon_scara.pref

# min/max percentage overrides allowed in qtdragon 1 = 100%
MAX_FEED_OVERRIDE       = 1.2
MIN_SPINDLE_0_OVERRIDE    = 0.5
MAX_SPINDLE_0_OVERRIDE    = 1.2

# manual spindle speed will start at this RPM
DEFAULT_SPINDLE_0_SPEED   = 12000

# spindle up/down increment in RPM
SPINDLE_INCREMENT = 200

# min max apindle speed manually allowed 
MIN_SPINDLE_0_SPEED = 1000
MAX_SPINDLE_0_SPEED = 20000

# max spindle power in Watts
MAX_SPINDLE_POWER = 2000

# min/max/default jog velocities in qtdragon in units/sec
MIN_LINEAR_VELOCITY     = 0
MAX_LINEAR_VELOCITY     = 60.00
DEFAULT_LINEAR_VELOCITY = 50.0

# incremental jog step length options
INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch

CYCLE_TIME = 100
INTRO_GRAPHIC = silver_dragon.png
INTRO_TIME = 2

EMBED_TAB_NAME=Vismach demo
EMBED_TAB_COMMAND=qtvcp vismach_scara
EMBED_TAB_LOCATION=rightTab


# qtdragon saves MDI cxommands to this file
MDI_HISTORY_FILE = mdi_history.dat
# qtdragon saves rnning logs to this file
LOG_FILE = qtdragon_scara.log

[FILTER]
# Controls what programs are shown inqtdragon file manager
PROGRAM_EXTENSION = .ngc,.nc,.tap G-Code File (*.ngc,*.nc,*.tap)
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script

# specifies what special 'filter' programs runs based on program ending
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python3

[RS274NGC]
SUBROUTINE_PATH = ./remap_subs
   HAL_PIN_VARS = 1
   HAL_PIN_VARS = 1
          REMAP = M428  modalgroup=10  ngc=428remap
          REMAP = M429  modalgroup=10  ngc=429remap
          REMAP = M430  modalgroup=10  ngc=430remap
PARAMETER_FILE = scara.var
# startup mm and offsets for axis.ngc demo file:
RS274NGC_STARTUP_CODE = G21 G10L2P0 x432 y65 z416

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

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[TRAJ]
COORDINATES = XYZABC
LINEAR_UNITS = mm
DEFAULT_LINEAR_VELOCITY = 10.0
MAX_LINEAR_VELOCITY = 600.0
DEFAULT_LINEAR_ACCELERATION = 100.0
MAX_LINEAR_ACCELERATION = 200.0
ANGULAR_UNITS = degree
DEFAULT_ANGULAR_VELOCITY = 10.0
MAX_ANGULAR_VELOCITY = 600.0
DEFAULT_ANGULAR_ACCELERATION = 100.0
MAX_ANGULAR_ACCELERATION = 200.0

[KINS]
JOINTS = 6
# switchkins:
#   kinstype==0 (default scarakins)
#     j0,j1,j2,j3 -- implement scarakins for xyzc
#     j4 == world->a (scaragui j4 is table tilt (y))
#     j5 == world->b (scaragui j5 is table tilt (x))
#   kinstype==1 (identity, assign per coordinates=xyzcab)
#     letter x -- assigned to j0
#     letter y -- assigned to j1
#     letter z -- assigned to j2
#     letter c -- assigned to j3
#     letter a -- assigned to j4 (same as scarakins)
#     letter b -- assigned to j5 (same as scarakins)
#   kinstype==2 (userk, template is identity, user may specify)
#
# Note: coordinate= ordering for identity kins preserves ab relationships
KINEMATICS = scarakins coordinates=xyzcab

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

[HALUI]
# M428:scara kins    (kinstype==0 startupDEFAULT)
# M429:identity kins (kinstype==1)
# M430:userk kins    (kinstype==2)
MDI_COMMAND = M428
MDI_COMMAND = M429
MDI_COMMAND = M430

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

[AXIS_X]
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 200.0
[AXIS_Y]
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 200.0
[AXIS_Z]
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 200.0
[AXIS_C]
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 400.0

[JOINT_0]
NAME = shoulder
TYPE = ANGULAR
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -360.0
MAX_LIMIT = 360.0
HOME_OFFSET = 0.0
HOME = 0.000
HOME_SEQUENCE = 0

[JOINT_1]
NAME = elbow
TYPE = ANGULAR
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -360.0
MAX_LIMIT = 360.0
HOME_OFFSET = 0.0
HOME = 0.000
HOME_SEQUENCE = 0

[JOINT_2]
NAME = z-slide
TYPE = LINEAR
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = 25.0
MAX_LIMIT = 300.0
HOME_OFFSET = 25.0
HOME = 25.000
HOME_SEQUENCE = 0

[JOINT_3]
NAME = wrist
TYPE = ANGULAR
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 400.0
MIN_LIMIT = -180.0
MAX_LIMIT = 180.0
HOME_OFFSET = 0.0
HOME = 0.000
HOME_SEQUENCE = 0

[JOINT_4]
NAME = table_rotate
TYPE = ANGULAR
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 400.0
MIN_LIMIT = -180.0
MAX_LIMIT =  180.0
HOME_OFFSET = 0.0
HOME = 0.000
HOME_SEQUENCE = 0

[JOINT_5]
NAME = table_rotate
TYPE = ANGULAR
MAX_VELOCITY = 60.0
MAX_ACCELERATION = 400.0
MIN_LIMIT = -180.0
MAX_LIMIT =  180.0
HOME_OFFSET = 0.0
HOME = 0.000
HOME_SEQUENCE = 0
