Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 211 of 909
Reset Error Flags
If action is taken based on some of the error flags, the flag will need to be reset in order to
look out for the next occurrence, or in some cases, depending on how the code is written,
prevent repeated action on the same occurrence.
Za Reset over current state occurred
Zh
Reset excessive temperature
Ze Reset excessive position error
Zl
Reset historical left limit occurred
Zr
Reset historical right limit occurred
Zls Reset historical left limit occurred
Zrs Reset historical right limit occurred
Zs Reset syntax error occurred
ZS Resets all above Z status flags, includes Bi(#) and Bj(#) statuses
NOTE: In cases where the motor has gone beyond the EL(error limit) but the
trajectory generator is still active with the previously calculated trajectory, the
ZScommand may not clear the Be bit. If you are unable to reset Be with the ZS
command, issue an OFF command before issuing the ZScommand, which clears
the current commanded trajectory and allows the reset to complete.
For more details, see Part 2: SmartMotor Command Reference on page 238.
System Status Examples
An example of where you could use a System status bit would be to replace the TWAIT
command. The TWAIT command pauses program execution until motion is complete, but
interrupt subroutines will still take place. To avoid a routine simply resting on the TWAIT
command, a routine can be written that does much more.
The following code example performs the same function as the TWAIT command:
WHILE Bt 'While trajectory
LOOP 'Loop back
As shown in the following example, the previous routine can be augmented with code that
takes specific action in the event of an index signal:
Part 1: Programming: Reset Error Flags