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.
Serial RTU
Match port, baud rate, parity, stop bits, and encoding to the device firmware or datasheet.
Outputs
Use coils and holding registers for relays, PWM channels, servos, motor speed, or device modes.
Startup defaults
Default coil and register values can move hardware, so treat them as real actuator commands.
Choosing settings for common direct device roles
Single USB or RS485 device
Select the exact serial port and keep encoding=rtu unless the device explicitly uses Modbus ASCII.
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, servo, or motor controller
Use defaultRegisterValue for safe neutral values such as 1500, then use register actions for deliberate changes.
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
Configuration parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
Title | Yes | Display name of the direct Modbus device. | None |
Port | Yes | Serial port such as COM3 or /dev/ttyUSB0. | None |
Serial settings | Yes | Baud rate, data bits, stop bits, parity, encoding, flow control, echo, and open delay. | 9600, 8N1, rtu |
Timeouts and retries | Yes | Read timeout, write timeout, and transaction retry count used by the read/write loop. | 100 ms, 1 retry |
Register counts | Yes | Configured counts for coils, discrete inputs, input registers, and writable holding-register buffer. | 12 / 4 / 8 |
Default values | Yes | defaultCoilsValue pattern and semicolon-separated defaultRegisterValue used as startup target values. | x / 1500 |
RS485 settings | Optional | RS485 mode, termination, receive-during-transmit, TX polarity, and before/after TX delays. | Disabled |
Operational notes
Address from zero
Direct operations read and write from address 0. Plan coil and register indexes accordingly.
Writable buffer size
Actions write register indexes in the writable buffer. Make sure the configured count covers every index used by actions.
Test actuator defaults safely
Before connecting motors, pumps, heaters, or locks, test defaults and action values on safe or disconnected hardware.