S11
S12
S13
S14
RST
Y3
Y5
T1
K80
T1
TRAN S12
T2
K5
T4
TRAN S15
C0
K5
Y5
T3
K5
T3
C0
TRAN S14
S12
T3
C0
TRAN S12
RST C0
Y4
T4
K50
SET
Y3
T5
K20
S15
T5
TRAN S16
RST
Y0
Y2
T6
K100
T2
TRAN S13
T6
TRAN S17
S16
B green light is lit for 8 Sec.
B green light is lit for 0.5 Sec.
B yellow light is lit for 5 Sec.
The B red light is lit and kept, even the step will be
transferred after 2 Sec.
Reset A red light to OFF.
A green light is lit for 10 Sec.
When the contact T1=ON, the active
step transfers to S12.
When the contact T4=ON, the active step transfers to S15.
When the contact T5=ON, the active step transfers to S16.
When the contact T6=ON, the active step transfers to S17.
Activate the coil
of 5 Sec. timer.
B yellow light is lit.
Activate the coil
of 10 Sec. timer.
A green light is lit.
When the contacts T3=ON
& C0=ON, the active step
transfers to S14.
When the contacts
T3=ON & C0=OFF,
the active step transfers
to S12.
Below displays simple ow programming, individually using (a) SFC and (b) STL in writing the program, in order to
comparison reference.
Continue on next page
M9002
SFC Traffic_Light
SET S0
(a) Programming by the SFC
S10
SET
Y0
SET
Y3
T0
K20
T0
TRAN S11
S0
X0
TRAN S10
111
Ladder
Diagram
in the main
program
Activate the step S0 in the SFC program.
The SFC is named “Trafc_Light”.
When X0=ON, the active step transfers to S10.
Set A red light ON.
Set B red light ON.
Activate the coil of 2 Sec. timer.
When the contact T0=ON, the active step transfers to S11.
Reset B red light to OFF.
B green light is lit.
Activate the coil
of 8 Sec. timer.
Repeat this loop to let
the B green light ash
for 5 times, by 1 Sec.
cycle.
Activate the coil of 0.5 Sec. timer.
When the contact T2=ON, the active step transfers to S13.
Activate the coil of 5 times counter.
B green light is lit.
Activate the coil of
0.5 Sec. timer.
Reset C0.
B red light is lit.
Activate the coil
of 2 Sec. timer.