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 Device
Knowledge base

Modbus Device

Modbus component connects Banalytics directly to one serial Modbus device. Use it for a single RTU device on a local serial port, such as a relay board, RS485 adapter, Arduino controller, PWM controller, or small industrial device.

Direct serial communication with one Modbus device

The component manages coils, discrete inputs, holding registers, and input registers from address 0. It maintains local writable buffers and sends changes to the device through its background read/write loop.

RTU

Serial RTU

Match port, baud rate, parity, stop bits, and encoding to the device firmware or datasheet.

OUT

Outputs

Use coils and holding registers for relays, PWM channels, servos, motor speed, or device modes.

SAFE

Startup defaults

Default coil and register values can move hardware, so treat them as real actuator commands.

Use Modbus Line instead when several slave IDs share a bus, when the device is accessed over TCP/UDP, or when you need slave discovery, polling events, and ModbusWatermarkTask.

Choosing settings for common direct device roles

USB

Single USB or RS485 device

Select the exact serial port and keep encoding=rtu unless the device explicitly uses Modbus ASCII.

COIL

Relay or digital output board

Set coilsCount to cover the output addresses. Use x in defaultCoilsValue for coils that must not be changed at startup.

PWM

PWM, servo, or motor controller

Use defaultRegisterValue for safe neutral values such as 1500, then use register actions for deliberate changes.

PAD

Gamepad-driven hardware

Combine this component with Gamepad State Controller and Modbus2DVector action when joystick axes should update holding registers in near real time.

Telemetry and RS485 stability

Register counts
Set input, discrete, and coil counts only as high as the addresses you actually use.
Timeouts
Increase read/write timeouts on slow devices, long cables, or noisy adapters.
Retries
Increase transaction retries when CRC or timeout errors appear under load.
RS485 flags
Enable RS485 mode and termination settings only when the adapter and operating system support them.

Configuration parameters

ParameterRequiredDescriptionDefault
Title
YesDisplay name of the direct Modbus device.None
Port
YesSerial port such as COM3 or /dev/ttyUSB0.None
Serial settings
YesBaud rate, data bits, stop bits, parity, encoding, flow control, echo, and open delay.9600, 8N1, rtu
Timeouts and retries
YesRead timeout, write timeout, and transaction retry count used by the read/write loop.100 ms, 1 retry
Register counts
YesConfigured counts for coils, discrete inputs, input registers, and writable holding-register buffer.12 / 4 / 8
Default values
YesdefaultCoilsValue pattern and semicolon-separated defaultRegisterValue used as startup target values.x / 1500
RS485 settings
OptionalRS485 mode, termination, receive-during-transmit, TX polarity, and before/after TX delays.Disabled

Operational notes

IDX

Address from zero

Direct operations read and write from address 0. Plan coil and register indexes accordingly.

BUF

Writable buffer size

Actions write register indexes in the writable buffer. Make sure the configured count covers every index used by actions.

TEST

Test actuator defaults safely

Before connecting motors, pumps, heaters, or locks, test defaults and action values on safe or disconnected hardware.

Related Modbus pages

Related tasks and pages