Mitsubishi MELSEC-Q/L Programming Manual page 176

Table of Contents

Advertisement

D=, D<>, D>, D<=, D<, D>=
Function
(1) Treats BIN 32-bit data from device designated by
open contact, and performs comparison operation.
(2) The results of the comparison operations for the individual instructions are as follows:
Instruction
Condition
Symbol in
D=
D<>
S1
D>
D<=
S1
D<
D>=
S1
(3) When
and
are assigned by a hexadecimal constant and the numerical value (8 to F) whose most significant bit
S1
S2
(b31) is "1" is designated as a constant, the value is considered as a negative BIN value in comparison operation.
(4) Data used for comparison should be designated by a 32-bit instruction (DMOV instruction, etc.).
If designation is made with a 16-bit instruction (MOV instruction, etc.), comparisons of large and small values cannot be
performed correctly.
Operation Error
(1) There is no operation error in the D , D
Program Example
(1) The following program compares the data at X0 to X1F with the data at D3 and D4, and turns Y33 ON, if the data at X0
to X1F and the data at D3 and D4 match.
[Ladder Mode]
(2) The following program compares BIN value K38000 to the data at D3, and D4, and establishes continuity if the data in
D3 and D4 is something other than 38000.
[Ladder Mode]
(3) The following program compares BIN value K-80000 to the data at D3 and D4, and establishes continuity if the data in
D3 and D4 is less than -80000.
[Ladder Mode]
174
S1
Comparison
Operation Result
=
S2
S1
S2
>
S1
S2
Continuity
S2
<
S1
S2
S2
, D , D
[List Mode]
Step
[List Mode]
Step
[List Mode]
Step
and BIN 32-bit data from device designated by
Instruction
Condition
Symbol in
D=
S1
D<>
=
S2
D>
S1
D<=
>
S1
D<
S1
D>=
<
S1
, D , or D
instruction.
Instruction
Device
Instruction
Device
Instruction
Device
as an a normally-
S2
Comparison
Operation Result
S2
S1
S2
Non-continuity
S2
S2
S2

Advertisement

Table of Contents
loading

Table of Contents