Modbus rtu

The device can operate as a Modbus RTU Master, allowing it to orchestrate, read, and write data across a network of industrial slave peripherals (such as PLCs, sensors, energy meters, or climate controllers).


Connection to the Modbus network is established via the physical RJ45 COM port.


TECHNICAL NOTE

The physical COM port circuitry requires a continuous external power supply (either main or auxiliary). If the system drops down to its internal backup battery power during an outage, the COM port is deactivated to conserve energy, halting all Modbus communication.

The native COM port signals must be routed through an external hardware converter to adapt the pinout into a standard differential RS485 bus network.


READ REQUEST (AT#RTUR)


You can query peripheral devices using the polling command AT#RTUR. The master engine natively supports four standard Modbus function codes:


TARGET

RESOURCE

FUNCTION CODE

DATA

TYPE

COILS

01

Read/Write Bits

(Digital Outputs)

DISCRETE

INPUTS

02

Read-Only Bits

(Digital Inputs)

HOLDING REGISTERS

03

Read/Write Words

(Configuration/Analog Data)

INPUT

REGISTERS

04

Read-Only Words

(Live Measurements/Status)

Advanced Reading Parameters

  • Batch Polling: Up to 32 data points (bits, words, doublewords, or floats) can be packed and extracted in a single command request.
  • Data Formatting: Options include interpreting values as signed numbers or executing a register endianness inversion (swapping bytes/words) to cleanly decode 32-bit doublewords or floating-point values from different manufacturing standards.

Read Telemetry Events

Every single read request forces the system to track the transmission loop and fire one of three diagnostic events:

  • Successful Reading: The slave answered without errors; data is parsed into memory.
  • Modbus Exception: The slave responded with an official Modbus error packet (e.g., illegal address).
  • Response Timeout: The slave failed to respond entirely within the allowed window.

WRITE OPERATIONS (AT#RTUW)

To manipulate slave registers or force physical output changes on a peripheral, execute the AT#RTUW command. To ensure predictable bus timing and network stability, you can only write to a single destination or a single 32-bit variable per request. Broad batch writing is restricted.

Supported write function codes:

  • SINGLE COIL
    Modbus function code 05
  • SINGLE REGISTER
    Modbus function code 06
  • MULTIPLE REGISTER (2 registers, 32 bit)
    Modbus function code 16

It is not allowed to write multiple coils/registers in a single request.
A specific event is triggered for:

  • successful writing
  • modbus exception
  • response timeout