11 - 163 11 - 163
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' This program displays "ERROR" if an error occurs
20 ON ERROR GOTO 50
:
' Defines the branch destination at error
generation
30 ERROR 10
:
' An error occurs
40 END
50 PRINT "ERROR"
60 RESUME 40
:
' Ends error processing
RUN
ERROR
OK
REMARK
See the ERROR and RESUME instructions, ERL and ERR functions, and Chapter
9.