FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
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).
M8000
FNC238
DAND>=
*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.
0
M8394
I101
*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.
600
FNC189
C235
D0
DHCMOV
D0
K500
FNC189
C235
DHCMOV
24.5 FNC189 – HCMOV / High-Speed Counter Move
The current value of C235 is
transferred to D1 and D0.
1
K0*
(The current value of C235 is not
cleared.)
In the case of "(D1, D0) ≥ K500",
Y000
Y000 is set to ON.
END
EI
FEND
When X001 turns from OFF to ON, the
D200
K1
*1
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
IRET
to "0".)
24 Others – FNC181 to FNC189