Omron CS1G/H-CPUxxH Instructions Manual page 261

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Timer and Counter Instructions
3-6-10 Example Timer and Counter Applications
Example 1:
Long-term Timers
240
When CIO 000001 is ON, the Completion Flags for counters C0003 to C0007
are turned OFF and the counters' PVs are set to the maximum value of 9999.
The following examples show various applications of timer and counter
instructions including long-term timers, a two-stage counter, ON/OFF delay,
one-shot bit, and flicker bit.
The following program examples show three ways to create long-term timers
with standard TIM and CNT instructions.
Two TIM Instructions
In this example, two TIM instructions are combined to make a 30-minute
timer.
000000
T0001
T0002
TIM and CNT Instructions
In this example, a TIM instruction and a CNT instruction are combined to
make a 500-second timer.
TIM 0001 generates a pulse every 5 s and CNT 0002 counts these pulses.
The set value for this combination is the timer interval × counter SV. In this
case, the timer SV would be 5 s × 100 = 500 s. With this combination, the
long-term timer's PV is actually the PV of a counter, which is maintained
through power interruptions.
Section 3-6
Address Instruction
Operands
000000
LD
000000
000001
TIM
0001
#9000
000002
LD
T0001
000003
TIM
0002
#9000
000004
LD
T0002
000005
OUT
000200

Advertisement

Table of Contents
loading

Table of Contents