11 - 64 11 - 64
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
ERR
Function
ERRor code
• Returns the error code of the detected error.
Syntax
ERR
Examples
E=ERR
• • • •
Stores the code of the detected error in E.
Description
• The ERR function returns the code of the detected error when an error occurs.
• The ERR function is used in the error processing routine so that the processing branches
depending on the error content.
• The ERR 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.
• For the error codes, see Appendix 4.4.
Program Example
10 ' Displays the error code
20 ON ERROR GOTO 100
:
' Branches to line 100 when an error occurs
50 ERROR 10
:
' <-- An error of error code 10 occurs
60 END
100 PRINT "ERROR CODE =";ERR
:
' Displays the error code
110 RESUME 60
RUN
ERROR CODE = 10
OK
REMARK
See the ON ERROR GOTO and RESUME instruction, ERL function, and Chapter 9.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...