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
MAX
The MAX instruction finds the largest value of two to five data to process, In1 to InN.
MIN
The MIN instruction finds the smallest value of two to five data to process, In1 to InN.
The following example is for the MAX instruction when In1 is INT#10, In2 is INT#5, In3 is INT#23, In4 is
INT#14, and In5 is INT#−5.
LD
EN
INT#10
In1
INT#5
In2
In3
INT#23
INT#14
In4
INT# −5
In5
In1
INT#10
In2
INT#5
In3
INT#23
In4
INT#14
In5
INT#−5
Additional Information
To find the largest or smallest of six or more values, use the AryMax or AryMin instruction (page 2-312).
Precautions for Correct Use
• In1 to InN and Out may be different data types, but observe the following precaution.
• Set the valid range of Out to include the valid ranges of In1 to InN.
• Do not combine signed integers (SINT, INT, DINT, and LINT) together with unsigned integers
(USINT, UINT, UDINT, and ULINT) for In1 to InN.
• If In1 to InN are real numbers, the desired results may not be achieved due to error.

NJ-series Instructions Reference Manual (W502)

ST
abc:=MAX(INT#10, INT#5, INT#23, INT#14, INT#−5);
MAX
ENO
abc
Out=abc
INT#23
2 Instruction Descriptions
2
2-311

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents