548
7 APPLICATION INSTRUCTION
7.17 Data operation instruction
• The following table shows example of search result table configuration and data. (n=10)
• The following table shows example of search result table.
• 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.
Searched device
(s1)
Searched data
(s1) value (example)
Comparison data
(s2) value (example)
Data position Search result
Maximum
value (d)+4
Same (d) Minimum
value (d)+3
(s1) K100 K100 0  (First time)
(s1)+1 K111 1
(s1)+2 K100 2 
(s1)+3 K98 3
(s1)+4 K123 4
(s1)+5 K66 5 
(s1)+6 K100 6  (Last)
(s1)+7 K95 7
(s1)+8 K210 8 
(s1)+9 K88 9
Device number Description Search result item
(d) 3 Number of same data
(d)+1 0 Same data position (first position)
(d)+2 6 Same data position (last position)
(d)+3 5 Minimum value position (last position)
(d)+4 8 Maximum value position (last position)
Error code
(SD0/SD8067)
Description
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.