7 Applied Instructions
7.22 Data Comparison
686
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Function and operation explanation
These data comparison instructions are connected to bus lines.
The contents of the devices specified by are compared with the contents of the device specified by
in the binary format, and a contact becomes conductive (ON) or non-conductive (OFF) depending on the
comparison result.
Cautions
1) When handling 32-bit data in a structured program, a 16-bit device cannot be specified directly as in the
case of a simple project. Use a label to handle 32-bit data. A 32-bit counter can be specified directly as it
is a 32-bit long device. Use a global label to specify a device.
2) Negative values
When the most significant bit is "1" in the data stored in the device specified by or , it is
regarded as a negative value in comparison.
a) In the 16-bit operation: bit 15
b) In the 32-bit operation: bit 31
3) When using 32-bit counters (including 32-bit high speed counters)
Be sure to execute the 32-bit operation (such as LDD=, LDD> and LDD<) when comparing 32-bit
counters.
If a 32-bit counter is specified in the 16-bit operation (such as LD=, LD> and LD<), a program error or
operation error will occur.
4) Some restrictions to applicable devices
S1: Applicable only to the FX
3U, FX3UC and FX3G PLCs.
S2: Applicable only to the FX
3U and FX3UC PLCs.
16-bit instruction 32-bit instruction ON condition OFF condition
LD= LDD=
= ≠
LD> LDD>
> ≤
LD< LDD<
< ≥
LD<> LDD<>
≠ =
LD<= LDD<=
≤ >
LD>= LDD>=
≥ <