Instruction Errors - Omron NJ-series User Manual

Machine automation controller cpu unit software
Hide thumbs Also See for NJ-series:
Table of Contents

Advertisement

6-6-3

Instruction Errors

Instruction errors refer to the errors that occur when an instruction is executed. This section describes
when an instruction error occurs, which error is detected as an instruction error, and what operation fol-
low an instruction error, etc.
Timing When Instruction Errors Occur
The timing when instruction errors occur can be divided into the following three cases. Detectable
errors and operations following to the errors differ by the timing when instruction errors occur.
• When the values of input parameters or in-out parameters are checked before instruction execution.
• When internal processing is performed during instruction execution.
• When the values of output parameters are checked after instruction execution.
Errors Detected As Instruction Errors
The followings are the errors detected as instruction errors. Different errors are detected depending on
the timing when instruction errors occur.
 Errors detected before or after instruction execution
The followings are the errors detected before or after instruction execution.
• Reading or writing an array variable from or to an element beyond the array range.
• Assigning a string that is longer than the defined byte length to a STRING variable.
• Assigning a string that does not end with a NULL character to a STRING variable.
• Dividing an integer variable by 0.
 Errors detected during instruction execution
Errors detected during instruction execution differ by instruction. For details on errors detected in
each instruction, refer to the NJ-series Instructions Reference Manual (Cat. No. W502).
Operation for Instruction Errors
The operation for the following elements differ depending on whether an instruction error occurs or not:
output variable ENO, output variable Error, output variable ErrorID, system-defined variable P_PRGER,
and events. The details on the operations are described below.
 Output variable ENO, output variable Error, and output variable ErrorID
ENO (enable out), Error, and ErrorID (error code) are the output variables that indicate whether an
error exists or not. Each instruction has different output variables. The meaning of each variable and
its value on an instruction error are shown below. The values vary by the timing when an instruction
error occurs.
Output
Data
variable
type
ENO
BOOL
Error
BOOL
NJ-series CPU Unit Software User's Manual (W501)
Meaning
TRUE
: Normal end
FALSE : Error end, Execution in prog-
ress, or Not executed
TRUE
: Error End
FALSE : Normal end, Execution in
progress, or Not executed
6 Programming
Value when an instruction error occurs
Before
During
instruction
instruction
*1
execution
execution
FALSE
FALSE
FALSE
TRUE
6
After
instruction
*2
execution
TRUE
FALSE
6-115

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents