Omron C200HX Operation Manual page 181

Hide thumbs Also See for C200HX:
Table of Contents

Advertisement

Timer and Counter Instructions
00000
00100
TIM 001
Example 5:
Flicker Bits
00000 TIM 002
TIM 001
TIM 001
00000
00205
1.0 s
1.5 s
00000 25502
The following one-shot timer may be used to save memory.
Bits can be programmed to turn ON and OFF at regular intervals while a desig-
nated execution condition is ON by using TIM twice. One TIM functions to turn
ON and OFF a specified bit, i.e., the Completion Flag of this TIM turns the speci-
fied bit ON and OFF. The other TIM functions to control the operation of the first
TIM, i.e., when the first TIM's Completion Flag goes ON, the second TIM is
started and when the second TIM's Completion Flag goes ON, the first TIM is
started.
1.0 s
1.5 s
A simpler but less flexible method of creating a flicker bit is to AND one of the SR
area clock pulse bits with the execution condition that is to be ON when the flick-
er bit is operating. Although this method does not use TIM, it is included here for
comparison. This method is more limited because the ON and OFF times must
be the same and they depend on the clock pulse bits available in the SR area.
In the following example the 1-second clock pulse is used (25502) so that 00206
would be turned ON and OFF every second, i.e., it would be ON for 0.5 seconds
and OFF for 0.5 seconds. Precise timing and the initial status of 00206 would
depend on the status of the clock pulse when 00000 goes ON.
Address Instruction
TIM 001
00000
#0015
001.5 s
00001
00002
00100
00003
00004
Address Instruction
TIM 001
00000
#0010
1.0 s
00001
00002
TIM 002
1.5 s
#0015
00003
00004
00205
00005
00006
Address Instruction
00000
LD
00206
00001
AND
00002
OUT
Section 5-14
Operands
LD
00000
OR
00100
TIM
001
#
0015
AND NOT
TIM
001
OUT
00100
Operands
LD
00000
AND
TIM
002
TIM
001
#
0010
LD
TIM
001
TIM
002
#
0015
LD
TIM
001
OUT
00205
Operands
00000
25502
00206
163

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200hgC200he

Table of Contents