Position Mode Control Example
Moog Animatics Class 5 SmartMotor™ DMX Guide, Rev. C
Page 34 of 46
'
Home Routine (home to hard stop)
AMPS
=512
'Reduce power.
VT
=vv*rr
'Set home velocity.
ADT
=aa
'Set home accel.
MV
'Set to velocity mode.
ZS
'Clear previous errors.
T
=tt*rr
'Preset torque values.
G
'Begin move toward hard stop.
WHILE
ABS
(
EA
)
<ee
LOOP
'Loop while position error is within limit.
MTB
'Mode Torque Break to stop.
MT
'Switch to Torque mode in case bounce off hard stop.
G
'Start motion.
WAIT
=50
'Wait 50 milliseconds.
O
=hh*rr
'Set origin to home offset.
AMPS
=1023
'Set power back to max.
MP PT
=0
G TWAIT
'Set motor to zero.
RETURN