Omron C200H Operation Manual page 127

Hide thumbs Also See for C200H:
Table of Contents

Advertisement

Timer and Counter Instructions
Flags
Examples
Example 1:
Basic Application
00000
TIM 000
00001
TIM 001
Example 2:
Extended Timers
00000
TIM 001
TIM 002
Example 3:
ON/OFF Delays
114
ER:
SV is not in BCD.
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
All of the following examples use OUT in diagrams that would generally be
used to control output bits in the IR area. There is no reason, however, why
these diagrams cannot be modified to control execution of other instructions.
The following example shows two timers, one set with a constant and one set
via input word 005. Here, 00200 will be turned ON after 00000 goes ON and
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.
TIM
TIM
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.
TIM 001
TIM
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-12-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-7-3
KEEP – KEEP(11).
Address Instruction
000
00000
015.0 s
#0150
00001
00200
00002
00003
001
00004
IR 005
00005
IR 005
00006
00201
00007
Address Instruction
00000
#9000
900.0 s
00001
002
00002
#9000
900.0 s
00003
00200
00004
00005
Section 5-12
Operands
LD
00000
TIM
#
0150
LD
TIM
OUT
00200
LD
00001
TIM
AND NOT
TIM
OUT
00200
Operands
LD
00000
TIM
#
9000
LD
TIM
TIM
#
9000
LD
TIM
OUT
00200
000
000
001
005
001
001
001
002
002

Advertisement

Table of Contents
loading

Table of Contents