4-7-3 Traffic Lights
8S
5S
5S
2S
5S
10S
5S
2S
2S
Trafc lights active I/O duration time sheet:
The following demonstrates are compiling by some SFCs and STLs with different programming methods.
Group A
lights
Red
Yellow
Y0 Y1
Green
Y2 Y3
Y4 Y5
110
In this section, we choose the familiar trafc lights, as an example for the description of step-by-step movement.
There are two sets of trafc lights at the crossroads, hereby referred to as Group A lights and Group B lights as shown
below. When the start button X0 is pressed, the sequential control of trafc light is activated. First, the A red and B red
lights are lit. After 2 seconds, B red light goes OFF. Followed by B green light is lit for 8 seconds and ashes for 5
seconds. After that B yellow light is ON for 5 seconds, then shift to the B red ON. In 2 seconds later, Group A lights take
over the operation, following the same sequences of movements as Group B lights.
Red
Yellow
Green
Group B
lights
Start X0
A red light Y0
A yellow light Y1
A green light Y2
B red light Y3
B yellow light Y4
B green light Y5