Skip to main content

Modbus/TCP server

OmniBus can present itself as a single Modbus/TCP slave that aggregates the decoded points of every port — plus the gateway's own health — into one register map. A SCADA system or PLC connects once and polls the box like any other Modbus device. It's the Modbus counterpart of the BACnet/IP object server, and is configured the same way: a shared, device-wide service that ports opt into.

Enable it on the Modbus page, then turn on Modbus output for each port whose points you want exposed.

How points map to registers

Each decoded point becomes a register, with the area chosen by its direction — the same read-only-vs-writable split BACnet uses for Input vs. Value objects:

PointModbus areaFunction codes
numeric, read-onlyInput Register (3xxxxx)FC04 read
numeric, writableHolding Register (4xxxxx)FC03 read · FC06/FC16 write
boolean, read-onlyDiscrete Input (1xxxxx)FC02 read
boolean, writableCoil (0xxxxx)FC01 read · FC05/FC15 write
stringnot exposed

Every numeric value is encoded as a 32-bit IEEE-754 float spanning two registers (regardless of the source point's native width), so a temperature, a setpoint and a counter all read back uniformly. Booleans take a single coil/discrete bit.

Word order

32-bit floats span two registers; the word order setting controls their layout (byte order within each register is always big-endian, the Modbus wire convention):

  • Big-endian (ABCD) — high word first. The default; matches most BACnet gateways and Niagara.
  • Word-swapped (CDAB) — low word first. Common on many PLCs and SCADA packages (e.g. Schneider). Switch to this if 32-bit values read as garbage.

The register map

Modbus has no discovery — a master polls fixed addresses. OmniBus assigns every point a stable address automatically and shows the result in the register map table on the Modbus page (port, point, area, address, type, access, live value). Configure your master against that table.

  • Each port gets its own contiguous block of addresses, so a port's points stay grouped. Addresses are stable across restarts (persisted) — a master's configuration won't break when the box reboots or you rename a port.
  • The table shows the 1-based Modicon address (3xxxxx / 4xxxxx / …); hover an address to see the raw 0-based protocol address used on the wire.

Settings

On the Modbus page:

  • TCP port — listen port (default 502). It cannot be shared with a port's own TCP-output port.
  • Unit ID — the Modbus unit/slave id the server answers as (default 1). It also answers the conventional "any" ids 0 and 255.
  • Word order — see above.
  • Publish device status registers — exposes the gateway's own health (uptime, CPU temp, memory, disk, NTP sync, throttling, port counts) as read-only registers, with no per-port configuration. On by default.

Writing back

Writable points (holding registers / coils) route a master's write back to the adapter, which actually drives the equipment — the adapter remains the source of truth and overwrites the register on its next poll. Floats are reconstructed from both registers; prefer FC16 (write multiple registers) so the two halves arrive together. A write to an address with no writable point returns illegal data address.

Limits

  • One unit ID; the whole map lives under it.
  • Numerics are always float32 — native 16-bit register widths aren't preserved.
  • Read-only numerics live in input registers only (not mirrored into holding).
  • No publish/push; a master polls on its own cadence.