Multi-PLC with Signal Router¶
Two independent PLCs communicating via the Signal Router. PLC1 generates pulses, PLC2 counts them.
Setup¶
- Create two engine contexts: "PLC1" and "PLC2"
- Configure a signal route: PLC1
B:0/0→ PLC2B:0/0(Bit, 50ms)
PLC1: Pulse Generator (1 second cycle)¶
Uses decorator chaining (TON + TOF on an XIO contact) to create a continuous 500ms ON / 500ms OFF pulse.
PLC2: Pulse Counter¶
Counts rising edges of B:0/0. When the count reaches 10, the counter resets automatically.
Signal Route Configuration¶
| Field | Value |
|---|---|
| Source Context | PLC1 |
| Source Address | B:0/0 |
| Dest Context | PLC2 |
| Dest Address | B:0/0 |
| Data Type | Bit |
| Interval | 50ms |
Tip
Open examples/Simple 2 PLCs.mplcproj in PiPLC to try this program.