Mitsubishi Electronics FX3G User Manual

Page of 964
599
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
24 Others – FNC181 to FNC189
24.5 FNC189 – HCMOV / High-Speed Counter Move
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
Program examples
1. Program example 1
In the program example below, the current value of the high-speed counter C235 is compared in each operation cycle,
and then the output Y000 is set to ON if the current value is "K500" or more (when the current value of C235 is not
cleared).
*1.
K0: The current value of the high-speed counter is not cleared when DHCMOV instruction is executed.
K1: The current value of the high-speed counter is cleared when DHCMOV instruction is executed.
2. Program example 2
In the program example shown below, the current value of C235 is transferred to D201 and D200, and the current
value of C235 is cleared when X001 turns from OFF to ON.
*2.
K0: The current value of the high-speed counter is not cleared when DHCMOV instruction is executed.
K1: The current value of the high-speed counter is cleared when DHCMOV instruction is executed.
M8000
D0
K0*
1
FNC189
DHCMOV
C235
Y000
K500
FNC238
DAND>=
D0
END
The current value of C235 is
transferred to D1 and D0.
(The current value of C235 is not
cleared.)
In the case of "(D1, D0)  
≥ K500",
Y000 is set to ON.
M8394
D200
K1
*2
FNC189
DHCMOV
C235
FNC 03
IRET
0
I101
FNC 04
EI
FNC 06
FEND
‚
When X001 turns from OFF to ON, the
interrupt program from I101 to IRET is
executed.
‚
The current value of C235 is
transferred to D201 and D200.
(The current value of C235 is cleared
to “0”.)