Examples and tips
PROGRAMMING MANUAL
281
Revi
si
on 3.0
IF (AXISSTATUS AXIS(0) AND 4)<>0 THEN
alarm_status=4
ELSEIF (AXISSTATUS AXIS(1) AND 4)<>0 THEN
alarm_status=4
ELSEIF (AXISSTATUS AXIS(1) AND 4)<>0 THEN
alarm_status=4
ELSE
'Checking for Axis error
alarm_status=ERR1
ENDIF
ELSE
project_status=1
ENDIF
GOSUB stop_all
GOSUB reset_all
GOSUB start_application
RETURN
stop_all:
'STOP THE PROGRAMS
STOP "APPLICATION"
'STOP THE AXES
FOR i= 0 TO max_axis
BASE(i)
CANCEL(1) 'Cancel NTYPE
WA(1)
CANCEL(1) 'Cancel possible program buffer
CANCEL 'Cancel MTYPE
NEXT i
'Release Run command in the servos
WDOG=0
'Open the position loop
FOR i= 0 TO max_axis
BASE(i)
WAIT IDLE
SERVO=0
NEXT i
RETURN
I52E-EN-03.book Seite 281 Freitag, 29. Juni 2007 11:55 11