5C distance frame and 5A command frame — H-series and VB modules

Transcribed from the manufacturer's own manuals · byte strings verified against the source PDF · no reverse-engineered guesses

The module streams a 5C frame with the distance in little-endian and a checksum computed as the inverse of the sum from byte 2 to the second-to-last byte; commands use a 5A header.

Frame layout

输出帧:(该手册未印出完整示例帧) = 5C 固定帧头 1 字节 + 距离(小端)+ 校验 1 字节;校验 = 自第 2 字节加到倒数第 2 字节后取反。命令帧:5A | 功能码 | 02 | 数据… | Checksum,校验函数 Check_Sum() 规则相同(第 2 字节至倒数第 2 字节求和取反)。另含 IIC 接口:IIC 从机默认地址 0x52;文本层可解析的寄存器 0x00、0x01、0x02、0x03、0x0C、0x0D;读写用单寄存器写 / 多寄存器读序列(原文 6.2),换行被断开的寄存器行未强行补全。

Command set

CodeFunctionSendReplyNotes / page
0x0D读取序列号 Reading serial no.5A 0D 04 0D 0D 0D 0D BA5A 8D 04 10 01 00 00 5D · p5
0x16读取软件版本号 Read software version5A 16 02 16 16 BB5A 96 02 03 02 62 · p5
0x06UART 波特率设置 Baud rate setting5A 06 02 80 04 735A 86 02 80 04 F3 · p5
0x0B输出频率设置 Output frequency setting5A 0B 02 E7 03 085A 8B 02 E7 03 88 · p5
0x1B读取输出频率 Read frequency5A 1B 02 1B 1B AC5A 9B 02 31 00 31 · p5
0x1F切换至 IIC Switch to IIC5A 1F 02 1F 1F A05A 9F 02 1F 1F 20 · p5
0x0A停止测距 Stop ranging5A 0A 02 00 00 F35A 8A 02 00 00 73 · p5
0x0A启动测距 Start ranging5A 0A 02 02 00 F15A 8A 02 02 00 71 · p5
0x00IIC 寄存器 0x00 Distance-Highbyte(Read-only)IIC 寄存器 0x00(Read-only)2bytefordistance原文 6.3 Definitions of Registers · p7
0x01IIC 寄存器 0x01 Distance-Lowbyte(Read-only)IIC 寄存器 0x01(Read-only)2bytefordistance原文 6.3 Definitions of Registers · p7
0x02IIC 寄存器 0x02 Lasercontrol(Write-only)IIC 寄存器 0x02(Write-only)0:laseroff;1:laseron原文 6.3 Definitions of Registers · p7
0x03IIC 寄存器 0x03 LiDARID(Read-only)IIC 寄存器 0x03(Read-only)—原文 6.3 Definitions of Registers · p7
0x0CIIC 寄存器 0x0C IICSlaveAddress(Read/write)IIC 寄存器 0x0C(Read/write)—原文 6.3 Definitions of Registers · p7
0x0DIIC 寄存器 0x0D FactoryReset(Write-only)IIC 寄存器 0x0D(Write-only)Write0x01toperformfactoryreset原文 6.3 Definitions of Registers · p7

Timing and rates

p1 · MeasuringFrequency:200Hz p2 · 2 Frequency 200Hz(Alternative100/50/20/10/1Hz) p5 · =10Hz. p5 · 20/10/1Hz. p5 · 200Hz. p5 · 20/10/1Hz

Status codes and errors

p9 · - There is a risk of failure when using this product to measure high-reflective objects (such as 3M tapes)

What the source does not state

Where a manual prints an incomplete reply (for example only 55 for the LD constant-on acknowledgement), this page reproduces that and stops — it does not pad the frame. Anything not printed in the manual is absent here on purpose.

Models covered by this page

Source documents

Full transcription method: byte strings are asserted to exist in the extracted PDF text at build time, and re-checked against the page citation. If a string is not in the PDF, the page is not published.

Frequently asked questions

The same answers are published below as visible text and as FAQPage structured data, so the page and the markup cannot drift apart.

What baud rate does the LRF100H family use?
115200 bps, 8 data bits, factory default; 9600 bps is selectable.
How is the checksum computed?
Command frames sum bytes 3–7; replies sum bytes 1–7, taking the low 8 bits. The manual states the two ranges separately.

Related