Field fix / guidePLC / HMI Code & LogicVendor-agnostic (IEC 61131-3)Access Trafficindustrial-automation

Traffic Signal Push Button — PLC Control Template

Shared by TSIMEREZIVO Team · 4 Oct 2026 · 38 views

# Traffic Signal Push Button — Usage Guide ## Overview Fixed-time crossing signal with default vehicle green and latched pedestrian call. A pedestrian request is served only after the minimum vehicle green has elapsed. ## Commissioning 1. Validate lamp outputs and flash behaviour 2. Set timing constants to local traffic standard or site safety study 3. Confirm pedestrian calls are latched and not missed during vehicle green --- ## Control Logic — Vendor-Agnostic Pseudocode # Traffic Signal Push Button — Logic ## Standards: IEC 61131-3 | MUTCD-inspired timing ## Scan Rate: 100ms | Pattern: vehicle green default with pedestrian call ``` ROUTINE: TrafficSignalPushButton SCAN_RATE: 100ms // SECTION 1 — PEDESTRIAN CALL LATCH IF PB_PED THEN PED_CALL := TRUE END_IF // SECTION 2 — SIGNAL STATE MACHINE CASE STATE OF 0: // VEHICLE GREEN / PED RED VEH_GREEN := TRUE; VEH_YELLOW := FALSE; VEH_RED := FALSE; PED_WALK := FALSE IF PED_CALL THEN TIMER := TIMER + 1; IF TIMER >= MIN_GREEN_TICKS THEN STATE := 1; TIMER := 0 END_IF END_IF 1: // VEHICLE YELLOW VEH_GREEN := FALSE; VEH_YELLOW := TRUE; VEH_RED := FALSE TIMER := TIMER + 1; IF TIMER >= YELLOW_TICKS THEN STATE := 2; TIMER := 0 END_IF 2: // ALL RED / PED WALK VEH_RED := TRUE; PED_WALK := TRUE TIMER := TIMER + 1; IF TIMER >= WALK_TICKS THEN STATE := 3; TIMER := 0 END_IF 3: // PED FLASH / ALL RED PED_FLASH := TRUE; VEH_RED := TRUE TIMER := TIMER + 1; IF TIMER >= FLASH_TICKS THEN STATE := 0; TIMER := 0; PED_CALL := FALSE; PED_FLASH := FALSE END_IF END_CASE // SECTION 3 — HMI HMI_STATE := STATE HMI_PED_CALL := PED_CALL END_ROUTINE ``` --- ## Tag List ```csv Tag Name,Description,Data Type,Direction,Engineering Unit,Range Min,Range Max,Default Value,Address PB_PED,Pedestrian Push Button,BOOL,input,,,,FALSE,DI:0:0.0 PED_CALL,Pedestrian Call Latched,BOOL,internal,,,,FALSE, STATE,Signal State,INT,internal,,0,3,0, TIMER,State Timer,INT,internal,,0,10000,0, MIN_GREEN_TICKS,Minimum Vehicle Green Time,INT,internal,,0,10000,100, YELLOW_TICKS,Vehicle Yellow Time,INT,internal,,0,10000,30, WALK_TICKS,Pedestrian Walk Time,INT,internal,,0,10000,80, FLASH_TICKS,Pedestrian Flash Time,INT,internal,,0,10000,50, VEH_GREEN,Vehicle Green Output,BOOL,output,,,,FALSE,DO:1:0.0 VEH_YELLOW,Vehicle Yellow Output,BOOL,output,,,,FALSE,DO:1:0.1 VEH_RED,Vehicle Red Output,BOOL,output,,,,FALSE,DO:1:0.2 PED_WALK,Pedestrian Walk Output,BOOL,output,,,,FALSE,DO:1:0.3 PED_FLASH,Pedestrian Flash Output,BOOL,output,,,,FALSE,DO:1:0.4 HMI_STATE,HMI: Signal State,INT,output,,0,3,0, HMI_PED_CALL,HMI: Pedestrian Call,BOOL,output,,,,FALSE, ``` --- ## Alarm Matrix ```csv Alarm Tag,Condition,Setpoint,Priority,Type,Response,Delay,Auto Acknowledge ALM_NONE,No active alarms defined for fixed-time signal template,N/A,low,diagnostic,Add lamp failure monitoring where required by site standard.,0s,Yes ```

More like this

Rate, comment, and get full access

Members can download files, rate contributions, and discuss fixes with the engineers who posted them — free.

Join the library