EasyManua.ls Logo

LS Industrial Systems XBC-DR10E - Output Terminal Compare Instruction

LS Industrial Systems XBC-DR10E
542 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 Instruction Details
XBC E-Type Main Unit 6-117 Ve r. 1
6.22 Output Terminal Compare Instruction (Unsigned)
6.22.1 CMP, CMPP, DCMP, DCMPP
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)
CMP(P)
DCMP(P)
S1
O
O
O
O
O
O
O
-
O
O
O
O
O
O
O
O
2~4 - - -
S2
O
O
O
O
O
O
O
-
O
O
O
O
O
O
O
O
Operand
Description
Data Type
S1
Data or Data address to compare with S2
WORD/DWORD
S2 Data or Data address to compare with S1 WORD/DWORD
1) CMP (Compare)
(1) Compares S1 with S2 in size to set applicable flag of 6 special relays as its result.
(Unsigned Operation)
Flag
F120
F121
F122
F123
F124
F125
SET basis
<
=
>
S1> S2
0
0
0
1
1
1
S1< S2
1
1
0
0
0
1
S1= S2
0
1
1
0
1
0
CMP P0005 P0006
P00020
Compare to P0005 and P0006
S1
S2
1 0 1 1 0
1 1 0 0 1 1 0 1 0 1
1
1
0 1 1 0 1 1 0 0 1 1 0 1 0 1
1
Word
(2) If S1 and S2 is compared, operation result (S1=S2) is set to special flag.
(3) In the program, 6 special relays display the result of Compare Instruction previously used.
(4) 6 special relays can be used unlimitedly.
2) Program Example
(1) In case of P1000=100 and P1100=10, If Input signal P00000 is On, F123 is set because P1000 is bigger
than P1100 (P1000>P1100).
CMP, DCMP
P
S
1
S2
CMPP,
DCMPP
S
1
S2
means
CMP P 1000 P1100
P00000

Table of Contents

Related product manuals