Chapter 6 Instruction and Flag List
XBC E-Type Main Unit
6-211
Ver. 1
2) DSCH (Double Word Search)
(1) Searches specified S2 device for N points (WORD 2N points) in 32-bit unit with specified S1+1,S1 device’s
32-bit data used as a key word.
(2) Saves the number identical to the key word in D+1, the position of the first identical data, in specified device
D.
(3) If N is 0, there will be no search and no change in result data.
(4) As its result, specified D, D+1 device will be “0” if no identical data is found.
3) Program Example
(1) Searches in number of D01300 word data in D01100 for the value identical to word data D01000 in regular
order.
(2) Saves the first value’s address in D, the total of the value identical to D01000, in D01201.
(3) When D01000=h1234, D01100=h1111, D01101=h2222, D01102=h1234, D01103=h1234, D01104=h3333,
If D01300=h0006, D01200=h0003 is for the position D01102 first united data. And D01201=h0002 is
saved for 2 united number.
SCHP D01000 D01100 D01200 D01300
P00000
5678901
Data to search
S2+1,S2
S2+3,S2+2
S2+5,S2+4
S2+(N-3),S2+(N-4)
S2+(N-1),S2+(N-2)
Searching range
(N
)
Head No. of object to search
Data identical
123
10
500
123
20
-123
123
123
Searching progress
D
D+1
S1+1,S
Position identical
Number identical
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...