7 APPLICATION INSTRUCTION
7.17 Data operation instruction
547
7
7.17 Data operation instruction
Searching 16-bit data
SERMM(P)
These instructions search for the same data, maximum value and minimum value in a data table.
■Descriptions, ranges, and data types
■Applicable devices
• These instructions search the same data as the 16-bit binary data of (s2) in (n) data starting from (s1), and store the search
result in (d) to (d)+4.
• When the same data exists, five devices starting from (d) store the number of same data, first position, last position,
maximum value position and minimum value position.
• When the same data does not exist, five devices starting from (d) store the number of same data, first position, last position,
maximum value position and minimum value position. In this case, however, 0 is stored in three devices starting from (d)
(which store the number of same data, first position and last position).
Ladder diagram Structured text
ENO:=SERMM(EN,s1,s2,n,d);
ENO:=SERMMP(EN,s1,s2,n,d);
Operand Description Range Data type Data type (label)
(s1) Head device number in which same data, maximum value and
minimum value are searched
16-bit signed binary ANY16
(s2) Data to be searched for or device number storing data 16-bit signed binary ANY16
(d) Head device number storing number of same data, maximum
value and minimum value detected by search
16-bit signed binary ANY16
(n) Number of data in which same data, maximum value and
minimum value are searched
1 to 65535 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 $
(s1)
(s2)
(d)
(n)