For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connecting a Siemens SENTRON PAC3200 Power Meter

How to read voltage, power, and energy measurements from a Siemens SENTRON PAC3200 power meter over Modbus/TCP and map them into an ISA-95 style MQTT topic hierarchy.

This guide shows you how to read energy measurements from a Siemens SENTRON PAC3200 power monitoring device with the Connectware Modbus/TCP connector and map them into an ISA-95 style MQTT topic hierarchy. The measurements collected here (voltage, current, power, power factor, frequency, and energy counters) are the typical input for energy monitoring dashboards and ISO 50001 energy management reporting. In more detail, the following topics are covered:

  • Enabling Modbus/TCP on the SENTRON PAC3200

  • Identifying the Modbus registers of the measured variables and energy counters

  • Decoding the Float and Double values with the correct dataType

  • Mapping the measurements into an ISA-95 style MQTT topic hierarchy

  • Verifying data in the Data Explorer

This guide focuses on the PAC3200 specifics. For a general introduction to the Modbus/TCP connector, including function codes and write operations, see Connecting & Integrating a Modbus/TCP Server.

A complete example file is available at the end of this guide.

Prerequisites

To follow this guide, you will need the following:

  • A running instance of Cybus Connectware.

  • A Siemens SENTRON PAC3200 that is reachable over Ethernet from Connectware. The closely related SENTRON PAC4200 uses the same register offsets for all values in this guide, so the example works for both devices.

  • Access to the Admin UI with sufficient user permissions.

  • Basic knowledge of MQTT and the Connectware services concept (for example, service commissioning files, connections, and endpoints).

Enabling Modbus/TCP on the Device

The PAC3200 ships with the Siemens SEAbus TCP protocol enabled on its Ethernet port, not Modbus/TCP. Before Connectware can connect, switch the protocol on the device:

  1. On the device, press F4 and go to SETTINGS > COMMUNICATION.

  2. Check the entries IP ADDRESS, SUBNET, and GATEWAY, and set them to values that make the device reachable from Connectware.

  3. Change the PROTOCOL entry from SEAbus TCP to MODBUS TCP.

  4. Confirm the restart prompt. The settings become effective after the restart.

The device then accepts Modbus/TCP connections on port 502. Connectware addresses the meter by its IP address; the default unit ID 1 of the Connectware Modbus connection works for a PAC3200 that is connected directly over its Ethernet port. If you reach the meter through a Modbus gateway instead, set the unitId connection property to the address of the meter behind the gateway.

Identifying the Modbus Registers

The PAC3200 provides all measured variables as holding registers that you can read with function code 3 (0x03) or 4 (0x04). The complete register table is in the SENTRON PAC3200 system manual, chapter "Ethernet port", table "Available measured variables". The following registers are used in this guide:

Offset
Number of registers
Name
Format
Unit

1

2

Voltage V a-n (L1-N)

Float

V

13

2

Current a (L1)

Float

A

55

2

Frequency

Float

Hz

63

2

Total Apparent Power

Float

VA

65

2

Total Active Power

Float

W

67

2

Total Reactive Power

Float

var

69

2

Total Power Factor

Float

-

801

4

Active Energy Import Tariff 1

Double

Wh

809

4

Active Energy Export Tariff 1

Double

Wh

Siemens labels the phases a, b, and c, which correspond to L1, L2, and L3. The registers of the remaining phases follow the same pattern: voltages L2-N and L3-N are at offsets 3 and 5, currents L2 and L3 at offsets 15 and 17. The energy counters for tariff 2 and the reactive energy counters continue in steps of four registers after offset 801.

Decoding Float and Double Values

Modbus registers are 16 bits long, so one measured value spans several registers. The PAC3200 transmits multi-register values in standard Modbus big-endian order, with the most significant register first. This maps directly to the Connectware Modbus data types:

  • Float values (IEEE 754, 32-bit) span two registers: set length: 2 and dataType: floatBE.

  • Double values (IEEE 754, 64-bit) span four registers: set length: 4 and dataType: doubleBE.

With the dataType property set, Connectware decodes the registers and publishes a plain JSON number. Without it, you receive a raw buffer that you would have to parse yourself. For all available data types, see Modbus/TCP Endpoint Properties.

Writing the Service Commissioning File

The service commissioning file contains all connection and mapping details. Do not worry about copying the snippets together into one file, the complete example file is available at the end of this guide.

Description and Metadata

These sections contain general information about the service commissioning file. Only the metadata name is required.

Parameters and Definitions

We define the network address of the meter as parameters, so you can set them when you install the service. The default Modbus/TCP port is 502.

The MQTT topics in this guide follow an ISA-95 style equipment hierarchy with an energy branch (<enterprise>/<site>/<area>/<line>/energy). We define the prefix once in the definitions section and reuse it in every mapping with !sub.

Cybus::Connection

The connection resource establishes the Modbus/TCP connection to the meter. The connectionStrategy object controls how Connectware retries failed connection attempts with increasing delays. For all connection properties, including unitId, see Modbus/TCP Connection Properties.

Cybus::Endpoint

Each endpoint polls one measured variable. The address and length values come directly from the register table: the offset becomes address, the number of registers becomes length. The instantaneous measurements are polled every two seconds.

The energy counters are Double values across four registers, and they change slowly. A longer poll interval of ten seconds is sufficient for energy monitoring and reduces the load on the meter.

If you poll many endpoints, enable batch read processing on the connection. Connectware then combines reads of neighboring registers, such as the power values at offsets 63 to 69, into a single request.

Cybus::Mapping

The mapping publishes each endpoint on a topic of the ISA-95 hierarchy.

With this mapping, the total active power of the line is published on the topic enterprise/hamburg/assembly/line-1/energy/power/active, and every other measurement follows the same pattern.

Installing the Service Commissioning File

  1. Install the service commissioning file. See Installing Services.

  2. Enable the service. See Enabling Services.

Result: The service is enabled. Connectware establishes the Modbus/TCP connection to the PAC3200 and polls the configured registers.

Verifying the Data

Open the Data Explorer and subscribe to enterprise/hamburg/assembly/line-1/energy/#. Each topic carries a JSON object with the keys timestamp and value, where the value is the decoded measurement:

A few plausibility checks for the first readings:

  • The voltage on voltage/l1-n matches your grid, for example around 230 V in Europe.

  • The frequency is between 45 and 65 Hz, typically 50 or 60 Hz.

  • The active energy import counter matches the counter reading on the device display and only increases over time.

If the connection does not reach the Connected state, verify that the device protocol is set to MODBUS TCP and that port 502 is reachable from Connectware. If values arrive but look implausible (for example, extremely large or near-zero numbers), the register decoding does not match: check that address, length, and dataType correspond to one row of the register table, and that reads do not start in the middle of a multi-register value.

Service Commissioning File Example

Last updated

Was this helpful?