235
Timer and Counter Instructions
Section 5-16
Precautions
Timers in interlocked program sections are reset when the execution condition
for IL(02) is OFF. Power interruptions also reset timers. If a timer that is not
reset under these conditions is desired, SR area clock pulse bits can be
counted to produce timers using CNT. Refer to
5-16-2 COUNTER – CNT
for
details.
Note
The timer set value must be BCD between #0000 and #9999. Operation will
be as follows if #0000 or #0001 is set.
• If #0000 is set, the Completion Flag will turn ON as soon as the timer’s
execution condition turns ON.
• If #0001 is set, the Completion Flag may turn ON as soon as the timer’s
execution condition turns ON because timer accuracy is 0 to –0.1 s.
Consider the timer accuracy (0 to –0.1 s) when determining the proper set
value.
Flags
ER:
SV is not in BCD.
Indirectly addressed EM/DM word is non-existent.
(Content of
*
EM/
*
DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
5-16-2 COUNTER – CNT
Limitations
Each TIM/CNT number can be used as the definer in only one TIMER or
COUNTER instruction.
The EM area is available in CQM1H-CPU61 CPU Units only.
Description
CNT is used to count down from SV when the execution condition on the
count pulse, CP, goes from OFF to ON, i.e., the present value (PV) will be
decremented by one whenever CNT is executed with an ON execution condi-
tion for CP and the execution condition was OFF for the last execution. If the
execution condition has not changed or has changed from ON to OFF, the PV
of CNT will not be changed. The Completion Flag for a counter is turned ON
when the PV reaches zero and will remain ON until the counter is reset.
CNT is reset with a reset input, R. When R goes from OFF to ON, the PV is
reset to SV. The PV will not be decremented while R is ON. Counting down
from SV will begin again when R goes OFF. The PV for CNT will not be reset
in interlocked program sections or by power interruptions.
N
:
TIM/CNT number
#
Ladder Symbol
Definer Values
SV
:
Set value (word, BCD)
IR, SR, AR, DM, EM, HR, LR, #
Operand Data Areas
CP
R
CNT N
SV