EasyManuals Logo
Home>Omron>Controller>CJ - INSTRUCTIONS

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 #636 background imageLoading...
Page #636 background image
3. Instructions
598
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Flags
Function
MAXD(178) searches the range of memory from R1 to R1+(4W-1) for the maximum double-precision
floating-point value (64-bit according to IEEE 754) in the range and outputs that maximum value to D to
D+3.
When bit 14 of C+1 has been set to 1, MAXD(178) writes the PLC memory address of the lower word of
the words containing the maximum value to IR0. (If two or more double words within the range contain
the same maximum value, the address of lower word of the first double word containing the maximum
value is written to IR0.)
Hint
Refer to the description of MAXL(174) for information on saving and restoring values in Index Registers
and information on background processing.
Example Programming
When CIO 0.00 turns ON in the following example, a table of four double-precision floating-point values
starting at D0 is searched for the maximum value.
The maximum value is stored in W0 to W3.
Name Label Operation
Error Flag P_ER • ON if the length of the table specified in C (bits 00 to 15) is not between 0001 and FFFF hex.
• ON if the table data is nonnumeric.
• OFF in all other cases.
Equals Flag P_EQ • ON if the maximum value is 0.
• OFF in all other cases.
Negative Flag P_N • ON if the maximum value is negative.
• OFF in all other cases.
m
R1
R1+1
R1+2
R1+3
R1+ (4W−4)
R1+ (4W−3)
R1+ (4W−2)
R1+ (4W−1)
IR0 m
D
D+1
D+3
D+2
CW
Lowest 16 bits of A
Lower 16 bits of A
Upper 16 bits of A
Highest 16 bits of A
W × 4 words (W = bits 00 to 15 of C)
Lowest 16 bits of A
Lower 16 bits of A
Upper 16 bits of A
Highest 16 bits of A
PLC memory address
MAXD
#00000004
D0
W0
0.00
D3-D0
D7-D4
D11-D8
D15-D12
+9.18
-3000.0
+10000.0
-12.15
W3-W0 +10000.0
Table length: 4
PLC memory address not output to IR0
Maximum value

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