Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 235

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

■Applicable devices
Operand
Bit
X, Y, M, L,
J\
SM, F, B, SB,
FX, FY
(s1)
(s2)
(d)
(n)
Processing details
• These instructions compare the (n) points of 32-bit binary data from the device specified by (s1) with the (n) points of 32-bit
binary data from the device specified by (s2), and stores the operation result in the device specified by (d) and later.
• If the comparison condition is satisfied, the relevant device specified by (d) turns on; otherwise, the device turns off.
∙∙∙
b31
(s1)+1,
(s1)
1090
(s1)+3,
(s1)+2
2080
(s1)+5,
(s1)+4
5060
(s1)+2(n)-1,
(s1)+2(n)-2
1106
• Comparison operation is performed in units of 32 bits.
• A constant can be specified for (s1).
b31
∙∙∙
b0
(s1)+1, (s1)
32800
(BIN)
• Specify (d) outside the device ranges for (n) points from the device specified by (s1) and those from the device specified by
(s2).
• The following table lists the comparison operation results of each instruction.
Instruction symbol (ladder, FBD/LD)
DBKCMP=(P)(_U), DBKCMP_EQ(P)(_U)
DBKCMP<>(P)(_U), DBKCMP_NE(P)(_U)
DBKCMP>(P)(_U), DBKCMP_GT(P)(_U)
DBKCMP<=(P)(_U), DBKCMP_LE(P)(_U)
DBKCMP<(P)(_U), DBKCMP_LT(P)(_U)
DBKCMP>=(P)(_U), DBKCMP_GE(P)(_U)
DBKCMP=(P)(_U), DBKCMP_EQ(P)(_U)
DBKCMP<>(P)(_U), DBKCMP_NE(P)(_U)
DBKCMP>(P)(_U), DBKCMP_GT(P)(_U)
DBKCMP<=(P)(_U), DBKCMP_LE(P)(_U)
DBKCMP<(P)(_U), DBKCMP_LT(P)(_U)
DBKCMP>=(P)(_U), DBKCMP_GE(P)(_U)
• When the comparison operation results stored in (n) points from the device specified by (d) are all on (1), SM704 turns on.
• If (n) is 0, no processing is performed.
Word
T, ST, C, D, W,
U\G, J\,
SD, SW, FD, R,
U3E\(H)G
ZR, RD
b0
(s2)+1,
(BIN)
(s2)+3,
(BIN)
(s2)+5,
(BIN)
(n)
=
(s2)+2(n)-1,
(BIN)
b31
(s2)+1,
(s2)
32700
(s2)+3,
(s2)+2
40000
(s2)+5,
(s2)+4
32800
>=
(s2)+2(n)-1,
(s2)+2(n)-2
2147400 (BIN)
Condition
(s1)=(s2)
(s1)(s2)
(s1)>(s2)
(s1)(s2)
(s1)<(s2)
(s1)(s2)
(s1)(s2)
(s1)=(s2)
(s1)(s2)
(s1)>(s2)
(s1)(s2)
(s1)<(s2)
Double word Indirect
Z
LT, LST,
LZ
LC
b31
∙∙∙
b0
(s2)
1000
(BIN)
(s2)+2
2000
(BIN)
(s2)+4
(n)
5060
(BIN)
(s2)+2(n)-2
1106
(BIN)
∙∙∙
b0
(BIN)
(d)
(BIN)
(d)+1
(BIN)
(n)
(d)+2
(d)+(n)-1
6.1 Comparison Operation Instructions
Constant
specification
K,
E
$
H
(0)
(d)
OFF
(0)
(d)+1
OFF
(d)+2
ON
(1)
(d)+(n)-1
ON
(1)
ON
(1)
(0)
OFF
(1)
(n)
ON
(0)
OFF
Result
On (1)
Off (0)
6 BASIC INSTRUCTIONS
Others
(n)
6
233

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents