ABB B23 (B-series)
Status: Vendor Confirmed · Register points: 145 · Transports: Modbus RTU
A curated ModDef profile for the ABB B23 (B-series). Import it as
abb.b23 or load the .moddef.yaml directly.
Usage
Load the profile, bind a transport, and read a point by name. The runtime applies the offset, scaling, byte order, and sentinels from the definition.
- Go
- TypeScript
- Rust
- Python
- C
- C++
doc, _ := moddef.Load("abb-b23.moddef.yaml")
dev, _ := client.New(doc, "abb-b23", transport) // your modbus.Transport
v, _ := dev.ReadPoint(ctx, "active_energy_import")
fmt.Println(v)
import {Device} from '@moddef/core';
import {loadDocument} from '@moddef/core/node';
const doc = await loadDocument('abb-b23.moddef.yaml');
const dev = Device.create(doc, 'abb-b23', transport);
console.log(await dev.readPoint('active_energy_import'));
let doc = moddef_core::load("abb-b23.moddef.yaml")?;
let mut dev = Device::new(&doc, Some("abb-b23"), transport)?;
let v = dev.read_point("active_energy_import").await?;
from moddef import Device, load
from moddef.pymodbus import Options, PymodbusTransport
doc = load("abb-b23.moddef.yaml")
transport = await PymodbusTransport.tcp("192.168.1.50", options=Options())
dev = Device.create(doc, "abb-b23", transport)
print(await dev.read_point("active_energy_import"))
md_doc_t doc;
md_doc_init(&doc, flash_ptr, flash_len); /* zero-copy view */
md_dev_t dev;
md_dev_init(&dev, &doc, MD_STR("abb-b23"), &transport);
md_value_t v;
md_dev_read(&dev, MD_STR("active_energy_import"), &v);
auto doc = moddef::Document::view(flash_bytes).value(); // zero-copy over flash
auto dev = moddef::Device::open(doc, "abb-b23", transport).value();
if (auto v = dev->read("active_energy_import"); v)
std::cout << v->to_string() << '\n';
Measurands
The 14 semantic quantities this device reports, each linked to the measurand catalog. Query a device by measurand instead of a raw point when you want portable code.
| Base quantity | Name | Unit | Description |
|---|---|---|---|
energy_active | Active Energy | Wh | Cumulative active energy register |
energy_reactive | Reactive Energy | varh | Cumulative reactive energy register |
energy_apparent | Apparent Energy | VAh | Cumulative apparent energy register |
active_power | Active Power | W | Instantaneous real power |
reactive_power | Reactive Power | var | Instantaneous reactive power |
apparent_power | Apparent Power | VA | Instantaneous apparent power |
voltage | Voltage | V | RMS voltage; qualify with phase_ref (L1_N, L1_L2, ...) |
current | Current | A | RMS current; qualify with phase_ref / direction |
frequency | Frequency | Hz | Grid frequency |
power_factor | Power Factor | 1 (ratio) | Ratio of real to apparent power (dimensionless) |
fault_code | Fault Code | undefined | Vendor fault code (enum or integer) |
warning_code | Warning Code | undefined | Vendor warning code (enum or integer) |
alarm_status | Alarm Status | undefined | Alarm state (enum or flag set) |
device_status | Device Status | undefined | Overall device operating status (enum) |
Source
- Profile:
energy-meter/abb-b23/abb-b23.moddef.yaml - Register map: vendor documentation