Back to Serial Studio

Modbus Register Map

app/rcc/scripts/native/modbus_register_map.md

4.0.11.5 KB
Original Source

Modbus Register Map

Decodes the register blocks polled by the Modbus driver through a typed register map. Values latch between frames. This template is generated by the Modbus register map importer (CSV, XML or JSON maps); re-import the map to change it.

Wire Format

[slave address][function][byte count][data ...]

One frame per poll response. The driver polls the configured register groups in order; the parser tracks that round-robin and resyncs on the response function code when a reply is dropped. Exception responses are ignored.

Parameters

ParameterTypeDescription
Register blocksmapPolled blocks with typed, scaled entries. Written by the importer.

Each block holds a register type (0 holding, 1 input, 2 coils, 3 discrete inputs), the poll start address and its entries. Each entry maps one register address to the next output channel:

json
{"blocks": [{"type": 0, "start": 0, "entries": [
  {"address": 0, "dataType": "uint16", "scale": 1, "offset": 0}
]}]}

Supported data types: uint16, int16, uint32, int32, uint64, int64, float32, float64 and bool. Multi-register values use big-endian word order. Coil and discrete-input blocks emit one bit per channel.

Output Channels

Channels follow the map order: blocks first, entries within each block next. Register values are scaled as value * scale + offset.

Pipeline Notes

Select the Binary (raw bytes) decoder with no frame delimiters; the Modbus driver delivers one response per frame.