Erl ( Returns The Line Number Where An Error Was Detected ) - Mitsubishi QD51 Programming Manual

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
ERL
Function
• Returns the line number where an error was detected.
ERL
Syntax
E=ERL
Examples
• The ERL function returns the line number where the error was detected when an error has
Description
occurred.
• The ERL function is used in the error processing routine so that the processing branches
depending on the line where the error occurred.
• If the instruction that caused the error was being executed in the direct mode, the ERL
function returns 65535.
• The ERL function has a limited purpose and it cannot be specified on the left side of the
equal sign in the LET instruction and some other places.
Program Example
10 ' Displays the line number where the error occurred
20 ON ERROR GOTO 100
50 ERROR 10
60 END
100 PRINT "ERROR LINE =";ERL
110 RESUME 60
RUN
ERROR LINE = 50
OK
11 - 63
ERror Line
• • • •
REMARK
See the ON ERROR GOTO and RESUME instructions, ERR function, and Chapter 9.
Stores the line number where the error was detected
to E.
:
' Branches to line 100 when an error occurs
:
' <-- Error occurs at this line
:
' Displays the line number where the error
occurred
MELSEC-Q
11 - 63

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents