Mitsubishi MELSEC Q Series Programming Manual page 441

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

DSER
(1) Searches n points from the device designated by
units.) regarding 32-bit data of the device designated by
the number of matches with the keyword is stored at the device designated by
first matched device number (in the relative number from
designated by
Search data
5678901
S 1
+1.
S 1
Relative value
+(n-3),
S2
S2
+(n-1),
(2) No processing is conducted if n is 0 or a negative value.
(3) If no matches are found in the search, the devices designated at
If the data to be searched using the SER/DSER instruction is sorted in the
ascending order, searches can be accelerated by the use of the binary search
method, which is activated by turning SM702 *
results are not obtained if SM702 is turned ON when the data to be searched is
not sorted in the ascending order.
*1: SM702 is the special relay for setting the search method.
• SM702 OFF: Sequential search method (linear search method) (Comparison with the search data starts
from the beginning of the data to be searched.)
• SM702 ON: Binary search method (Obtains the center value of the sorted array and decides if the
obtained value is larger or smaller than the search value, then, chooses the area for search between the
larger and smaller value divisions. By repeating this process, the area for search is narrowed down.)
Search data
Data to be searched
500
Search range
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The location n-points from the device
• The device specified by
(For the Universal model QCPU, LCPU.)
.
D
Head number to be
searched
5678901
5678901
5678901
S2
+1,
S2
123456
S2
+3,
S2
+2
-1
S2
+5,
S2
5678901
+(n-4)
S2
0
+(n-2)
S2
5678901
Search order
Data to be searched
100
200
300
Compared with the
400
search data
500
Search range
600
700
exceeds the range of the corresponding device.
D
in 32-bit units (2
S2
+1 and
S1
) is stored at the device
S2
Match data
Search results
D
Search range
(2
n points)
D
+1
D
1
ON. However, correct searche
Data to be searched
100
200
300
400
500
Search range
Compared with the
600
search data
700
exceeds the designated device range.
S2
SER(P),DSER(P)
n points in 16-bit
as a keyword. Then,
S1
+1, and the
D
1
Position of match
2
Number of matches
and
+1 become "0".
D
100
200
300
400
500
Compared with the
search data
600
700
(Error code: 4101)
(Error code: 4101)
7-67
1
2
3
4
6
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents