Справочник Пользователя для Mitsubishi Electronics MELSEC -Q/L
418
7 APPLICATION INSTRUCTIONS
7.5 Data Processing Instructions
7.5 Data Processing Instructions
7.5
Data Processing Instructions
16-bit data search, 32-bit data search
SER(P), DSER(P)
Processing details
■SER
• Searches n points from the 16-bit data of the device designated by (S2), regarding 16-bit data of the device designated by
(S1) as a keyword. Then, the number of matches with the keyword is stored at the device designated by (D)+1, and the first
matched device number (in the relative number from (S2)) is stored at the device designated by (D).
matched device number (in the relative number from (S2)) is stored at the device designated by (D).
• No processing is conducted if n is 0 or a negative value.
• If no matches are found in the search, the devices designated at (D) and (D)+1 become "0".
• If no matches are found in the search, the devices designated at (D) and (D)+1 become "0".
(S1): Search data or head number of the devices where the search data is stored (BIN 16/32 bits)
(S2): Data to be searched or head number of the devices where the data to be searched is stored (BIN 16 bits)
(D): Head number of the devices where the search result will be stored (BIN 16 bits)
n:
(S2): Data to be searched or head number of the devices where the data to be searched is stored (BIN 16 bits)
(D): Head number of the devices where the search result will be stored (BIN 16 bits)
n:
Number of searches (BIN 16 bits)
Setting
data
data
Internal device
R, ZR
J\
U\G
Zn
Constant
K, H
K, H
Others
Bit
Word
Bit
Word
(S1)
(S2)
(D)
n
Basic
Process
High
performance
Redundant Universal
LCPU
Command
Command
n
n
SER, DSER
SERP, DSERP
D
S1
S2
D
S2
S1
P
3
2
Position of match
Number of matches
10
500
123
20
Search range
(n points)
Search results
123
123
123
Match data
Head number to be
searched
searched
123
Search data
D
S2
D
S1
S2
S2
S2
S2
Relative value
+1
+2
+(n-2)
+(n-1)
+1
-123