Nj-Series Instructions Reference Manual (W502 - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

Function
The ZoneCmp instruction determines if comparison data In is between maximum value MX and mini-
mum value MN. If MX ≥ In ≥ MN, Out will be TRUE. Otherwise, Out will be FALSE.
The following example is for when MN is INT#10, In is INT#20 and MX is INT#30. The value of variable
abc will be TRUE.
LD
EN
INT#10
MN
INT#20
In
INT#30
MX
Precautions for Correct Use
• If the data types of In, MX, and MN are different, they will be expanded to a data type that includes
the ranges of all of the data types.
• If In, MX, and MN are real numbers, error may cause unexpected processing results. This can occur,
for example, when they contain non-terminating decimal numbers.
• Signed integers (SINT, INT, DINT, and LINT) cannot be compared to unsigned integers (USINT, UINT,
UDINT, and ULINT).
• Two values that are positive infinity or two values that are negative infinity are equivalent.
• If the value of In is nonnumeric data, the value of Out is FALSE.
• If this instruction is used in a ladder diagram, the value of Out changes to FALSE if an error occurs in
the previous instruction on the rung.
• An error occurs in the following cases. Out will be FALSE.
• The value of MN is greater than the value of MX.
• Either MX or MN contains nonnumeric data.

NJ-series Instructions Reference Manual (W502)

ST
abc
ZoneCmp
abc:=ZoneCmp(INT#10, INT#20, INT#30);
2 Instruction Descriptions
2
2-101

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents