240
Timer and Counter Instructions
Section 5-16
Precautions
The PV will be reset to 0000 and the Completion Flag will be turned OFF
when a power interruption occurs or the PC is switched from PROGRAM
mode to MONITOR or RUN mode (or vice-versa).
The PV of TTIM(––) in an interlocked program section will be maintained
when the execution condition for IL(02) is OFF. The PV will also be maintained
in a jumped program section, unlike timers and high-speed timers which con-
tinue timing.
TTIM(––) will not operate properly if the cycle time exceeds 0.1 s because the
PV is refreshed only when TTIM(––) is executed and the PV is incremented in
0.1-s units.
A delay of one cycle is sometimes required for a Completion Flag to be turned
ON after the timer times out because the Completion Flag is refreshed only
when TTIM(––) is executed.
TTIM(––) will not restart after timing out unless the PV is changed to a value
below the SV or the reset input is turned ON.
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.)
Flags
ER:
N is not a TIM number.
SV is not BCD.
RB is not a valid bit address.
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.)
Example
The following figure illustrates the relationship between the execution condi-
tions for a totalizing timer with a set value of 2 s, its PV, and the Completion
Flag.
00000
TTIM(
−−
)
TIM 000
#0100
20000
Address Instruction
Operands
00000
LD
00000
00001
TTIM(
−−
)
TIM
000
#
0100
20000