Getting Started Cameras & Video Detection & Recording Automation & Events Actions Integration & Connectivity Network & Discovery AI & Remote Control MQTT Modbus ZeroMQ System & Administration Use Cases Troubleshooting About & Legal
Home / Documentation / Modbus Line
Knowledge base

Modbus Line

Modbus Line manages a Modbus communication line with one or many slave devices. It supports Serial, TCP, UDP, RTU-over-TCP, device discovery, register discovery, per-device polling, state tracking, and ModbusDeviceStateEvent generation.

Manage multiple Modbus devices on one line

The line keeps a device map with slave IDs, states, poll intervals, register definitions, read/write flags, last activity, and last error. It is the preferred component for RS485 buses, TCP gateways, UDP gateways, polling events, and ModbusWatermarkTask.

BUS

Shared bus

Track several slave IDs through one serial adapter or network gateway.

DISC

Discovery

Scan configured slave ID ranges and discover register maps during commissioning.

EVT

Polling events

Fire ModbusDeviceStateEvent when state, telemetry, or last error changes.

Choosing a connection type

Serial RS485
Use SERIAL for several slave IDs on a shared adapter. Match serial settings to the bus.
Modbus TCP
Use TCP for PLCs or gateways. Enable reconnect when the device or link can restart.
RTU over TCP
Enable only for gateways that expect RTU-framed packets over a TCP socket.
UDP
Use only for devices that explicitly support Modbus over UDP, with conservative retries and timeout.

Commissioning devices and register maps

IDS

Scan narrow slave ranges

Use ranges such as 1-10 or exact known IDs. Scanning 1-247 can make startup slow and noisy.

REG

Discover registers carefully

Register discovery can probe coils, discrete inputs, input registers, and holding registers, and may write current values for writable detection.

MAP

Curate production maps

After discovery, keep useful registers, rename them, and set correct read/write flags.

Discovery can touch equipment: avoid register discovery on hardware where even a same-value write can have side effects.

Configuration parameters

ParameterRequiredDescriptionDefault
Connection type
YesSERIAL, TCP, or UDP.SERIAL
Network settings
ConditionalNetwork address, port, reconnect, and RTU-over-TCP mode for TCP/UDP connections.None
Serial settings
ConditionalSerial port, baud rate, data bits, stop bits, parity, encoding, flow control, echo, and open delay.9600, 8N1, rtu
Validation and retries
YesCRC validation, transaction retry count, and transaction timeout.CRC on, 2 retries, 500 ms
RS485 settings
OptionalTermination, receive-during-transmit, TX polarity, and before/after TX delays for serial adapters.Disabled
Discovery
OptionalAutomatic slave discovery on start, discovery ranges, and register discovery.Disabled

Polling and automation notes

POLL

Per-device poll interval

Use shorter intervals only for values that must react quickly. Increase intervals for slow meters or devices with many registers.

OFF

Disabled devices

A device in DISABLED state is skipped by polling and cannot be written by line actions.

ADDR

Address translation

Vendor manuals may use labels such as 40001. Translate them to raw Modbus addresses before creating registers.

Related Modbus pages

Related tasks and pages