9-16 Programming Examples
Example Programs
Trio Motion Technology
Example 7 - Handling Axis Errors
The Motion Coordinator controllers are designed to trap error conditions in
hardware, and if required to automatically open the drive enable relay
(watchdog) and to disable the output to the drives.
As this mechanism happens automatically, it may not be immediately
apparent that an error has occurred and therefore we need a mechanism
in the software to recognise it, and to set up the type of errors which will
cause the controller to disable the drive / output.
The relevant parameters are:
• AXISSTATUS
• ERRORMASK
• MOTION_ERROR
• ERROR_AXIS
start:
‘ Monitor constantly until axis error occurs
‘ Set ERRORMASK so that Following Errors and Fwd/Rev limit
‘ switches will automatically trip the watchdog relay
ERRORMASK = 256+16+32
REPEAT
IF MOTION_ERROR<>0 THEN
ax = ERROR_AXIS
BASE(ax)
PRINT #3,CURSOR(0);”Error on Axis “;ax[0]
IF (AXISSTATUS AND 256)>0 THEN PRINT #3,”Fol. Error”;
IF (AXISSTATUS AND (16+32))>0 THEN PRINT #3,”H/W Limit”;
IF (AXISSTATUS AND 512+1024)>0 THEN PRINT #3,”S/W Limit”;
ENDIF
WAIT UNTIL KEY#3
GET #3,k
GOTO start