EasyManuals Logo

Omron CJ - INSTRUCTIONS User Manual

Omron CJ - INSTRUCTIONS
1308 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 #627 background imageLoading...
Page #627 background image
589
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Table Data Processing Instructions
3
MAX/MIN
Flags
Related Auxiliary Area Words and Bits
Function
z MAX
MAX(182) searches the range of memory
from R1 to R1+(W-1) for the maximum value
in the range and outputs that maximum value
to D.
When bit 14 of C+1 has been set to 1,
MAX(182) writes the PLC memory address of
the word containing the maximum value to
IR0. (If two or more words within the range
contain the maximum value, the address of
the first word containing the maximum value
is written to IR0.)
When bit 15 of C+1 has been set to 1,
MAX(182) treats the data within the range as
signed binary data.
z MIN
MIN(183) searches the range of memory
from R1 to R1+(W-1) for the minimum value
in the range and outputs that minimum value
to D.
When bit 14 of C+1 has been set to 1,
MIN(183) writes the PLC memory address of
the word containing the minimum value to
IR0. (If two or more words within the range
contain the minimum value, the address of
the first word containing the minimum value is
written to IR0.)
When bit 15 of C+1 has been set to 1,
MIN(183) treats the data within the range as
signed binary data.
Name Label
Operation
MAX MIN
Error Flag ER • ON if the content of C is not within the specified range of 0001 through FFFF.
• ON if the Communications Port Enabled Flag for the communications port number specified as the
Com Port number for Background Execution is OFF when background processing is specified.
• OFF in all other cases.
Equals Flag = • ON if the maximum value is 0.
• OFF in all other cases.
• ON if the minimum value is 0.
• OFF in all other cases.
Negative Flag N • ON if bit 15 is ON in the word containing the
maximum value.
• OFF in all other cases.
• ON if bit 15 is ON in the word containing the
minimum value.
• OFF in all other cases.
Name Address Operation
IR0 Output for Background
Execution
A595 and A596 When an index register is specified as the output for an instruction processed in the background, A595
and A596 receive the output instead of IR0.
(A595 contains the rightmost digits, and A596 contains the leftmost digits.)
ER/AER Flag for Background
Execution
A395.10 This flag is turned ON if an error or illegal access occurs during background execution.
R1+(W–1)
C
W
Max.
W words
PC memory
address
value
R1+(W–1)
R1
C
W
W words
Min. value
PC memory
address

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals