> For the complete documentation index, see [llms.txt](https://docs.smart-stuff.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smart-stuff.nl/p1-modbus-dongle/firmware-v2-current/register-mapping/em330.md).

# EM330

## Mapping behaviour

* Device Manager mapping value: `4`
* Profile: `EM330`
* Read function codes: `FC03` and `FC04`
* Register widths: mixed 16-bit and 32-bit
* 32-bit word order: low word first (LSW-MSW)
* Unmapped register handling: Zero-filled

{% hint style="info" %}
Device ID, baud rate and serial format are global firmware v2 settings. They are not changed when this mapping is selected.
{% endhint %}

## Register overview

| Address (decimal / hex) | Words | Type     | Source or fixed value            | Conversion                    | Missing         |
| ----------------------- | ----: | -------- | -------------------------------- | ----------------------------- | --------------- |
| `0` / `0x0000`          |     2 | `uint32` | `voltage_l1_v`                   | scale 10                      | source\_default |
| `2` / `0x0002`          |     2 | `uint32` | `voltage_l2_v`                   | scale 10                      | source\_default |
| `4` / `0x0004`          |     2 | `uint32` | `voltage_l3_v`                   | scale 10                      | source\_default |
| `6` / `0x0006`          |     2 | `uint32` | `line_voltage_l12_v`             | scale 10                      | source\_default |
| `8` / `0x0008`          |     2 | `uint32` | `line_voltage_l23_v`             | scale 10                      | source\_default |
| `10` / `0x000A`         |     2 | `uint32` | `line_voltage_l31_v`             | scale 10                      | source\_default |
| `12` / `0x000C`         |     2 | `uint32` | `derived_current_l1_a`           | scale 1000                    | source\_default |
| `14` / `0x000E`         |     2 | `uint32` | `current_l2_a`                   | scale 1000                    | source\_default |
| `16` / `0x0010`         |     2 | `uint32` | `derived_current_l3_a`           | scale 1000                    | source\_default |
| `18` / `0x0012`         |     2 | `int32`  | `net_power_l1_kw`                | scale 10000                   | source\_default |
| `20` / `0x0014`         |     2 | `int32`  | `net_power_l2_kw`                | scale 10000                   | source\_default |
| `22` / `0x0016`         |     2 | `int32`  | `net_power_l3_kw`                | scale 10000                   | source\_default |
| `24` / `0x0018`         |     2 | `int32`  | `net_power_l1_kw`                | scale 10000                   | source\_default |
| `26` / `0x001A`         |     2 | `int32`  | `net_power_l2_kw`                | scale 10000                   | source\_default |
| `28` / `0x001C`         |     2 | `int32`  | `net_power_l3_kw`                | scale 10000                   | source\_default |
| `30` / `0x001E`         |     2 | `int32`  | `constant 0`                     | —                             | source\_default |
| `32` / `0x0020`         |     2 | `int32`  | `constant 0`                     | —                             | source\_default |
| `34` / `0x0022`         |     2 | `int32`  | `constant 0`                     | —                             | source\_default |
| `36` / `0x0024`         |     2 | `int32`  | `line_voltage_avg_tenths_legacy` | —                             | source\_default |
| `38` / `0x0026`         |     2 | `int32`  | `line_voltage_avg_tenths_legacy` | —                             | source\_default |
| `40` / `0x0028`         |     2 | `int32`  | `net_power_total_kw`             | scale 10000                   | source\_default |
| `42` / `0x002A`         |     2 | `int32`  | `net_power_total_kw`             | scale 10000                   | source\_default |
| `44` / `0x002C`         |     2 | `int32`  | `constant 0`                     | —                             | source\_default |
| `46` / `0x002E`         |     1 | `int16`  | `direction_l1`                   | scale 1000                    | source\_default |
| `47` / `0x002F`         |     1 | `int16`  | `direction_l2`                   | scale 1000                    | source\_default |
| `48` / `0x0030`         |     1 | `int16`  | `direction_l3`                   | scale 1000                    | source\_default |
| `49` / `0x0031`         |     1 | `int16`  | `direction_total`                | scale 1000                    | source\_default |
| `50` / `0x0032`         |     1 | `int16`  | `constant 0`                     | —                             | source\_default |
| `51` / `0x0033`         |     1 | `int16`  | `constant 500`                   | —                             | source\_default |
| `52` / `0x0034`         |     2 | `uint32` | `energy_delivered_total_kwh`     | scale 10                      | source\_default |
| `54` / `0x0036`         |     2 | `uint32` | `constant 0`                     | —                             | source\_default |
| `80` / `0x0050`         |     2 | `uint32` | `energy_returned_total_kwh`      | scale 10                      | source\_default |
| `82` / `0x0052`         |     2 | `uint32` | `constant 0`                     | —                             | source\_default |
| `92` / `0x005C`         |     2 | `uint32` | `uptime_seconds`                 | —                             | source\_default |
| `406` / `0x0196`        |     2 | `uint32` | `pre40`                          | —                             | source\_default |
| `408` / `0x0198`        |     2 | `uint32` | `firmware_version_packed`        | —                             | source\_default |
| `410` / `0x019A`        |     2 | `uint32` | `p1_device_magic`                | —                             | source\_default |
| `8192` / `0x2000`       |     1 | `int16`  | `dev_id`                         | —                             | source\_default |
| `8193` / `0x2001`       |     1 | `int16`  | `baudrate`                       | baud\_index\_em330            | source\_default |
| `8194` / `0x2002`       |     1 | `int16`  | `serial_config_offset`           | parity\_index\_none\_or\_even | source\_default |
| `8195` / `0x2003`       |     1 | `int16`  | `serial_config_offset`           | stop\_bits\_count             | source\_default |
| `8196` / `0x2004`       |     1 | `int16`  | `constant 50`                    | —                             | source\_default |

## Reading the table

* **Words** is the number of consecutive 16-bit Modbus registers occupied by the entry.
* **Source** names correspond directly to the firmware v2 recipe source.
* **Conversion** records the exact scale, transform or direction handling configured by the recipe.
* This page is generated from `mb_recipe.h` and `modbus_profiles.h` for firmware 2.3.0.
