Omron SYSMAC C200HS Operation Manual page 151

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Timer and Counter Instructions
Example 2:
Extended Timers
00000
TIM 001
TIM 002
Example 3:
ON/OFF Delays
00000
00500 00000
TIM 001
TIM 002
00000
00500
5.0 s
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-sec-
ond (15-minute) timers combined to functionally form a 30-minute timer.
TIM 001
TIM 002
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-14-4 COUNTER
– CNT.
TIM can be combined with KEEP(11) to delay turning a bit ON and OFF in refer-
ence to a desired execution condition. KEEP(11) is described in 5-9-4 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 neces-
sary to use both 00500 and 00000 to determine the execution condition for TIM
002; 00000 in an inverse condition is necessary to reset TIM 002 when 00000
goes ON and 00500 is necessary to activate TIM 002 (when 00000 is OFF).
TIM 001
TIM 002
S
KEEP(11)
R
3.0 s
Address Instruction
00000
LD
#9000
900.0 s
00001
TIM
00002
LD
#9000
900.0 s
00003
TIM
00200
00004
LD
00005
OUT
Address
Instruction
00000
LD
#0050
005.0 s
00001
TIM
00002
LD
003.0 s
#0030
00003
AND NOT
00004
TIM
00005
LD
00500
00006
LD
00007
KEEP(11)
Section 5-14
Operands
00000
001
#
9000
TIM
001
002
#
9000
TIM
002
00200
Operands
00000
001
#
0050
00500
00000
002
#
0030
TIM
001
TIM
002
00500
141

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents