EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 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 #149 background imageLoading...
Page #149 background image
2-101
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Comparison Instructions
2
ZoneCmp
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.
• 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.
Function
Precautions for Correct Use
abc:=ZoneCmp(INT#10, INT#20, INT#30);
LD ST
abc
INT#10
INT#20
INT#30
ZoneCmp
EN
MN
In
MX

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals