Chapter 6 Instruction Details
XBC E-Type Main Unit
6-126
Ver. 1
6.23.3 String Compare ($<, $<=, $<>, $=, $>, $>=)
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)
x
(compare
operators)
S1 O O O O O O O
-
O
-
-
O O O O O
2~5
-
-
-
S2 O O O O O O O
-
O
-
-
O O O O O
x
Operators
Name
Condition
Operation
result
Condition
Operation
result
$<
Less Than
S1 < S2
On
S1
≥
S2
Off
$<=
Less Than or Equal To
S1
≤
S2
On
S1 > S2
Off
$<>
Not Equal To
S1
≠
S2
On
S1 = S2
Off
$=
Equal To
S1 = S2
On
S1
≠
S2
Off
$>
Greater Than
S1 > S2
On
S1
≤
S2
Off
$>=
Greater Than or Equal To
S1
≥
S2
On
S1 < S2
Off
Operand
Description
Data Type
S1
First String Data or Data address to compare
REAL/LREAL
S2
Second String Data or Data address to compare
REAL/LREAL
*Note: Compare instruction must be used in Input (Contact) Position of ladder rung. This instruction uses 3
contact points.
1) LOAD
x
($<, $<=, $<>, $=, $>, $>=)
a) Ladder Structure: Compares S1 with S2. If
x
operation is true, coil CR1 will be On. Otherwise CR1 will be
Off.
=
S1
"ABCDE"
42H (B)
41H (A)
44H (D)
43H (C)
00H
45H (E)
b15
b8 b7
b0
S1+1
S1+2
S2
"ABCDE"
42H (B)
41H (A)
44H (D)
43H (C)
00H
45H (E)
b15
b8 b7
b0
S2+1
S2+2
b) Character code is compared with Hexadecimal number.
c) Example: When string D1000 < D2000 (i.e. D1000=’English’; D2000=’ABCDE’), string Compare Input
Signal is On and then ‘3456’ is saved in P1600.
2) AND
x
($<, $<=, $<>, $=, $>, $>=)
a) Ladder Structure: If the contact C1 is on AND the x comparison condidtion is true, then coil CR1 will be On.
Otherwise CR1 will be Off.
Input Positions
Output
Position
x
S1
S2
LOAD
x
Coil
CR1
x
S1
S2
AND
x
Contact
Coil
CR1
C1
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...