You are offline. The tools work from the copy saved in this browser; pages you have not opened yet need a connection.
Carlo Gavazzi EM340-DIN Modbus register map
The registers of the Carlo Gavazzi EM340-DIN as listed by the manufacturer, with the 0-based address to enter in your software.
plcbytes.com/devices/carlo-gavazzi-em340/
How to connect
The EM340 is a direct-connected 3-phase meter up to 65 A. The S1 version has an RS485 port with Modbus RTU; from the factory it answers at address 1, 9600 baud, 8N1.
- Address (1–247), baud rate (9600 to 115200) and parity (none or even) can be changed on the meter or over Modbus in the Settings group below.
- Read with function 04. Function 03 returns the same values: replace the leading 3 with 4, e.g. 300001 → 400001. Up to 50 registers fit in one request.
- 32-bit values come low word first (word order CDAB). In most software this is called word swap.
- Power is signed only in measurement mode B (bidirectional, PFB models): negative = exported. In mode A (PFA models) power is always positive and only imported energy counts.
This map is for the EM340 with RS485 (S1). The ET340 (the version Victron sells as Energy Meter ET340) and the EM330 share the same document but have extra registers, such as per-phase exported energy and run hours. The M-Bus version (M1) uses a different protocol.
Connection
| Protocol | Modbus RTU |
|---|---|
| Default device address | 1 |
| Serial settings | 9600 baud, 8N1 |
| Byte order of 32-bit values | CDAB (word swap) |
| Function codes | 03, 04 |
| Max. registers per request | 50 |
| Addresses in the manual | register numbers (30001, 40001 …) |
| Valid for firmware | EM340-DIN with RS485 port (S1), communication protocol version 2 revision 17 |
| Also known as | EM340, EM340 DIN, EM340-DIN AV2 3 X S1 X, EM340-DIN AV2 3 X S1 PF A, EM340-DIN AV2 3 X S1 PF B, EM340DINAV23XS1X, EM340DINAV23XS1PFB |
Registers
Address: as written in the manufacturer's document. Offset: the 0-based address sent in the request, which Home Assistant, pymodbus and Node-RED expect. Scale: multiply the raw value by it.
No warranty. We prepare register maps carefully, but mistakes and differences between firmware versions happen. We do not guarantee that the data is correct or complete and, to the extent permitted by law, we are not liable for damage caused by using it. Check the manufacturer's document before you write values or use them for control. Terms of use
Read values from the device? The decoder adds names and units from this map. Each group below has its own link that sets the first address.
Voltage
Open in decoder from 300001| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 300001 | 0 | 04 | Voltage L1–N | int32 | V | 0.1 | R | |
| 300003 | 2 | 04 | Voltage L2–N | int32 | V | 0.1 | R | |
| 300005 | 4 | 04 | Voltage L3–N | int32 | V | 0.1 | R | |
| 300007 | 6 | 04 | Voltage L1–L2 | int32 | V | 0.1 | R | |
| 300009 | 8 | 04 | Voltage L2–L3 | int32 | V | 0.1 | R | |
| 300011 | 10 | 04 | Voltage L3–L1 | int32 | V | 0.1 | R | |
| 300037 | 36 | 04 | Voltage L–N Σ (system) | int32 | V | 0.1 | R | |
| 300039 | 38 | 04 | Voltage L–L Σ (system) | int32 | V | 0.1 | R |
Current
Open in decoder from 300013| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 300013 | 12 | 04 | Current L1 | int32 | A | 0.001 | R | |
| 300015 | 14 | 04 | Current L2 | int32 | A | 0.001 | R | |
| 300017 | 16 | 04 | Current L3 | int32 | A | 0.001 | R |
| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 300019 | 18 | 04 | Active power L1 | int32 | W | 0.1 | R | |
| 300021 | 20 | 04 | Active power L2 | int32 | W | 0.1 | R | |
| 300023 | 22 | 04 | Active power L3 | int32 | W | 0.1 | R | |
| 300041 | 40 | 04 | Total active power | int32 | W | 0.1 | R | |
| 300025 | 24 | 04 | Apparent power L1 | int32 | VA | 0.1 | R | |
| 300027 | 26 | 04 | Apparent power L2 | int32 | VA | 0.1 | R | |
| 300029 | 28 | 04 | Apparent power L3 | int32 | VA | 0.1 | R | |
| 300043 | 42 | 04 | Total apparent power | int32 | VA | 0.1 | R | |
| 300031 | 30 | 04 | Reactive power L1 | int32 | var | 0.1 | R | |
| 300033 | 32 | 04 | Reactive power L2 | int32 | var | 0.1 | R | |
| 300035 | 34 | 04 | Reactive power L3 | int32 | var | 0.1 | R | |
| 300045 | 44 | 04 | Total reactive power | int32 | var | 0.1 | R | |
| 300047 | 46 | 04 | Power factor L1 | int16 | 0.001 | R | ||
| 300048 | 47 | 04 | Power factor L2 | int16 | 0.001 | R | ||
| 300049 | 48 | 04 | Power factor L3 | int16 | 0.001 | R | ||
| 300050 | 49 | 04 | Total power factor | int16 | 0.001 | R |
| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 300053 | 52 | 04 | Imported active energy | int32 | kWh | 0.1 | R | |
| 300055 | 54 | 04 | Imported reactive energy | int32 | kvarh | 0.1 | R | |
| 300079 | 78 | 04 | Exported active energy | int32 | kWh | 0.1 | R | |
| 300081 | 80 | 04 | Exported reactive energy | int32 | kvarh | 0.1 | R | |
| 300065 | 64 | 04 | Imported active energy L1 | int32 | kWh | 0.1 | R | |
| 300067 | 66 | 04 | Imported active energy L2 | int32 | kWh | 0.1 | R | |
| 300069 | 68 | 04 | Imported active energy L3 | int32 | kWh | 0.1 | R | |
| 300061 | 60 | 04 | Imported active energy, partial | int32 | kWh | 0.1 | R | Partial counter that can be reset |
| 300063 | 62 | 04 | Imported reactive energy, partial | int32 | kvarh | 0.1 | R | Partial counter that can be reset |
Frequency
Open in decoder from 300052| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 300052 | 51 | 04 | Frequency | int16 | Hz | 0.1 | R |
Status and alarms
Open in decoder from 300051| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 300051 | 50 | 04 | Phase sequence | int16 | R | 0 = L1-L2-L3, 1 = L1-L3-L2; only meaningful in 3-phase systems | ||
| 304358 | 4357 | 04 | Wiring check | bits | R | Bit 0 wrong voltage sequence, bits 1–3 phase 1/2/3 reversed, bits 4–6 phases 1-2 / 1-3 / 2-3 swapped, bit 7 all three swapped. All 0 = wiring correct |
Settings
Open in decoder from 404099| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 404099 | 4098 | 03 | Measuring system | uint16 | RW | 0 = 3Pn (3-phase with neutral), 1 = 3P (3-phase without neutral), 2 = 2P (2-phase with neutral) | ||
| 404356 | 4355 | 03 | Measurement mode | uint16 | RW | 0 = A (easy connection, power always positive), 1 = B (bidirectional, export negative). Fixed on MID models PFA/PFB | ||
| 408193 | 8192 | 03 | Modbus address | uint16 | RW | 1–247, default 1 | ||
| 408194 | 8193 | 03 | Baud rate | uint16 | RW | 1 = 9600 (default), 2 = 19200, 3 = 38400, 4 = 57600, 5 = 115200 | ||
| 408195 | 8194 | 03 | Parity | uint16 | RW | 1 = none (default), 2 = even |
Device information
Open in decoder from 300771| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 300771 | 770 | 04 | Version code | uint16 | R | 0 = version A, 1 = version B, … | ||
| 300772 | 771 | 04 | Firmware revision | uint16 | R | 0 = revision 0, 1 = revision 1, … |
Tariffs
Open in decoder from 300071| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 300071 | 70 | 04 | Imported active energy T1 | int32 | kWh | 0.1 | R | |
| 300073 | 72 | 04 | Imported active energy T2 | int32 | kWh | 0.1 | R |
| Address | Offset | FC | Name | Type | Unit | Scale | Access | Notes |
|---|---|---|---|---|---|---|---|---|
| 300057 | 56 | 04 | Total power demand | int32 | W | 0.1 | R | |
| 300059 | 58 | 04 | Maximum total power demand | int32 | W | 0.1 | R |
Home Assistant export for Carlo Gavazzi EM340-DIN
YAML for the Home Assistant modbus integration with every selected register as a sensor: address, data type, byte order, scaling and unit are filled in. Check the result against your device before you rely on it.
Paste the block into configuration.yaml and restart Home Assistant. If you already have a modbus: section, use “Sensors only” and paste under its sensors:.
Source and verification
Datasheet Based on the manufacturer’s documentation · verified 2026-10-31
Typed in from tables 2.4-1, 2.7-1, 2.9-2, 2.9-5 and 2.9-7 of the official protocol; rows the document marks as not available or as ET/EM330 only are left out. "Value weight" (e.g. Volt*10) is applied as scale 0.1. Settings are given as holding registers (leading 3 replaced by 4, as the document describes) because they are written with function 06. The identification code (000Bh) is left out: it shares an address with the second word of V L3-L1 and can only be read on its own.
- Carlo Gavazzi – EM300 Series and ET300 Series, Communication Protocol (official · version 2.17 · 2021-07-05)
- Carlo Gavazzi – EM340 datasheet (official)
Only facts are taken over; the original document belongs to the manufacturer. Check it for your firmware version before writing values.
Related devices
- Carlo Gavazzi EM24-DINEnergy meter
- Chint DTSU666 / DSSU666Energy meter
- Eastron SDM120-ModbusEnergy meter
- Eastron SDM630-Modbus V2Energy meter
- Eastron SDM72D-MEnergy meter
- Shelly Pro 3EMEnergy meter
Related tools
- Register DecoderFloat32, Int32, UInt16 and bits in every byte order, plus Find my value.
- Address Converter40001 ↔ offset 0, 4x/3x/0x/1x notation, 5- and 6-digit addresses.
- Value EncoderTurn a value like 230.5 into registers for every byte order.
- Frame DecoderRead RTU and TCP frames from Wireshark or a serial log.