Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 915

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions search the same data as the 32-bit binary data of (s2)+1 and (s2) in (n) data starting from (s1)+1 and
(s1), and store the search result in [(d)+1, (d)] to [(d)+9, (d)+8].
• When the same data exists, five devices starting from (d)+1 and (d) store the number of the same data, first and last
positions of the same data, maximum value position, and minimum value position.
• When the same data does not exist, five devices starting from (d)+1 and (d) store the number of the same data, first and
last positions of the same data, maximum value position and minimum value position. In this case, however, 0s are stored
in three devices starting from (d)+1 and (d) (which store the number of the same data, first and last positions of the same
data).
• When there are two or more maximum or minimum values in the searched data, the last position of the maximum/minimum
values is stored.
• If the value specified in (n) is 0, no processing is performed.
• The following table shows example of configuration of search result table and data. (n=10)
Searched device
Searched data
(s1)
(s1) value
(example)
(s1)+1, (s1)
100000
(s1)+3, (s1)+2
110100
(s1)+5, (s1)+4
100000
(s1)+7, (s1)+6
98000
(s1)+9, (s1)+8
123000
(s1)+11, (s1)+10
66000
(s1)+13, (s1)+12
100000
(s1)+15, (s1)+14
95000
(s1)+17, (s1)+16
910000
(s1)+19, (s1)+18
910000
• The following table shows the search result table obtained by the above example.
Device number
(d)+1, (d)
(d)+3, (d)+2
(d)+5, (d)+4
(d)+7, (d)+6
(d)+9, (d)+8
Operation error
There is no operation error.
Comparison data
Data position
(s2) value
(example)
100000
0
1
2
3
4
5
6
7
8
9
Description
3
0
6
5
9
Search result
Maximum value
Match (d)
(d)+9, (d)+8
 (First position)
 (Last position)
Search result item
Number of the same data
Position of the same data (first position)
Position of the same data (last position)
Minimum value position (last position)
Maximum value position (last position)
7 APPLICATION INSTRUCTIONS
7.20 Data Processing Instructions
Minimum value
(d)+7, (d)+6
7
913

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents