![background image](http://html1.mh-extra.com/html/omron/smartslice-grt1-ml2/smartslice-grt1-ml2_programming-manual_742305320.webp)
Examples and tips
PROGRAMMING MANUAL
314
R
e
vi
si
o
n
1
.0
'--------------------------------------------------------
start_app:
'Add all the application programs that should be started
'with the START signal
RUN "APPLICATION"
RETURN
'--------------------------------------------------------
reset_all:
'Uncorrect system setting
IF READ_BIT(15,diag01)=0 THEN GOSUB system_detection
'MECHATROLINK axes reset sequence
FOR i=0 TO max_axis
BASE(i)
IF ATYPE>=40 AND ATYPE<=42 THEN
'Reset sequence for MECHATROLINK communication error
IF (AXISSTATUS AND 4)<>0 THEN
PRINT "Resetting ML alarm"
GOSUB system_detection
ENDIF
'Reset sequence for DRIVE errors
IF (AXISSTATUS AND 8)<>0 THEN
IF VR(servi*2)=$81 OR
VR(servi*2)=$CC THEN
GOSUB absencoder
ELSE
'Pending to handle diferently those alarms that cannot
'be resetted with DRIVE_CLEAR
DRIVE_CLEAR
ENDIF