6.1.2 32-Bit Bin Data Comparison - Mitsubishi MELSEC-Q Series Programming Manual

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

Advertisement

D=,
D<>,
D<=,
D<,
(2) The results of the comparison operations for each instruction are as follows.
Instruction
symbol in
D=
D<>
D<=
D<
D>=
D>
(3) When assigning hexadecimal constants to
most significant bit (b31) is 1 is specified as a constant, the value is considered as a
negative BIN value in comparison operation.
(4) Data used for comparison should be specified by a 32-bit instruction (such as DMOV
instruction).
If specification is made with a 16-bit instruction (such as MOV instruction), comparisons of
large and small values cannot be performed correctly.
Operation Error
No operation error occurs in the execution of the D=, D<>, D<=, D<, D>=, and D> instructions.
Program Example
(1) In the following program, the value in Var_D0 is compared with the value in Var_D3, and Y33
turns ON, when the value in Var_D0 and the value in Var_D3 are matched.
[Structured ladder]
(2) In the following program, the BIN value of 38000 is compared with the value in Var_D3 when
M3 is ON, and Y33 turns ON when the value in Var_D3 is other than 38000.
[Structured ladder]
6.1 Comparison Operation Instructions
6-6

6.1.2 32-bit BIN data comparison

D>=,
D>
Condition
Comparison result
=
s2
s1
s1
s2
s2
s1
Conduction state
<
s2
s1
s1
s2
>
s2
s1
Instruction
Condition
symbol in
D=
s2
s1
D<>
=
s1
s2
D<=
>
s2
s1
D<
s2
s1
D>=
<
s1
s2
D>
s2
s1
and
, and the numeric value (8 to F) whose
s1
s2
Comparison result
Non-conduction
state

Advertisement

Table of Contents
loading

This manual is also suitable for:

Qcpu

Table of Contents