4.
AZCCPU
/MELSEC-A
4.1.5 Counter
processing
and
maximum
counting
speed
The
A2C
uses up-timing counters which increase their present
values on the leading edge
of
an input signal.
Counters are used by incorporating
in
the main routine programs
or sub routine programs.
(1)
Counter present value and contact status update
Counter coil is switched on and
off
by the
ml
C[:!
instruction. The counter present value is updated on the
leading edge of the coil signal after the
-1
(FEND)
instruction is executed. The counter contacts close after the
counter has counted out. The counters retain their present
value and contact status even if the counter coil is switched
Off.
d
-.
L'
d
1
(2)
1-1
C[:! instruction executed
When the counter is reset by the
(RST]
C[:l
instruction, the
present value is reset to
0
and the counter contacts open.
Main routine
END
0
Counter present value updated
I
Counter contact status uDdated
I
I
Fig.
4.3
Counter
Prmssing
I
REMARK
I
The maximum counting speed of the counter depends on the scan time. Counting
is
only possible if the
input
condition is on for more than one scan time. For
further details,
see
the ACPU Programming Manual.
n
1
I
Maximum counting speed Cmax
=
100
X
ts
(timedsec)
I
where, n
=
duty
(96)
Duty
is the ratio of
the
input signal's on time to
off
time as a percentage.
Count input signal
If T1
d
T2 n=-
T1 +T2
If T1
>
T2 n=-
T1
+
T2
ts: Program scan time (sec)
T1
x
100
(96)
T2
x
100
(%)
Y
u
1
J
n
id
4-6
L
IB
IM
862WA