Mitsubishi Electronics Mitsubishi Digital Electronics Video Gaming Accessories FX3G ユーザーズマニュアル

ページ / 936
657
FX
3G
/FX
3U
/FX
3UC
 Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
28 Data Comparison – FNC220 to FNC249
28.2 FNC232~238 – AND=, >, <, < >, <=, >= / Data Comparison
21
FN
C
160
-F
N
C
16
9
R
eal
 T
im
e C
lock
 
C
ont
ro
l
22
FN
C
170-
FN
C
179
E
xte
rnal D
evice
23
FN
C
180
A
lter
nate 
In
st
ru
ct
ions
24
FN
C
181-
FN
C
18
9
O
ther
s
25
FN
C
190-
FN
C
199
B
lock D
ata
 
O
per
ation
26
FN
C2
00
-F
NC
20
9
C
ha
racter
 S
tring 
Co
ntro
l
27
FN
C
210-
FN
C
21
9
Da
ta
 
O
per
ati
on 3
28
FN
C
220-
FN
C
249
Da
ta
 
C
om
par
ison
29
FN
C
25
0-F
N
C
269
D
ata T
abl
O
per
at
ion
30
FN
C
270-
FN
C
274
Ex-
D
ev
ice 
Inv
ert
er
 Com
m
s
Explanation of function and operation
FNC232 to FNC237 are data comparison instructions connected to other contacts in series.
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 "ANDD=", "ANDD>" and "ANDD<") when comparing 32-bit
counters (C200 to C255).
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. Programming of data comparison instructions
When programming in GX Developer, symbols "
≤" and "≥" cannot be input.
Separate "
≤" into "<" and "=", and separate "≥" into ">" and "=".
The input procedure is described below:
Operating procedure
a) Display the circuit program edit window, and put the cursor in a position where a data comparison instruction
is to be used.
b) Input "Instruction" 
→ "space" → "value or device" → "space" → "value or device".
For an input example, refer to "Instruction input window in GX Developer" shown below.
c) Click the [OK] button.
d) Input other contacts and coil drive units consecutively.
Instruction input window in GX Developer
Program example
FNC No.
16-bit instruction
32-bit instruction
ON condition
OFF condition
232
AND=
ANDD=
=
 
 
233
AND>
ANDD>
>
 
<=
 
234
AND<
ANDD<
<
 
>=
 
236
AND<>
ANDD<>
 
=
 
237
AND<=
ANDD<=
<=
 <
 
238
AND>=
ANDD>=
>=
 >
 
  
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
<Input example for 16-bit operation>
<Input example for 32-bit operation>
C10
FNC232
AND=
K200
Y10
D0
FNC236
AND<>
K-10
X000
SET
Y11
D10
FNC233
ANDD>
K678493
M50
M3
X001
X002
S
1 ‚
S
2 ‚
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, when the contents of the data registers
D11 and D10 are less than "K678,493", or when M3 turns
ON, M50 is driven.