• The following table shows example of search result table configuration and data. (n=10)
Searched device
Searched data
(s1)
(s1) value (example)
(s1)
K100
(s1)+1
K111
(s1)+2
K100
(s1)+3
K98
(s1)+4
K123
(s1)+5
K66
(s1)+6
K100
(s1)+7
K95
(s1)+8
K210
(s1)+9
K88
• The following table shows example of search result table.
Device number
(d)
(d)+1
(d)+2
(d)+3
(d)+4
Precautions
• Comparison is executed algebraically. (-10<2)
• When there are two or more maximum or minimum values in the searched data, the last position of the max/min is stored
respectively.
• When these instructions are driven, five devices ((d), (d)+1, (d)+2, (d)+3, and (d)+4) are occupied for storing the search
result (d). Make sure that these devices are not used in other controls for the machine.
Operation error
Error code
Description
(SD0/SD8067)
2820
The device range specified by (s1) or (d) exceeds the corresponding device range.
3405
The value stored in a device specified by (n) is 0.
7 APPLICATION INSTRUCTION
548
7.17 Data operation instruction
Comparison data
Data position
(s2) value (example)
K100
0
1
2
3
4
5
6
7
8
9
Description
3
0
6
5
8
Search result
Maximum
Same (d)
value (d)+4
(First time)
(Last)
Search result item
Number of same data
Same data position (first position)
Same data position (last position)
Minimum value position (last position)
Maximum value position (last position)
Minimum
value (d)+3