# This sim config uses 'immediate' homing
# To demonstrate motor-offsets:
#   jog the extra joint(4) away from its turn-on position
#   then home-all

[EMC]
MACHINE = 1extrajoint
VERSION = 1.1

[APPLICATIONS]
APP = halshow --fformat %.6f extrajoints.halshow
APP = sim_pin --title "j4 extrajoint" \
      j4.limit3.min \
      j4.limit3.max \
      j4.limit3.maxv \
      j4.limit3.maxa \
      j4.limit3.in

[KINS]
JOINTS = 5
# NOTE: 4 kinematic joints + 1 extra (motmod) total=5
KINEMATICS = trivkins coordinates=XYYZ kinstype=both

[EMCMOT]
EMCMOT       = motmod num_extrajoints=1
SERVO_PERIOD = 1000000

[HAL]
HALFILE = 1extrajoint.hal
HALUI   = halui


[DISPLAY]
DISPLAY = axis
MAX_LINEAR_VELOCITY = 1
PROGRAM_PREFIX = .

[TASK]
TASK = milltask
CYCLE_TIME = 0.001

[RS274NGC]
PARAMETER_FILE = sim.var

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100

[TRAJ]
COORDINATES = XYYZ
LINEAR_UNITS = inch
ANGULAR_UNITS = degree

[JOINT_0]
TYPE = LINEAR
HOME_SEQUENCE     =   1
MAX_VELOCITY      =  10
MAX_ACCELERATION  = 100

[JOINT_1]
TYPE = LINEAR
HOME_SEQUENCE     =  -2
MAX_VELOCITY      =  10
MAX_ACCELERATION  = 100

[JOINT_2]
TYPE = LINEAR
HOME_SEQUENCE     =  -2
MAX_VELOCITY      =  10
MAX_ACCELERATION  = 100

[JOINT_3]
TYPE = LINEAR
HOME_SEQUENCE     =   3
MAX_VELOCITY      =  10
MAX_ACCELERATION  = 100

[JOINT_4]
# this 'extra' joint is managed by a
# limit3 component after homing
TYPE = LINEAR
HOME_SEQUENCE     =   0
MIN_LIMIT         = -10
MAX_LIMIT         =  10
MAX_VELOCITY      =   5
MAX_ACCELERATION  = 100
