119
stays ON for at least 15 seconds. When 00000 goes OFF, the timer will be
reset and 00200 will be turned OFF. When 00001 goes ON, TIM 001 is
started from the SV provided through IR word 005. Bit 00201 is also turned
ON when 00001 goes ON. When the SV in 005 has expired, 00201 is turned
OFF. This bit will also be turned OFF when TIM 001 is reset, regardless of
whether or not SV has expired.
00000
TIM 000
00001
TIM 001
00200
00201
Address
Instruction
Operands
00000
LD
00000
00001
TIM
000
#
0150
00002
LD
TIM
000
00003
OUT
00200
00004
LD
00001
00005
TIM
001
005
00006
AND NOT
TIM
001
00007
OUT
00201
TIM 000
#0150
TIM 001
005
There are two ways to achieve timers that operate for longer than 999.9 sec-
onds. One method is to program consecutive timers, with the Completion
Flag of each timer used to activate the next timer. A simple example with two
900.0-second (15-minute) timers combined to functionally form a 30-minute
timer.
00000
TIM 001
TIM 002
00200
Address
Instruction
Operands
00000
LD
00000
00001
TIM
001
#
9000
00002
LD
TIM
001
00003
TIM
002
#
9000
00004
LD
TIM
002
00005
OUT
00200
TIM 001
#9000
TIM 002
#9000
900.0 s
900.0 s
In this example, 00200 will be turned ON 30 minutes after 00000 goes ON.
TIM can also be combined with CNT or CNT can be used to count SR area
clock pulse bits to produce longer timers. An example is provided in
5-11-3
COUNTER – CNT
.
TIM can be combined with KEEP(11) to delay turning a bit ON and OFF in
reference to a desired execution condition. KEEP(11) is described in
5-6-3
KEEP – KEEP(11)
.
To create delays, the Completion Flags for two TIM are used to determine
the execution conditions for setting and reset the bit designated for
KEEP(11). The bit whose manipulation is to be delayed is used in KEEP(11).
Turning ON and OFF the bit designated for KEEP(11) is thus delayed by the
SV for the two TIM. The two SV could naturally be the same if desired.
In the following example, 00500 would be turned ON 5.0 seconds after
00000 goes ON and then turned OFF 3.0 seconds after 00000 goes OFF. It
is necessary to use both 00500 and 00000 to determine the execution condi-
tion for TIM 002; 00000 in a normally closed condition is necessary to reset
Example 2:
Extended Timers
Example 3:
ON/OFF Delays
Timer and Counter Instructions
Section 5-12