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 Motor Run (master writes)Coil 00002 → Y2 Direction — OFF=FWD, ON=REV (master writes)DI 10001 → X1 Start PB N.O. (master reads)DI 10002 → X2 Stop PB N.C. — true at rest (master reads)DI 10003 → X3 Left End Sensor (master reads)DI 10004 → X4 Right End Sensor (master reads)More tutorials at accautomation.ca · YouTube @ACCautomation
Bi-directional Belt Conveyor with End Sensors
A steel belt conveyor carries a product box between two proximity sensors. The belt runs in both directions under PLC control. This scene demonstrates direction control, seal-in circuits, and sensor-based reversing logic — all essential patterns in conveyor automation.
| Address | Dir | Description |
|---|---|---|
| X1 | IN | Start pushbutton — N.O. momentary |
| X2 | IN | Stop pushbutton — N.C. momentary |
| X3 | IN | Left end sensor — box at left limit |
| X4 | IN | Right end sensor — box at right limit |
| Y1 | OUT | Motor run — belt drives when ON |
| Y2 | OUT | Direction — OFF=forward (right), ON=reverse (left) |
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 conveyor belt must carry a box from one end to the other and back in a continuous cycle. When Start is pressed, the belt runs forward. When the box reaches the right sensor, the belt reverses. When the box reaches the left sensor, the belt reverses again. This cycle repeats until Stop is pressed. Stop must halt the belt immediately at any point.
Two manual inputs: Start (X1, N.O.) and Stop (X2, N.C.). Two automatic sensor inputs: Left Sensor (X3) and Right Sensor (X4), set by the scene when the box reaches each end. Two outputs: Motor Run (Y1) to start/stop the belt, and Direction (Y2) to control which way the belt moves. Direction only matters when Y1 is ON.
Initial state: motor off, box at left end. On Start: motor runs forward (Y1=ON, Y2=OFF). When box reaches right sensor (X4=ON): reverse direction (Y2=ON), motor continues. When box reaches left sensor (X3=ON): forward direction (Y2=OFF), motor continues. Repeat. On Stop: motor off. Consider: what is the direction when the motor first starts? What if a sensor is already active when Start is pressed?
You will need rungs for: Start/Stop seal-in (Y1), and direction latch based on which sensor was last triggered (Y2). Use an internal coil (C bit) to latch the direction state so it persists between scans. The direction must not flip back and forth on the same sensor trigger.
Connect the scene, press RUN, and watch the box travel back and forth. Verify: (1) pressing Start begins movement; (2) the box reverses at each end; (3) pressing Stop halts the belt; (4) restarting after Stop continues in the correct direction. Check edge cases: what happens if you press Start exactly when a sensor is active?