Deployment Modes¶
PiPLC supports several deployment modes to fit different use cases.
Editor Only (Local)¶
The embedded server runs in-process. No external engine needed.
- Ideal for development and testing
- Available on Windows, Linux, and macOS
- Virtual I/O simulation included
Editor + Remote Engine¶
The editor connects to one or more remote piplc-engine instances via WebSocket, while the embedded server handles local contexts.
- Editor on your desktop PC
- Engine running on Raspberry Pi
- Real-time programming and monitoring
┌─ Office PC ──────────────────────┐
│ PiPLC Editor │
│ └── ws://192.168.1.50:9100 ───┐ │
└──────────────────────────────── │ ┘
│
┌─ Raspberry Pi (field) ──────────┐│
│ piplc-engine (systemd) ││
│ ├── EngineContext "PLC1" ││
│ ├── EngineContext "PLC2" ││
│ └── GPIO hardware ◀┘
└──────────────────────────────────┘
Connection Persistence¶
Save the remote connection with your project via Tools > Project Configuration so it auto-reconnects on project open. See Multi-Context for details.
Standalone HMI¶
The standalone PiPLC-HMI application connects to any engine on the network independently of the editor. This enables dedicated operator stations.
┌─ Office PC ──────────────────────┐
│ PiPLC Editor │
│ └── ws://192.168.1.50:9100 ───┐ │
└──────────────────────────────── │ ┘
│
┌─ Raspberry Pi (field) ──────────┐│
│ piplc-engine (systemd) ◀┘
│ ├── EngineContext "PLC1" │
│ └── GPIO hardware │◀┐
└──────────────────────────────────┘ │
│
┌─ Operator Station ───────────────┐ │
│ PiPLC-HMI │ │
│ └── ws://192.168.1.50:9100 ─────┘ │
└───────────────────────────────────┘
- The HMI can run on any machine (Windows, Linux, Raspberry Pi)
- Connects via WebSocket to any engine server
- Supports fullscreen kiosk mode (++f11++) for touchscreen stations
- Can monitor a different context than the editor
See the HMI User Guide for full details.
Headless Only¶
piplc-engine runs standalone on Raspberry Pi as a systemd service. The editor connects remotely for programming and monitoring.
- 24/7 operation without a monitor
- Auto-start on boot
- Ideal for production deployments
Managing the Engine Service¶
sudo systemctl status piplc-engine # check status
sudo systemctl restart piplc-engine # restart after config change
sudo systemctl stop piplc-engine # stop the engine
sudo systemctl disable piplc-engine # disable auto-start on boot
journalctl -u piplc-engine -f # follow live logs
Configuring the Engine¶
Edit /etc/default/piplc-engine to change startup options:
# Available options:
# --port PORT WebSocket listen port (default: 9100)
# --name NAME Engine display name (default: "PiPLC Engine")
# --scan-time MS Scan cycle time in ms (default: 10)
# --ioconfig PATH Load I/O configuration file
# --modbus-server Enable Modbus TCP server
# --modbus-port PORT Modbus TCP server port (default: 502)
# --modbus-unit-id ID Modbus unit/slave ID, 1-247 (default: 1)
PIPLC_ENGINE_OPTS="--port 9100 --name 'PiPLC Engine'"
Then restart: sudo systemctl restart piplc-engine
Modbus TCP Server¶
The headless engine can expose PLC memory to external SCADA/HMI systems via Modbus TCP:
Default memory mapping:
| Modbus Function | PLC Region | Modbus Addresses |
|---|---|---|
| FC02 Discrete Inputs | I:0/0–15 | 0–15 |
| FC01/05/15 Coils | O:0/0–15 | 0–15 |
| FC04 Input Registers | N:0–7 | 0–7 |
| FC03/06/16 Holding Registers | N:10–17 | 0–7 |
This allows any standard Modbus TCP client (SCADA systems, third-party HMIs, data loggers) to read and write PLC data.
Summary¶
| Mode | Description |
|---|---|
| Editor only | Embedded server runs in-process. No external engine needed. |
| Editor + Remote | Editor connects to remote piplc-engine instances via WebSocket. |
| Standalone HMI | PiPLC-HMI connects independently to any engine for operator panels. |
| Headless only | piplc-engine runs standalone as a systemd service with optional Modbus TCP. |