Modbus over RS-485

Modbus over TCP/IP

Modbus over RS-485

MWEB and MiroWEB controller units support status reporting through the Modbus protocol running over the RS-485 link.

Controller devices are configured as slave devices, and will respond to the master request, if the message contains the matching address byte.

RS-485 link is configured as a half-duplex, at 9600 baud, 8-data bits, 1 start bit, 2 stop bits, no parity. Each packet is terminated with a 16-bit CRC value.

The devices Modbus address can be configured in the “General settings” panel:
Modbus address

The controller device responds to the requests sent from the Modbus master. Currently only supported command is Command 3: Read Holding Registers.

In the query header the Starting Address High represents the controller circuit number (1..63), and the Starting Address Low indicates first device on the specified circuit (1..126). Maximum number of register values returned is 96, which corresponds to maximum of 48 devices returning the status in a single response packet.
For the small systems, with less then 250 units installed, the “simple” access mode could be used. With circuit number 0, controller will enumerate all existing devices in the system from 0 to number of devices – 1, regardless of the physical bus address.

Each device returns two bytes of the status.
First byte indicates status of the device transmitter. Currently returned values are:

  • 0 – Device Not installed
  • 1 – Transmitter OK
  • 2 – Battery Low
  • 3 – 24hr communications loss

Second byte shows the status of the Emergency Lighting Unit (ELU):

  • 0 – Device Not Installed
  • 1 – Last Test OK
  • 2 – General Fault
  • 3 – Battery Fault
  • 4 – Lamp Fault
  • 5 – Mains Fault

Modbus protocol request

Slave addrFunctionStart addr MSBStart addr LSBReg count MSBReg count LSBCRC LSBCRC MSB
0x803410180x8b0x26

Modbus protocol response for 2 devices

Slave addrFunctionReg1 data MSBReg2 data LSBReg2 data MSBReg2 data LSBCRC LSBCRC MSB
0x80311140x0b0xb4

Sander Elektronik AG © 2023 Frontier Theme