Device integrations
Generic PLC
Supported devices: any meter exposed by a PLC through the generic register block
Some installations do not expose their energy meter directly. The meter is read by a PLC, over whatever protocol that PLC happens to speak, and the PLC republishes the measurements on Modbus TCP.
The Generic PLC integration is for exactly that case: instead of supporting one more meter brand, our EMS reads a fixed, standardised block of Modbus holding registers that the PLC fills in. Any meter can be brought into the platform this way, as long as the PLC presents it in this layout.
This integration requires EMS controller version 0.0.320 or later.
This is a monitoring-only integration. The EMS reads measurements from the PLC and cannot control anything through it.
What the PLC has to provide
- Modbus TCP on the network the EMS controller can reach.
- A block of holding registers in the layout below.
- Integer values only, with the fixed scale factors below. No floats.
- Big-endian 32-bit values, high word first.
Register layout
Every offset is relative to a base register you configure per device. That makes it possible to publish several meters from one PLC on the same slave ID: give each meter its own base register.
| Offset | Value | Type | Unit in the register | Scale |
|---|---|---|---|---|
| 0 | Status | u16 | 0 = offline, 1 = online | |
| 1 | Active power | i32 | W | x 0.001 to kW |
| 3 | Reactive power | i32 | VAr | x 0.001 to kVAr |
| 5 | Voltage L1 | u16 | 0.1 V | x 0.1 to V |
| 6 | Voltage L2 | u16 | 0.1 V | x 0.1 to V |
| 7 | Voltage L3 | u16 | 0.1 V | x 0.1 to V |
| 8 | Current L1 | i32 | mA | x 0.001 to A |
| 10 | Current L2 | i32 | mA | x 0.001 to A |
| 12 | Current L3 | i32 | mA | x 0.001 to A |
| 14 | Power factor L1 | i16 | x 1000 | x 0.001 |
| 15 | Power factor L2 | i16 | x 1000 | x 0.001 |
| 16 | Power factor L3 | i16 | x 1000 | x 0.001 |
| 17 | Total consumption | u32 | Wh | x 0.001 to kWh |
| 19 | Total production | u32 | Wh | x 0.001 to kWh |
Active power is signed: positive is import, negative is export.
Adding the meter to the EMS
Add an energy meter with brand Generic and model PLC, pointing at the PLC's IP address, port and slave ID. Then set:
| Setting | What to enter |
|---|---|
| Modbus base register | The first register of this meter's block. Defaults to 0. With several meters on one PLC, give each its own base register. |
| Modbus heartbeat register | Optional. The register holding a counter that the PLC increments periodically. |
Heartbeat monitoring
The heartbeat register is optional but recommended. A PLC whose application has frozen keeps answering Modbus with the last values it wrote, so the meter looks healthy while its data quietly goes stale.
When you configure a heartbeat register, the EMS watches that counter. If it stops changing for more than 30 seconds, the device is flagged so you can see the PLC application is no longer running.
EMS functionality
With the current integration, our EMS enables:
- Monitoring of active and reactive power, per-phase voltage, current and power factor
- Monitoring of total imported and exported energy
- Use of the meter as a grid connection meter or as a submeter, like any other supported meter
- PLC availability and heartbeat monitoring
Additional functionality may be added over time as integration capabilities evolve.