
7 APPLICATION INSTRUCTION
7.7 Real Number Instruction
461
7
Searching the maximum value of single-precision real number
EMAX(P)
These instructions search for the maximum value in the (n) point(s) of single-precision real number block data in the device
starting from the one specified by (s), and store the maximum value in the device areas specified by (d) and (d)+1.
These instructions also store the location of the first maximum value from (s) in the device specified by (d)+2 and the number
of maximum values in the device specified by (d)+3.
*1
The EMAX instruction is not supported by the ST language. Use MAX of the standard function.
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
Processing details
• These instructions search for the maximum value in the (n) point(s) of single-precision real number block data in the device
starting from the one specified by (s), and store the maximum value in the device areas specified by (d). These instructions
also store the location of the first maximum value from (s) in the device specified by (d)+2 and the number of maximum
values in the device specified by (d)+3.
• The start of the block data in the device specified by (s) is counted as 1st point when the location is counted.
• The following values are stored in (d).
• When (n) is 0, the processing is not performed.
Ladder diagram
Structured text
ENO:=EMAXP(EN,s,n,d);
Operand
Description
Range
Data type
Data type (label)
(s)
Search target data
Single-precision real number
Single-precision real number
(d)
Search result
Single-precision real number
Single-precision real number
(n)
Number of search target data points
16-bit unsigned binary
ANY16
Operand
Bit
Word
Double word
Indirect
specification
Constant
Others
X, Y, M, L,
SM, F, B, SB
U
\G
T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s)
(d)
(n)
Data type
Description
(d)
Single-precision real number
Maximum value
(d)+1
(d)+2
16-bit data
Maximum value position
(d)+3
16-bit data
Number of maximum values
(s)
(d)
(n)
1.2345
123.45
-1.2345
-12.345
-123.45
(s)+1, (s)
(s)+3, (s)+2
(s)+5, (s)+4
(d)+1, (d)
(d)+2
(d)+3
(s)+7, (s)+6
(s)+9, (s)+8
(n)
123.45
2
1
Maximum value
Position
Number of data
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......