87
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
4 Devices in Detail
4.6 Counter [C]
1
In
troduct
io
n
2
Ov
e
rv
ie
w
3
In
st
ru
ct
ion
Li
st
4
D
evi
ce
s
in
De
ta
il
5
Speci
fied t
h
e
D
evi
ce &
C
onst
a
nt
6
Bef
o
re
Pr
ogr
a
m
m
ing
7
Bas
ic
In
st
ru
cti
o
n
8
FNC0
0
-FNC0
9
P
ro
g
ra
m F
lo
w
9
FNC1
0
-FNC1
9
M
ov
e
&
C
om
par
e
10
FNC
20-
FNC
2
9
Ar
ith.
&
Logi
c
O
per
at
io
n
2. Examples in applied instructions
For the full use of counters as numeric devices, refer to the explanation of applied instructions later.
FNC 12
MOV
C 20
D 10
FNC 10
CMP
K100
C 30
M 0
FNC 18
BCD
C 10 K2Y000
FNC 22
MUL
C 5
K 2
D4(D5)
FNC 12
DMOV
C200 D0(D1)
FNC 11
DZCP
K100 K20000 C200
M10
*1
C20 (current value) is transferred to D10.
*1. Make sure to use 32-bit operation instructions for 32-bit counters.
A decimal integer "100" is compared with C30
(current value), and the result is output to M0 to M2.
The contents of C10 (current value) are converted
into BCD, and output to Y000 to Y007.
(Seven-segment display unit is controlled.)
C5 (current value) is multiplied by 2, and transferred
to (D5, D4).
C 200 (current value) is transferred to (D1, D0).
C200 (current value) is compared with a decimal
integer zone 100 to 20000, and the result is output to
M10 and M11.