Sequencing

Pedestrian Crossing

hard

Adds a queued pedestrian request and walk phase to a two-direction traffic light.

What it teaches

Keeps Traffic Light 2-Way’s Enable control, then adds an event queue. A one-shot records one button press, a latch remembers it, and the state machine serves it only after all-red.

Inputs and outputs

TagTypeDefaultDescription
In_EnableBOOL1 runs the crossing; 0 resets it and shows red in both directions
In_WalkRequestBOOLPedestrian push button
Cfg_GreenTimeDINT3000Duration of each green phase in milliseconds
Cfg_AmberTimeDINT1500Duration of each amber phase in milliseconds
Cfg_AllRedTimeDINT2000Duration of each all-red phase in milliseconds
Cfg_WalkTimeDINT2500Duration of the walk phase in milliseconds
Out_NSGreenBOOLNorth-south green light
Out_NSAmberBOOLNorth-south amber light
Out_NSRedBOOLNorth-south red light
Out_EWGreenBOOLEast-west green light
Out_EWAmberBOOLEast-west amber light
Out_EWRedBOOLEast-west red light
Out_WalkBOOLPedestrian walk signal
Sts_WaitingBOOL1 while a new walk request is queued

Required behavior