Mitsubishi Electronics FX3G Video Gaming Accessories User Manual


 
598
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
24 Others – FNC181 to FNC189
24.5 FNC189 – HCMOV / High Speed Counter Move
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.
*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.
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
*1
FNC189
DHCMOV
C235
IRET
0
I101
EI
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”.)