6. BASIC INSTRUCTIONS
6 − 6
MELSEC-A
6.1.2 32-bit data comparison
(D=, D<>, D>, D<=, D<,D>=)
Available Device
Bit device Word (16-bit) device Constant Pointer
Level
Carry
flag
Error
flag
X Y M L S B F T C D W R A0 A1 Z V K H P I N
Digit specification
Index
M9012 (M9010, M9011)
(S1) O O O O O O O O O O O O O O O O
(S2) O O O O O O O O O O O O O O O O
K1
to
K8
O O
Functions (1) Handled as a NO contact and used for the comparison of 32bits.
(2) The comparison operation result is as shown below:
Instruction
Symbol in
Condition
Comparison
Operation
Result
Instruction
Symbol in
Condition
Comparison
Operation
Result
D= (S1) = (S2) D= (S1) ≠ (S2)
D<> (S1) ≠ (S2) D<> (S1) = (S2)
D> (S1) > (S2) D> (S1) ≤ (S2)
D<= (S1) ≤ (S2) D<= (S1) > (S2)
D< (S1) < (S2) D< (S1) ≥ (S2)
D>= (S1) ≥ (S2)
Continuity
status
D>= (S1) < (S2)
Non-Continuity
status
Execution The execution conditions of LD , AND , and OR are as indicated below.
Conditions
Instruction Execution Condition
LD Executed per scan.
AND Executed only when the preceding contact instruction is on.
OR Executed per scan.
Applicable
CPU
All CPUs
(S1)
(S2)
Compared data or head
number of device which
stores compared data
Setting data
D=, D<>,D>
D<=, D<, D>=
Instruction symbol .
LD
AND
OR
(S1) (S2)
(S1) (S2)
(S1) (S2)