Chapter 6 Instruction and Flag List
XBC E-Type Main Unit
6-210
Ver. 1
6.32.10 SCH, SCHP, DSCH, DSCHP
Instruction
Area Available
Step
Flag
P M K
F
L
T
C
S
Z D.x R.x
Con
st
U
N
D
R
Error
(F110)
Zero
(F111)
Carry
(F112)
SCH(P)
DSCH(P)
S1 O O O O O O O
-
O
-
-
O O O O O
4~7
O
O
-
S2 O O O
-
O O O
-
O
-
-
-
O O O O
D
O O O
-
O O O
-
O
-
-
-
O O O O
N
O O O
-
O O O
-
O
-
-
O O O O O
Operand
Description
Data Type
S1
Data or address to searches for
WORD/DWORD
S2
Start address of the area to searches for
WORD/DWORD
D
Address to save the position and number identical
WORD
N
Searching range of SCH operation
WORD
[Flag Setting]
Flag
Description
Device Number
Error
To be set if N exceeds applicable S1 device’s range
F110
Zero
To be set if no data is found identical.
F111
1) SCH (Word Search)
(1) Searches N word data in S2 for the value identical to word data S1 in regular order.
(2) Saves the first value’s address in D, the total of the value identical to S1 in D + 1.
(3) If there is no value found, Zero Flag will be set.
(4) If N=0, the instruction will not be executed.
(5) As its result, specified D, D+1 device will be “0” if no identical data is found.
(D)SCH
means (D)SCH
P S1
(D)SCHP
S1
D
N
S2
D
N
S2
123
Data to search
S2
S2+1
S2+2
S2+(N-2)
S2+(N-1)
Searching range(N)
Head No. of object to search
Identical data
123
10
500
123
20
-123
123
123
Searching progress
D
D+1
S1
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...