
#
# First come "immediate" Motion commands sent from emctask_startup().
#

SET_NUM_JOINTS 3
SET_NUM_SPINDLES 1
SET_VEL vel=0, ini_maxvel=1.2
SET_VEL_LIMIT vel=4
SET_ACC acc=1e+99
SETUP_ARC_BLENDS
SET_MAX_FEED_OVERRIDE 1
SETUP_SET_PROBE_ERR_INHIBIT 0 0
SET_WORLD_HOME x=0, y=0, z=0, a=0, b=0, c=0, u=0, v=0, w=0
SET_JOINT_BACKLASH joint=0, backlash=0
SET_JOINT_POSITION_LIMITS joint=0, min=-40, max=0
SET_JOINT_POSITION_LIMITS joint=0, min=-40, max=40
SET_JOINT_MAX_FERROR joint=0, maxFerror=0.05
SET_JOINT_MIN_FERROR joint=0, minFerror=0.01
SET_JOINT_HOMING_PARAMS joint=0, offset=0 home=0, final_vel=-1, search_vel=0, latch_vel=0, flags=0x00000000, sequence=999, volatile=0
SET_JOINT_VEL_LIMIT joint=0, vel=4
SET_JOINT_ACC_LIMIT joint=0, acc=1000
JOINT_ACTIVATE joint=0
SET_JOINT_BACKLASH joint=1, backlash=0
SET_JOINT_POSITION_LIMITS joint=1, min=-40, max=0
SET_JOINT_POSITION_LIMITS joint=1, min=-40, max=40
SET_JOINT_MAX_FERROR joint=1, maxFerror=0.05
SET_JOINT_MIN_FERROR joint=1, minFerror=0.01
SET_JOINT_HOMING_PARAMS joint=1, offset=0 home=0, final_vel=-1, search_vel=0, latch_vel=0, flags=0x00000000, sequence=999, volatile=0
SET_JOINT_VEL_LIMIT joint=1, vel=4
SET_JOINT_ACC_LIMIT joint=1, acc=1000
JOINT_ACTIVATE joint=1
SET_JOINT_BACKLASH joint=2, backlash=0
SET_JOINT_POSITION_LIMITS joint=2, min=-4, max=0
SET_JOINT_POSITION_LIMITS joint=2, min=-4, max=4
SET_JOINT_MAX_FERROR joint=2, maxFerror=0.05
SET_JOINT_MIN_FERROR joint=2, minFerror=0.01
SET_JOINT_HOMING_PARAMS joint=2, offset=0 home=0, final_vel=-1, search_vel=0, latch_vel=0, flags=0x00000000, sequence=999, volatile=0
SET_JOINT_VEL_LIMIT joint=2, vel=4
SET_JOINT_ACC_LIMIT joint=2, acc=1000
JOINT_ACTIVATE joint=2
SET_AXIS_POSITION_LIMITS axis=0, min=-40, max=0

#
# Everything above this line was sent from emctask_startup().
# That function also enqueued some Canon commands on interp_list, that will
# generate Motion commands later.
#

#
# Next Task enters Estop, by calling emcTaskSetState(EMC_TASK_STATE_ESTOP).
# This does the following:
#     * Abort Motion, which aborts each Axis, then Aborts Motion
#     * Stop the spindle
#     * Send Estop to IO (which we don't detect in motion-logger)
#     * Disable all the amps
#     * Disable Motion
#     * Send Lube Off to IO (which we don't detect)
#     * Abort Motion again, which aborts each Axis, and Motion, again
#     * Abort IO, which we miss
#     * Unhome VOLATILE_HOME joints
#

SET_AXIS_POSITION_LIMITS axis=0, min=-40, max=40
SET_AXIS_VEL_LIMIT axis=0 vel=4
SET_AXIS_ACC_LIMIT axis=0, acc=1000
SET_AXIS_LOCKING_JOINT axis=0, locking_joint=-1
SET_AXIS_POSITION_LIMITS axis=1, min=-40, max=0
SET_AXIS_POSITION_LIMITS axis=1, min=-40, max=40
SET_AXIS_VEL_LIMIT axis=1 vel=4
SET_AXIS_ACC_LIMIT axis=1, acc=1000
SET_AXIS_LOCKING_JOINT axis=1, locking_joint=-1
SET_AXIS_POSITION_LIMITS axis=2, min=-4, max=0
SET_AXIS_POSITION_LIMITS axis=2, min=-4, max=4
SET_AXIS_VEL_LIMIT axis=2 vel=4
SET_AXIS_ACC_LIMIT axis=2, acc=1000
SET_AXIS_LOCKING_JOINT axis=2, locking_joint=-1

SET_SPINDLE_PARAMS, 1.00e+99, 0.00e+00, -1.00e+99, 0.00e+00
JOG_ABORT joint=0
JOG_ABORT joint=1
JOG_ABORT joint=2
JOG_ABORT joint=3
JOG_ABORT joint=4
JOG_ABORT joint=5
JOG_ABORT joint=6
JOG_ABORT joint=7
JOG_ABORT joint=8
JOG_ABORT joint=9
JOG_ABORT joint=10
JOG_ABORT joint=11
JOG_ABORT joint=12
JOG_ABORT joint=13
JOG_ABORT joint=14
JOG_ABORT joint=15
ABORT
SPINDLE_OFF
DISABLE_AMPLIFIER
DISABLE_AMPLIFIER
DISABLE_AMPLIFIER
DISABLE
JOINT_UNHOME joint=-2


#
# Here's emcTaskSetMode(EMC_TASK_MODE_MANUAL)
#

FREE

#
# Task is now got the 'motion.in-position' pin visible, and is
# accepting abort calls from the UI.
#

#
# The test UI immediately sent an Abort.
#

JOG_ABORT joint=0
JOG_ABORT joint=1
JOG_ABORT joint=2
JOG_ABORT joint=3
JOG_ABORT joint=4
JOG_ABORT joint=5
JOG_ABORT joint=6
JOG_ABORT joint=7
JOG_ABORT joint=8
JOG_ABORT joint=9
JOG_ABORT joint=10
JOG_ABORT joint=11
JOG_ABORT joint=12
JOG_ABORT joint=13
JOG_ABORT joint=14
JOG_ABORT joint=15
ABORT
JOG_ABORT joint=0
JOG_ABORT joint=1
JOG_ABORT joint=2
JOG_ABORT joint=3
JOG_ABORT joint=4
JOG_ABORT joint=5
JOG_ABORT joint=6
JOG_ABORT joint=7
JOG_ABORT joint=8
JOG_ABORT joint=9
JOG_ABORT joint=10
JOG_ABORT joint=11
JOG_ABORT joint=12
JOG_ABORT joint=13
JOG_ABORT joint=14
JOG_ABORT joint=15
ABORT
SPINDLE_OFF
