EasyManuals Logo

Omron NJ Series User Manual

Omron NJ Series
668 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #304 background imageLoading...
Page #304 background image
6-117
6 Programming
NJ-series CPU Unit Software User’s Manual (W501)
6-6 Instructions
6
6-6-3 Instruction Errors
Errors in Assignment Statements
When an error occurs in an assignment statement written in ST, that line is not executed.
This operation is the same as when the output ENO of a user-created function is FALSE.
Errors in IF Constructs
If a syntax error occurs in ST, perform error processing for the syntax error.
When the value of (c+d), below, is zero, the lines between the IF and END_IF are not executed.
Syntax Errors in ST
The following syntax errors can occur in ST.
Exceeding the number of elements in an array.
No parameter set for in-out variable.
STRING assignment: When the text string size (bytes) of the left side is less than the text string
length (bytes) of the right side
Division by zero (excluding floating-point number calculations)
* When the value of a floating-point number is nonnumeric, the result of the calculation will also be nonnumeric.
This is not considered an error.
Operation for Structure Errors
The P_PRGER Flag changes TRUE and the following occurs.
Operation When a Syntax Error Occurs in a POU Written in ST
Syntax Error location Operation
Assignment
statement
The line is not executed.
5 a = b / (c + d) + e f + ABS(g);
6
x := 1;
For example, if a division by zero error occurs
in (b/(c+d)) on line 5, execution of line 5 is
cancelled (the value of a is not changed) and
line 6 is executed.
5 a = User-created_function_block (b) + c;
6
x := 1;
When the ENO output from the user-created
function is FALSE, execution of line 5 is
cancelled (the value of a is not changed) and
line 6 is executed.
5 IF a = b / (c + d) THEN
6
x := 1;
7
ELSE
8
x := 2;
9
END_IF;
10
y := 10;
:
:
IF P_PRGER = TRUE THEN
x:= initial_value; (*Processing when an error occurs*)
y:= initial_value;
END_IF;
POU"AA"
The user must include a safety
processing for possible errors.

Table of Contents

Other manuals for Omron NJ Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ Series and is the answer not in the manual?

Omron NJ Series Specifications

General IconGeneral
Program CapacityUp to 128 MB
SD Card SlotYes
Power Supply Voltage24 VDC
Motion ControlYes
USB Ports1
Operating Temperature0°C to 55°C
Communication InterfacesEthernet/IP, EtherCAT, USB
Safety FunctionOptional
Storage Temperature-20°C to 75°C
Communication PortsUSB
DimensionsVaries by model
WeightVaries by model

Related product manuals