Installation manual
Publication 1747-RM001G-EN-P - November 2008
G-14 Application Example Programs
Time Driven Sequencer
Application Example
The following application example illustrates the use of the TON and SQO
instructions in a traffic signal at an intersection. The timing requirements are:
• Red light - 30 seconds.
• Yellow light - 15 seconds.
• Green light - 60 seconds.
The timer, when it reaches its preset, steps the sequencer that in turn controls
which traffic signal is illuminated. For a detailed explanation of:
• XIC, XIO, and TON instructions, see Chapter 2.
• SQO and SQC instructions, see Chapter 7.
Time Driven Sequencer
Ladder Program
0000
TON
Timer On Delay
Timer T4:0
0.01
Preset 1
0
0001
0002
END
The function of this rung is called a regenerative timer. Every time the timer reaches its preset, the DONE bit
is set for one scan - this causes this rung to become FALSE for one scan and resets the timer. On the following
scan, when this rung becomes TRUE again, the timer begins timing.
Timer
Enable
T4:0
DN
Time Base
Accum
Controls the RED, GREEN, and YELLOW lights wired to outputs O:3/0, O:3/1 and O:3/2, and controls how long
the regenerative timer times between each step. When this rung goes from false-to-true (by the timer reaching
reaching its preset), the first sequencer changes which traffic light is illuminated, and the second sequencer
changes the preset of the timer to determine how long this next light is illuminated.
DN
T4:0
EN
DN
SQO
Sequencer Output
File
Mask
Dest
Control
Length
Position
EN
DN
SQO
Sequencer Output
File #N7:0
Mask 0007
Dest O:3.0
Control R6:0
Length 3<
Position 0<
RED, YELLOW AND GREEN LIGHTS
#N7:5
FFFF
T4:0.PRE
R6:1
3<
0<
Timer Presets for each light