Modbus rtu

Avior can operate as a Master in a network of devices that support the MODBUS RTU protocol connected to the COM port (RJ45).


 TECHNICAL NOTE

The COM port is active with external power supply (main or auxiliary) present, it does not work when the device is powered by the battery alone.
A special converter is available to convert the COM port into RS485.

Function available from version FW 02.30.


READ REQUEST


Using the AT#RTUR command it is possible to read from a peripheral:


  • COILS
    Modbus function code 01
  • DISCRETE INPUTS
    Modbus function code 02
  • HOLDING REGISTERS
    Modbus function code 03
  • INPUT REGISTERS
    Modbus function code 02


Up to 32 data (bit, word, doubleword or float) can be read in a single request. Reading options:

  • read data as signed number
  • invert the endianess of the registers composing a doubleword


A specific event is triggered for:

  • successful reading
  • modbus exception
  • response timeout


WRITE REQUEST


Using the AT#RTUW command it is possible to write into a peripheral:


  • SINGLE COIL
    Modbus function code 05
  • SINGLE REGISTER
    Modbus function code 06
  • MULTIPLE REGISTER (2 registri, 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