Modbus defines four different object types form which values can be read: Coils, Discrete Inputs, Input Registers, and Holding Registers. Of those four, Coils and Holding Registers can also be written to. Coils and Discrete Inputs hold single bit values while Input Registers and Holding Registers hold 16 bit values. For values that cannot fit into 16 bit, it is customary to use multiple consecutive registers to hold the value. Modbus does not define what the bytes in the registers represent; it is up to the creator of the Modbus Slave Device to specify how to interpret the stored bits. A 16 bit register could be used to hold a single byte value, for example, or four consecutive registers could hold a double precision floating point number. Storing texts as ASCII characters is also possible. For integer numbers in particular it there is no defined byte order, nor signage definition. Because of those ambiguities it is not possible for the Lobaro LoRaWAN Bridge to understand the data read from/written to Slave Devices. All communications therefore simply forward raw Modbus Commands and Responses with their payload, as it communicated on the Bus. Any check sums (CRC16 for RTU, LRC for ASCII) are excluded from LoRaWAN communications or the Bridge's configuration, as there are other check sums in work their already.

For a deeper introduction into Modbus please refer to https://en.wikipedia.org/wiki/Modbus.


Online Tools


Examples of Modbus commands:


MbCmd0 0/5 * * * *:R,9600,8N1:010300160002,010300260002,fa0400050001


0 0/5 * * *      Cron (every 5 minutes)

R,9600,8N1   communication parameters (9600 baud, 8 data bits, no parity)

Modbus Command:

010300260002

01 03 00 26 00 02

01 Slave Address
03 Function (Read Holding Register)
00 Starting Address Hi
26 Starting Address Lo (Decimal 38)
00 Quantity of Registers Hi
02 Quantity of Registers Lo (Decimal 2)

Read 2 holding registers of Slave 1, starting at register 38

For detailed information see "Modbus related Parameters" here:

Hybrid Modbus Gateway






  • No labels