11 - 65 11 - 65
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
ERROR
Instruction
ERROR
• Generates the error of the specified error code.
ERROR <integer expression>
Syntax
integer expression
• • • •
Specify the error code of the error to be generated.
Examples
E=ERROR 2
• • • •
Generates a “Syntax error” whose error code is 2.
Description
• The ERROR instruction generates an error of the specified error code.
• If the value of <integer expression> is the value registered as an error code in BASIC (see
Appendix 4.4), the ERROR instruction generates an error of the corresponding error code.
• The BASIC causes an “Unprintable error” if an error number, whose error message is not
defined by the ERROR instruction, is specified.
• The ERROR instruction is used in order to check the operation when an error processing is
defined.
Program Example
REMARK
See the ON ERROR GOTO and ERR instructions, ERL function, and Chapter 9.