28 Applied Instructions (Data Comparison)
28.2 AND=, >, <, < >, <=, >= / Data Comparison
674
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Cautions
1) 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
2) When using 32-bit counters (including 32-bit high speed counters)
Be sure to execute the 32-bit operation (such as ANDD=, ANDD> and ANDD<) when comparing 32-bit
counters.
If a 32-bit counter is specified in the 16-bit operation (such as AND=, AND> and AND<), a program error
or operation error will occur.
3) Some restrictions to applicable devices
S1: The FX
3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S2: The FX
3U and FX3UC PLCs only are applicable.
4) The AND compare instruction is not available in ST.
Program examples
Y10
X000
Y11
M3
X001
X002
When X000 is ON and the current value of the counter C10 is
"200" Y010 is driven.
When X001 is OFF and the contents of the data register
D0 are not "-10", Y011 is set.
When X002 is ON, and the contents of the data registers D11 and
D10 are less than "K678,493", or when M3 turns ON, M50 is driven.
AND=
EN
s1
s2
ENO
AND<>
EN
s1
s2
ENO
ANDD>
EN
s1
s2
ENO
C10
K200
[Structured ladder/FBD]
K-10
D0
M40
M40
SET
EN
d
ENO
K678493
Y11
D10