M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.9 Data Processing Instructions
Operation errors
In the following cases, an arithmetic error occurs, the error flag (SM0) turns ON, and an error code is stored at SD0.
- When the area of n number of blocks from the device designated at "S2" does not exist. (Error code: 82)
Program example
The following program searches D100 to D105 for the contents of D0 when X20 is ON, and stores the search results at D10
and D11.
X20
0
7
Search data
D100
123
D0
D101
D102
D103
D104
D105
The following program searches D100 to D111 for the contents of D11 and D10 when X20 is ON, and stores the search
results at D0 and D1.
X20
0
7
Search data
D11,D10
56789051
D101,D100
D103,D102
D105,D104
D107,D106
D109,D108
D111,D110
[Ladder mode]
SERP D0 D100 D10 K6
END
Searched data
500
123
Search results
300
D10
123
D11
32000
122
[Ladder mode]
DSERP D10 D100 D0 K6
END
Searched data
200000
56789051
56789051
-30000
56789051
30000
Steps
0
1
7
2
Position of match
2
Number of matches
Steps
0
1
7
Search results
2
Position of match
D0
3
Number of matches
D1
297
[List mode]
Inst.
Device
LD
X20
SERP
D0
D100
D10
K6
END
[List mode]
Inst.
Device
LD
X20
DSERP
D10
D100
D0
K6
END
IB-1501667-B