Ladder - Signalled Junction Sequence
Eight rungs freeze a junction two seconds into its four-second amber: the 30 s green TON is done, the amber TON is still timing, the 25 s red TON has never been enabled, so only the amber lamp is lit and the engine names the green lamp, the red lamp and the unstarted red timer as never energised at this instant.
Make it your own.
title "Signalled junction - three-phase lamp sequence"
state: Power_On, Ped_Button
rung "Master enable"
--] [--Power_On----( )--Seq_Run
rung "Green phase, 30 s, timed out"
xic Seq_Run
ton T_Green preset: 30 accum: 30 unit: s
rung "Amber phase, 4 s, armed by the green done bit"
xic T_Green.DN
ton T_Amber preset: 4 accum: 2 unit: s
rung "Red phase, 25 s, armed by the amber done bit"
xic T_Amber.DN
ton T_Red preset: 25 accum: 0 unit: s
rung "Green lamp holds until the green timer times out"
xic Seq_Run
xio T_Green.DN
ote Lamp_Green
rung "Amber lamp between green done and amber done"
xic T_Green.DN
xio T_Amber.DN
ote Lamp_Amber
rung "Red lamp from amber done until red done"
xic T_Amber.DN
xio T_Red.DN
ote Lamp_Red
rung "Pedestrian request seals in on the button and clears on red"
branch
--] [--Ped_Button
--] [--Ped_Waiting
--]/[--Lamp_Red
--( )--Ped_Waiting