User's Manual
LX-80 User Manual
Page 22 of 32
6.3. Modbus Protocol (RS-485)
The unit responds to Modbus requests over RS-485 dana line. The baud rate is
configured through the PC application, and 1 stop bit, even parity, 8 data bits
configuration is used.
Modbus registers that are accessed by Modbus protocol are 16-bit (2-byte) registers.
Any number of registers can be read or written over Modbus.
Modbus is a request-response protocol where a master (such as datalogger) sends
out requests, and slave devices (such as LX-80 sensor) responds. The request and
response format, with example is given in tables 3-6.
In each request, the master can either ask the slave to retrieve value of one or more
registers, or the master can set the value of one or more registers. Each register holds
one 16-bit value.
Table 3. Master request format
Name
Addr
Fun
Data start Addr
Data#of regs
CRC16
Length
1
byte
1 byte
2 bytes (H,L)
2 bytes (H,L)
2 bytes (L,H)
Example
0X01
0X03
0X00
0X00
0X00
0X01
0X84
0X0A
Table 4. Request example
Name
Content
Detail
Address
0X01
Slave address (Sensor id)
Function
0X03
Read slave info
Data start Addr
0X00
The address of the first register to read (HIGH)
0X00
The address of the first register to read (LOW) – Sensor
ID reg
Data of regs
0X00
High
0X01
Low (read only 1 register)
CRC16
0X84
CRC Low
0X0A
CRC High
Table 5. Slave (sensor) response format
Name
Addr
Fun
Byte
count
Data
CRC16
Length
1 byte
1 byte
1 byte
2 bytes(H,L)
2 bytes(L,H)
Example
0X01
0X03
0X02
0X00
0X01
0X79
0X84