Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 308 of 909
The Bj(1) bit is reset by any of the following:
l
Power reset
l
Z command (total reset of software)
l
Z(1,7) command
l
ZS command
EXAMPLE: (simple homing)
MV 'Set buffered velocity mode
ADT=10 'Set buffered accel/decel
VT=-4000 'Set low buffered maximum velocity
i=0 'A flag to know if any index was found
ZS G 'Start slow motion profile
Aj(0) 'Clear and arm index capture
WHILE Bm==0 'Travel until negative limit reached
IF Bj(0)==1
PT=J(0) 'Save this target
Aj(0) 'Clear and arm index capture
i=1 'Set flag to indicate index was found
ENDIF
LOOP
X 'Decelerate to a stop
IF i==0
'Index not seen, must have started close to limit
VT=4000 'Set low buffered maximum velocity
Aj(0) 'Clear and arm index capture
ZS G
WHILE Bj(0)==0 'Travel positive until index reached
LOOP
PT=J(0) 'Go back to index
ENDIF
MP ZS G 'Start motion
TWAIT 'Wait till end of trajectory
O=0 'Set origin at index
Index used as High Speed Position Capture:
When enabled through EIRI, the Bj(0) flag is set to 1 when a falling edge is seen at I/O pin 6.
As a result, I/Opin 6 can be used to capture position for high-speed registration applications.
Part 2: Commands: Bj(enc)