Mitsubishi Electronics FX3G User Manual

Page of 964
609
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
25 Block Data Operation – FNC190 to FNC199
25.3 FNC194~199 – BKCMP=, >, <, < >, <=, >= / Block Data Compare
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
2. 32-bit operation (DBKCMP=, >, <, <>, <=, >= / DBKCMP=P, >P, <P, <>P, <=P, and >=P)
1) "n" 32-bit binary data starting from [
+1, 
] are compared with "n" 32-bit binary data starting from
[
+1, 
], and the comparison result is stored in "n" points starting from [
+1, 
].
2) A constant can be directly specified in [
+1, 
].
3) The table below shows the comparison result for each instruction:
4) When the comparison result is ON (1) in all of "n" points starting from [
+1, 
], the M8090 (block
comparison signal) turns ON.
Related device
→ For the block comparison signal use method, refer to Subsection 6.5.2.
Instruction
Comparison result ON (1) condition
Comparison result OFF (0) condition
DBKCMP= (FNC194)
[
+1,
]
 = 
[
+1,
]
[
+1,
≠  [
+1,
]
DBKCMP> (FNC195)
[
+1,
]
 > 
[
+1,
]
[
+1,
]  <=  [
+1,
]
DBKCMP< (FNC196)
[
+1,
]
< [
+1,
]
[
+1,
]  >=  [
+1,
]
DBKCMP<> (FNC197)
[
+1,
]
 
≠ [
+1,
]
[
+1,
] = [
+1,
]
DBKCMP<= (FNC198)
[
+1,
]
 <= 
[
+1,
]
[
+1,
] > [
+1,
]
DBKCMP>= (FNC199)
[
+1,
]
 >= 
[
+1,
]
[
+1,
] < [
+1,
]
Device
Name
Description
M8090
Block comparison signal
Turns ON when all comparison results are "ON (1)" in a block data instruction.
DBKCMP= (FNC194), DBKCMP> (FNC195), DBKCMP< (FNC196), DBKCMP<> (FNC197),
DBKCMP<= (FNC198), and DBKCMP>= (FNC199)
  
S
1
  
S
1
  
S
2
  
S
2
   
D
   
D
Command
input
FNCOOO
*1
DBKCMP
*2
S
S
n
*1 The number out of 194 to 199 is put in "OOO".
*2 The symbol out of "=", ">", "<", "<>", "<=", or
">=" corresponding to the FNC No. is put in  .
[        +1,        ]
"n"
points
K1234
K5678
K40000
K5000
K4321
[        +3,        +2]
[        +5,        +4]
[        +2n-3,        +2n-4]
[        +2n-1,        +2n-2]
[        +1,        ]
"n"
points
K5321
K3399
K6543
K5678
K1200
[        +3,        +2]
[        +5,        +4]
[        +2n-3,        +2n-4]
[        +2n-1,        +2n-2]
S
2
        +0
Comparison result
"n"
points
OFF(0)
ON(1)
ON(1)
OFF(0)
ON(1)
+1
+2
+n-2
+n-1
D
>
*3
*3 An operation example of DBKCMP>
(FNC195) instruction is shown here.
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
1
S
2
S
2
S
2
S
2
S
2
S
2
S
2
S
2
S
2
  
S
1
  
S
1
[        +1,        ]
K32000
[        +1,        ]
"n"
points
K32000
K4321
K1234
K32000
K5678
[        +3,        +2]
[        +5,        +4]
[        +2n-3,        +2n-4]
[        +2n-1,        +2n-2]
S
2
+0
Comparison result
"n"
points
ON(1)
OFF(0)
OFF(0)
ON(1)
OFF(0)
+1
+2
+n-2
+n-1
D
=
*4
*4 An operation example of DBKCMP=
(FNC194) instruction is shown here.
S
1
S
2
S
2
S
2
S
2
S
2
S
2
S
2
S
2
S
2
S
1
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
  
S
1
  
S
1
  
S
2
  
S
2
   
D
   
D