
Examples and tips
PROGRAMMING MANUAL
313
R
e
vi
si
o
n
1
.0
'if no alarm, notify RUN=$99 or BaseBlock=$BB
ELSEIF(DRIVE_STATUS AND 8) THEN
VR(servi*2)=$99
ELSE
VR(servi*2)=$bb
ENDIF
ENDIF
NEXT i
sys_error=SYSTEM_ERROR
RETURN
'--------------------------------------------------------
stop_all:
'In this example, if the application program is stopped
'suddenly all the movements are cancelled and all the axes
'are set to BaseBlock. Modify this section if you require
'a different STOP procedure
STOP "APPLICATION"
WDOG=0
FOR i= 0 TO max_axis
BASE(i)
IF MARK=0 THEN REGIST(-1)
AXIS_ENABLE=0
SERVO=0
CANCEL(1) 'Cancel NTYPE
WA(1)
CANCEL(1) 'Cancel possible program buffer
NEXT i
RAPIDSTOP 'Cancel MTYPE
RETURN