Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 715 of 909
will cause a fault if motion is commanded beyond a limit that has been reached. For more
details, see Limits and Fault Handling on page 204.
EXAMPLE: (Shows use of SLD, SLE, SLM, SLN and SLP)
EIGN(W,0) 'Make all onboard I/O inputs
ZS 'Clear errors
SLD 'Disable software limits
O=0 'Zero the encoder position CTR(0)
SLM(1) 'SLM(1) will make a soft limit trigger the flag AND
'cause a fault
'SLM(0) will make a soft limit trigger the flag AND
'will NOT cause a fault
SLN=-8000 'Set the negative software limit to -8000 encoder counts
SLP=8000 'Set the positive software limit to 8000 encoder counts
SLE 'Enable software limits
MP 'Set the SmartMotor to position mode
ADT=100 'Set a value for accel/decel
VT=20000 'Set a value for velocity target
PT=7000 G TWAIT 'Move to absolute position 7000 (no fault)
PT=-7000 G TWAIT 'Move to absolute position -7000 (no fault)
PT=9000 G TWAIT 'Move to absolute position 9000
'The motor will fault at position 8000 and set
'the following bits
'Bo(Motor is off) in Status Word 0
'Brs(Historical positive S/W limit) in Status Word 1
WAIT=2000 'Wait two seconds
ZS 'Clear errors
PT=0 G TWAIT 'Move to absolute position 0 (no fault)
END
RELATED COMMANDS:
SLD Software Limits, Disable (see page 702)
SLE Software Limits, Enable (see page 704)
R
SLM(mode) Software Limit Mode (see page 710)
R
SLN=formula Software Limit, Negative (see page 712)
Part 2: Commands: SLP=formula