Laser Ranging Sensor UART【SEN0491】
Q1:What is the communication protocol for this sensor?
A1:The sensor adopts the industry standard Modbus protocol, the specific read and write format is as follows: Modbus communication, the command number is divided into two types, read command and write command, 0x03 (read command) reads the corresponding register data, 0x06 (write command) write data to the corresponding register.
Host sending frame (HEX)
The module address is 0x50 (default), the read command is 0x03, the register 0x34 (measurement distance), and the length is one bit. Command: 50 03 00 34 00 01 C8 45 Slave response frame (HEX)
The module address is 0x50, the read command is 0x03, and the length is 2 bits. Example: Read the measured distance Send command: 50 03 00 34 00 01 c8 45 Receive data: 50 03 02 07 0B 06 7F
Data analysis: 0x50 is Modbus address, 0x03 read command, 0x02 data length, 0x07 0x0B measurement data corresponding to 0x070B is decimal 1803, measurement distance is 1803mm, 0x06 0x7F is CRC check bit.
If you have other questions, just feel free to post them in our forum for consultation. We will reply them as soon as possible and improve the product FAQ gradually.