Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 202 of 909
Mass Moment of Inertia mismatches and high acceleration/deceleration are the primary
reasons for getting faults on the peak overcurrent limit. However, this does not mean you will
get a continuous condition for: over current, following error or over temperature. Those are
typically in the RMS range of load and are caused by general overload conditions, excessive
friction or ambient temperature rise. For more details, see Moment of Inertia on page 874.
Proper load to motor sizing is crucial in preventing most of these fault conditions from
occurring. Please consult the Moog Animatics Product Catalog for more information. Also, see
Torque Curves on page 888.
Error Handling
The following are techniques and commands that can be used for error handling in your
SmartMotor program.
Example Fault-Handler Code
In many multiple-axis applications, if there is a fault in one axis, it is desirable to stop all
motion in the machine. An effective way to accomplish this is to place the following example
code into every motor.
When any axis experiences a drive-disable condition, interrupt routine C0 executes. The C0
routine immediately broadcasts a global Mode Torque Brake (MTB) to stop all axes. After that,
the motor calling for the shutdown places its address in the user-accessible mode bits of
Status Word 0. For additional details, see Status Word: 0Primary Fault/Status Indicator on
page 879.
EIGN(W,0,12) 'Another way to disable Travel Limits
ZS 'Clear faults
ITR(0,0,0,0,0) 'Set Int 0 for: stat word 0, bit 0,
'shift to 0, to call C0
EITR(0) 'Enable Interrupt 0
ITRE 'Global Interrupt Enable
PAUSE 'Pause to prevent "END" from disabling
'Interrupt, no change to stack
END
C0 'Fault handler
MTB:0 'Motor will turn off with Dynamic
'breaking, tell other motors to stop.
US(0):0 'Set User Status Bit 0 to 1 (Status
'Word 12 bit zero)
US(ADDR):0 'Set User Status Bit "address" to 1
'(Status Word 12 Bit "address")
RETURNI
After all motors are stopped, appropriate recovery actions can be taken.
Part 1: Programming: Error Handling