Mitsubishi Electronics FX3G User Manual

Page of 964
655
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
28 Data Comparison – FNC220 to FNC249
28.1 FNC224~230 – LD =, >, <, <>, <=, >= / Data Comparison
21
FNC160
-F
NC1
69
R
eal
 T
ime C
lock
 
C
ontrol
22
FNC17
0-F
NC
179
E
xternal D
evice
23
FNC
180
Alternate 
Instructions
24
FN
C181-
FNC18
9
O
thers
25
FNC190
-F
NC1
99
Bl
oc
k D
ata
 
Op
er
ation
26
FNC20
0-F
NC209
C
har
ac
te
r S
trin
Con
tro
l
27
FNC2
10-
FNC21
9
Dat
Operati
on 3
28
FNC220
-F
NC2
49
Da
ta 
C
omp
ari
son
29
FNC25
0-F
N
C
269
D
ata T
abl
Operation
30
FNC2
70-
FNC276
Ex
-Dev
ice
Explanation of function and operation
FNC224 to FNC230 are data comparison instructions connected to bus lines.
The contents of 
 are compared with the contents of 
 in binary format, and a contact becomes conductive
(ON) or non-conductive (OFF) depending on the comparison result.
Cautions
1. Negative value
When the most significant bit is "1" in the data stored in 
 or 
, it is regarded as a negative value in
comparison.
• In the 16-bit operation: bit 15
• In the 32-bit operation: bit 31
2. When using 32-bit counters (including 32-bit high-speed counters) 
Make sure to execute the 32-bit operation (such as "LDD=", "LDD>" and "LDD<") when comparing 32-bit counters
(C200 to C255).
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.
3. Programming of data comparison instructions
When programming in GX Works2 and GX Developer, symbols "
≤" and "≥" cannot be input.
Separate "
≤" into "<" and "=", and separate "≥" into ">" and "=".
<Input example for 16-bit operation>
<Input example for 32-bit operation>
Program example
FNC No.
16-bit instruction
32-bit instruction
ON condition
OFF condition
224
LD=
LDD=
=
 
 
225
LD>
LDD>
>
 <=
 
226
LD<
LDD<
<
 >=
 
228
LD<>
LDD<>
 
=
 
229
LD<=
LDD<=
<=
 >
 
230
LD>=
LDD>=
>=
 <
 
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
  
S
1
  
S
2
C10
FNC224
LD=
K200
S
S
Y10
K-30
FNC225
LD>
D200
X001
SET
Y11
C200
FNC225
LDD>
K678493
M50
M3
When the current value of the counter C10 is "200", Y010
is driven.
When the contents of D200 are "-29" or higher and X001 is
ON, Y011 is set.
When the contents of the counter C200 are less than
"K678,493" or when M3 turns ON, M50 is driven.