Skip to content

Multi-PLC with Signal Router

Two independent PLCs communicating via the Signal Router. PLC1 generates pulses, PLC2 counts them.

Setup

  1. Create two engine contexts: "PLC1" and "PLC2"
  2. Configure a signal route: PLC1 B:0/0 → PLC2 B:0/0 (Bit, 50ms)

PLC1: Pulse Generator (1 second cycle)

Rung 0: [/B:0/0 + TON:500ms + TOF:500ms] ──( OTE B:0/0 )

Uses decorator chaining (TON + TOF on an XIO contact) to create a continuous 500ms ON / 500ms OFF pulse.

PLC2: Pulse Counter

Rung 0: [ B:0/0 ]──[CTU C:0 PRE:10]
Rung 1: [ C:0.DN ]──[RES C:0]

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.