MotionBASIC
TM
Error Handler
Modifying Your Program
Figure 4, Application Specific Error Handling
’’
APPLICATION.BAS
’
Routine:
APPL.ERR.TRAP
’
’’
Abstract:
Checks for and handles software overtravel limit
’’
fault in MANUAL mode.
’’
’’
Notes:
manual mode must check DIO@(OTL.FLT) and handle
’’
resetting the fault.
’’
’
APPL.ERR.TRAP:
IF MANUAL.MODE=TRUE AND (ERR=1608 OR ERR=1609) THEN
DIO@(OTL.FLT)=ON
’turn on the overtravel fault light
RESUME.FLAG=TRUE
ENDIF
RETURN
Your application specific error trapping routine can handle as many different
errors as you want, however the following rules must be observed.
1.
The machine will not be shut down until the program RETURNs from
APPL.ERR.TRAP with RESUME.FLAG=FALSE. The program should
not dwell in the subroutine unless you have eliminated the possibility of
a fault for which the machine should be shut down.
2.
Always leave the subroutine with a RETURN statement.
5.5 Application Specific Shutdown Procedures
Your application may have to follow a specific sequence to safely execute an
emergency stop. To include such a sequence you must add a subroutine using
the label APPL.ESTOP. This subroutine should include whatever sequencing is
needed.
NOTE......
The APPL.ESTOP subroutine is always called if the error is not handled as a
non-critical error by your APPL.ERR.TRAP routine. If your application does not
require any special shutdown sequencing, you must include a dummy
APPL.ESTOP subroutine as shown below.
APPL.ESTOP: :RETURN
When the program RETURNs from your APPL.ESTOP subroutine, it will
execute a HALT on all axes, wait for 500 user time units and then disable all
the servos.
CAUTION......
If your APPL.ESTOP subroutine does not perform a complete shutdown of the
machine, the Error Handler module will not stop the motors and disable the
servos until AFTER the program RETURNs from APPL.ESTOP.
5.6 Restart After Fault Procedures
After the operator has cleared any faults, the Error Handler module will execute
a GOTO APPL.RESTART statement. You must write an APPL.RESTART
page 16
GN3-ERRb
Содержание MotionBASIC
Страница 3: ...ii...
Страница 5: ...MotionBASICTM Error Handler Table of Contents A3 Complete Program Listings 31 iv...
Страница 6: ...v...
Страница 8: ...vii...
Страница 10: ...MotionBASICTM Error Handler Welcome THIS PAGE INTENTIONALLY LEFT BLANK page 2 GN3 ERRb...
Страница 16: ...MotionBASICTM Error Handler Configuring The Module THIS PAGE INTENTIONALLY LEFT BLANK page 8 GN3 ERRb...
Страница 20: ...MotionBASICTM Error Handler Loading The Module THIS PAGE INTENTIONALLY LEFT BLANK page 12 GN3 ERRb...
Страница 26: ...MotionBASICTM Error Handler Modifying Your Program THIS PAGE INTENTIONALLY LEFT BLANK page 18 GN3 ERRb...
Страница 35: ...MotionBASICTM Error Handler Source Code Overview THIS PAGE INTENTIONALLY LEFT BLANK GN3 ERRb page 27...
Страница 37: ...MotionBASICTM Error Handler Appendix A1 GN3 ERRb page 29...
Страница 38: ...MotionBASICTM Error Handler Appendix A1 THIS PAGE INTENTIONALLY LEFT BLANK page 30 GN3 ERRb...
Страница 40: ...MotionBASICTM Error Handler Appendix A2 THIS PAGE INTENTIONALLY LEFT BLANK page 32 GN3 ERRb...