A small Node.js program that runs on your PC and connects this browser scene to a real Modbus TCP or Modbus RTU master such as a PLC, SCADA system, or Modbus Poll software.
Download the zip file and extract it to a folder on your PC.
Download acc-modbus-bridge.zipThe bridge requires Node.js. Download the LTS version from nodejs.org and run the installer.
install.batinstall.commandstart-modbus-bridge shortcut for youstart-modbus-bridge.bat (Windows) or
start-modbus-bridge.command (macOS)ws://127.0.0.1:8502CONNECT — the badge turns amber when linkedCoil 00001 → Y1 NS Green (master writes)Coil 00002 → Y2 NS Yellow (master writes)Coil 00003 → Y3 NS Red (master writes)Coil 00004 → Y4 EW Green (master writes)Coil 00005 → Y5 EW Yellow (master writes)Coil 00006 → Y6 EW Red (master writes)DI 10001 → X1 Ped PB N/S (master reads)DI 10002 → X2 Ped PB E/W (master reads)More tutorials at accautomation.ca · YouTube @ACCautomation
Four-Way Intersection with Pedestrian Requests
A twilight four-way intersection with N/S and E/W signal heads, road markings, pedestrian crosswalks, and corner buildings. Two pedestrian push buttons allow walkers to request an extended green phase. This scene teaches timed sequence control — one of the most common patterns in industrial PLC programming.
| Address | Dir | Description |
|---|---|---|
| X1 | IN | Ped button N/S — request extended N/S green |
| X2 | IN | Ped button E/W — request extended E/W green |
| Y1 | OUT | N/S Green light |
| Y2 | OUT | N/S Yellow light |
| Y3 | OUT | N/S Red light |
| Y4 | OUT | EW Green light |
| Y5 | OUT | EW Yellow light |
| Y6 | OUT | EW Red light |
Use these five steps to develop your ladder program for this scene. Run standalone mode first to observe correct behaviour, then build and test your program in the ACC PLC Simulator.
A four-way intersection must cycle through standard traffic signal phases automatically. N/S and E/W traffic must never have green simultaneously — a critical safety interlock. Yellow phases warn before red. A brief all-red clearance interval separates opposing greens. Pedestrian buttons must extend the relevant green phase by 5 seconds when pressed.
X1=Ped N/S (extends N/S green so pedestrians can cross E/W road), X2=Ped E/W (extends E/W green so pedestrians can cross N/S road). Y1=NS Green, Y2=NS Yellow, Y3=NS Red, Y4=EW Green, Y5=EW Yellow, Y6=EW Red. Critical: at all times at least one direction shows red. During all-red clearance, both Y3 and Y6 are ON.
Six phases: (1) NS Green + EW Red (~20s). (2) NS Yellow + EW Red (3s). (3) All Red (1.5s). (4) EW Green + NS Red (~20s). (5) EW Yellow + NS Red (3s). (6) All Red (1.5s). Repeat. Pedestrian: X1 pressed → extend phase 1 by 5s. X2 pressed → extend phase 4 by 5s. Request made during wrong phase must be stored and honoured next cycle.
Use TON timers (T1–T6) for each phase duration. Use C bits to track which phase is active — only one should be ON at a time. Each T/DN bit advances to the next phase. For pedestrian extensions, latch a request bit and add extra time to the relevant timer when the correct green phase is active.
Connect the scene, press RUN, observe the cycle. Verify: correct output pairs for each phase; yellow appears briefly between each green change; N/S and EW are never both green; X1 during N/S green visibly extends it; X1 during EW green stores the request and extends N/S green next cycle.