
The Carlo Gavazzi EM24 is a DIN-rail mounted 3-phase energy analyzer that communicates via Modbus RTU over RS-485. The TapHome template provides 7 devices covering per-phase energy metering (L1/L2/L3), dual-tariff energy counters (T1/T2), and bidirectional import/export totals. Each per-phase meter includes service attributes for voltage, current, apparent power, and reactive power.
The EM24 is available in direct connection variants (AV2, AV9 — up to 65 A) and CT connection variants (AV5, AV6 — for higher currents via 5 A secondary CTs). All register values are INT32 with LSW-first word order (Little Endian word swap), read via Modbus function codes 03h or 04h (interchangeable).
Hardware connection
RS-485 wiring
The EM24 has a 2-wire RS-485 serial interface. Connect using a daisy-chain topology:
- A (line A) to A+/D+ on TapHome RS-485
- B (line B) to B-/D- on TapHome RS-485
- GND — connect a third wire for ground reference, grounded only at the host side
The RS-485 bus must be terminated at both ends with a 120 ohm resistor (1/2 W, 5%) between lines A and B. Termination is required even for point-to-point connections or short cable runs. For distances over 1000 m or more than 160 instruments, a signal repeater is required.
Cable specification:
- Type: AWG24 balanced pair with third wire for GND (shielded recommended)
- Topology: Daisy-chain only (no star or stub/tee)
- Max cable length: 1000 m (without repeater)
Configuration
Communication parameters
The default Modbus settings match the TapHome template:
| Parameter | Default | Options |
|---|---|---|
| Baud rate | 9600 | 9600, 4800 |
| Data bits | 8 | Fixed |
| Parity | None | Fixed |
| Stop bits | 1 | Fixed |
| Slave ID | 1 | 1-247 |
Communication parameters can be changed via the front panel settings menu or via Modbus write commands to holding registers (H:4362 for slave ID, H:4363 for baud rate).
Changing settings via the front panel
- Press the joystick for 3+ seconds to enter the password page
- Enter the password (default: 0, change password range: 0-9999)
- Navigate with left/right to the desired setting page (e.g., AddrESS for slave ID, bAudrAtE for baud rate)
- Press the joystick to enter edit mode, use up/down to change the value
- Press to confirm, then scroll to End to exit settings
Application type
The EM24 supports 8 application types (A through H) that determine which measurements are available. Application H provides the most comprehensive set, including separate import/export energy, per-phase details, tariff registers, and totalizers. Applications E, F, and H operate without “easy connection”, meaning import and export energy are tracked separately — this is required for bidirectional metering in solar PV installations.
| Application | Key Features | Easy Connection |
|---|---|---|
| A | Basic: voltages, frequency, total kWh(+), power demand | Yes |
| B | A + reactive energy, apparent power demand | Yes |
| C | A + tariff energy, totalizers 1/2/3 | Yes |
| D | Single-phase: kWh(+), voltage only | Yes |
| E | Import + export kWh, run hours, power, PF | No |
| F | Full: all measurements, totalizers, per-phase details | No |
| G | Like F with easy connection, per-phase, tariffs | Yes |
| H | Like F without easy connection, per-phase, tariffs | No |
For solar PV installations where bidirectional metering is needed, select application E, F, or H (without easy connection). With easy connection enabled (applications A-D, G), import and export energy are combined into a single total, making it impossible to distinguish grid consumption from grid feed-in.
Slave ID
When connecting multiple EM24 meters on the same RS-485 bus, each meter must have a unique Slave ID (range 1-247). After importing the TapHome template, adjust the Slave ID in the module connection settings to match the meter.
Device capabilities
The template creates 7 devices organized into three groups: per-phase energy meters, tariff counters, and bidirectional totals. All devices are read-only and polled at 15-second intervals.
Per-phase energy metering
Three ModbusElectricityMeter devices provide per-phase energy and power readings:
- Energy L1 — phase 1 import active energy (kWh) and active power (kW). Service attributes: voltage L1-N (V), current L1 (A), apparent power L1 (VA), and reactive power L1 (VAR).
- Energy L2 — phase 2 import active energy (kWh) and active power (kW). Service attributes: voltage L2-N (V), current L2 (A), apparent power L2 (VA), and reactive power L2 (VAR).
- Energy L3 — phase 3 import active energy (kWh) and active power (kW). Service attributes: voltage L3-N (V), current L3 (A), apparent power L3 (VA), and reactive power L3 (VAR).
Tariff energy counters
Two ModbusVariable devices track energy consumption by tariff period:
- Tariff 1 Energy — import active energy accumulated during tariff T1 period (kWh). Includes reactive power T1 (kvarh) as a service attribute.
- Tariff 2 Energy — import active energy accumulated during tariff T2 period (kWh). Includes reactive power T2 (varh) as a service attribute.
Tariff switching can be controlled via digital inputs on the meter or via Modbus command (register H:4327). The EM24 supports up to 4 tariffs (T1-T4) natively, but the TapHome template tracks T1 and T2.
Bidirectional energy totals
Two ModbusVariable devices provide system-wide import and export energy counters:
- Total Import Energy — total import (grid consumption) active energy across all phases (kWh). Includes total import reactive energy (kvarh) as a service attribute.
- Total Export Energy — total export (grid feed-in) active energy across all phases (kWh). Includes total export reactive energy (kvarh) as a service attribute.
The export energy counter is only meaningful when the EM24 is configured with an application type that supports bidirectional metering (E, F, or H — without easy connection). With easy connection enabled, the export register remains at zero.
Module-level service attributes
The template also provides three module-level service attributes:
- Frequency — grid frequency (Hz)
- Keypad — front panel lock status (Locked / Unlocked)
- Measuring System — configured wiring system (3Pn, 3P1, 2P, 1P, 3P)
Additional capabilities
The EM24 also exposes registers for line-to-line voltages (L1-L2, L2-L3, L3-L1), system-level totals for active/apparent/reactive power, per-phase and system power factor, phase sequence indicator, power demand with peak tracking, tariffs T3 and T4, per-phase export energy counters, operating hours, and partial (resettable) energy counters. These can be added in a future template update.
Troubleshooting
No communication
- Verify the RS-485 wiring is daisy-chained (not star topology)
- Check A/B terminal connections — swap A and B if communication fails
- Confirm bus termination: 120 ohm resistor at each end of the bus
- Ensure the TapHome baud rate matches the meter setting (default 9600, 8N1)
- Verify the Slave ID in TapHome matches the meter (default 1)
Maximum registers per request
The EM24 supports a maximum of 11 registers per read request. The TapHome template is designed within this limitation, but custom configurations should respect this constraint to avoid communication errors.
Incorrect readings
- Confirm the application type supports the expected measurements — export energy requires application E, F, or H
- Verify the measuring system (3Pn, 3P1, 2P, 1P) matches the actual wiring installation
- For CT-connected models (AV5, AV6), verify the CT ratio is correctly configured — incorrect ratios cause proportionally wrong energy and power readings
Register byte order
The EM24 uses Little Endian word order (LSW first, MSW second) for all 32-bit registers. The TapHome template uses LittleEndianInt32, which matches the meter’s native format. If readings appear as extremely large or small numbers, this typically indicates a byte order mismatch.