Mitsubishi A2CCPU User Manual page 34

Table of Contents

Advertisement

4. AZCCPU
/MELSE
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
m l
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.
L
(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
( 9 6 )
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
( 9 6 )
T2
x
100 (%)
4-6
IB
IM
8 6 2 W A

Advertisement

Table of Contents
loading

Table of Contents