Chapter 6 Instruction Details
XBC E-Type Main Unit
6-132
Ver. 1
6.23.6 Byte/Nibble Compare
(Byte: 8<, 8<=, 8<>, 8=, 8>, 8>=) (Nibble: 4<, 4<=, 4<>, 4=, 4>, 4>=)
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
x
(compare
operators)
S1 O O O - O -
-
-
- O O O O -
-
-
3~4
-
-
-
S2 O O O - O -
-
-
- O O O O -
-
-
Byte
x
Operators
Nibble
x
Operators
Name
Condition
Operation
result
Condition
Operation
result
8<
4<
Less Than
S1 < S2
On
S1
≥
S2
Off
8<=
4<=
Less Than or Equal To
S1
≤
S2
On
S1 > S2
Off
8<>
4<>
Not Equal To
S1
≠
S2
On
S1 = S2
Off
8=
4=
Equal To
S1 = S2
On
S1
≠
S2
Off
8>
4>
Greater Than
S1 > S2
On
S1
≤
S2
Off
8>=
4>=
Greater Than or Equal To
S1
≥
S2
On
S1 < S2
Off
Operand
Description
Data Type
S1
Data or data address to compare with S2
NIBBLE/BYTE
S2
Data or data address to compare with S1
NIBBLE/BYTE
*Note: Compare instruction must be used in Input (Contact) Position of ladder rung. This instruction uses 3
contact points.
1) LOAD
x
(Byte: 8=, 8>, 8<, 8>=, 8<=, 8<>) (Nibble: 4=, 4>, 4<, 4>=, 4<=, 4<>)
a) Ladder Structure: Compares S1 and S2. If
x
operation is true, coil CR1 will be On. Otherwise CR1 will be
Off.
b) Example: If D01000.0=10 and D02000.0=10, nibble compare input signal is turned On and ‘h1500’ is saved
in P0160 area.
MOV h1500 P0160
4= D01000.0 D02000.0
c) Example: If D01000.0=100 and D02000.0=255, byte compare input signal is turned On and ‘h0015’ is
saved in P0160 area.
Input Positions
Output
Position
x
S1
S2
LOAD
x
Coil
CR1
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...