Manual
www.ydlidar.com Copyright 2015-2018 YDLIDAR Team
5 / 12
Response length: The response length indicates the length of the response content. However,
when the answer mode is continuous, the length should be infinite, so the value is invalid;
Response mode: This bit is only 2 bits, indicating that the packet is a single response or
continuous response. Its value and corresponding mode are as follows:
CHART 3 YDLIDAR F4PRORESPONSE MODE VALUE AND CORRESPONDING
RESPONSE
Response mode
0x0
0x1
0x2
0x3
Response mode
Single response
Continuous
Undefined
Type code: Different system commands correspond to different type codes;
Response content: Different system commands, feedback different data content, and their data
protocols are also different.
Note 1: The data communication of F4PRO adopts the little-endian mode with the low-order first.
Note 2: In the response message, the lower 6 bits of the 6th byte belong to the response length and the upper 2
bits belong to the answer mode.
。
DATA PROTOCOL
Different system commands have different packet contents. Different types of coded messages do not
have the same data protocol for the response. Therefore, the user needs to parse the data in the
response content according to the corresponding data protocol, such as point cloud data, device
information, and the like.
Scan command [A5 60]
When an external device sends a scan command to F4PRO, F4PRO enters scan mode and feeds back
point cloud data. The reply message is:
FIG 4 YDLIDAR F4PRO SCAN COMMAND
The 6th byte is high, which is 01, so the answer mode value is 0x1, which is a continuous response.
The reply length is ignored and the type code is 0x81;
The response content is the point cloud data scanned by the system. According to the following data
structure, it sends to the external device in hexadecimal to the serial port.
40
A5
5A
05
00
00
81
‥‥
Start
Length
Mode
Type code
Content
LL
HH
LL
HH
LL
HH
LL
HH
LL
HH
LL
HH
LL
HH
‥‥
PH
CT
FSA
LSA
CS
S1
S2
‥‥
LSN
Byte offset:
0
2
4
6
8
10
12