Manual

www.ydlidar.com Copyright 2015-2018 Ydlidar Team
4 / 12
0xD0
Ranging frequency setting
-
Single
response
0xD1
Get the current ranging frequency
-
Single
response
0x40
Soft restart
-
No response
System messages
The system message is a response message that the system feeds back based on the received system
command. According to different system commands, the reply mode and response content of the
system message are also different. There are three kinds of response modes: no response, single
response, continuous response.
No response means that the system does not return any messages. A single reply indicates that the
system's message length is limited, and the response ends once. Sustained response means that the
system's message length is infinite and needs to send data continuously, such as when entering the
scan mode.
The one-time response and continuous response messages use the same data protocol. The contents
of the protocol are: start sign, response length, response mode, type code and response content, and
are output through the serial port hexadecimal system.
FIG 2 YDLIDAR G4 SYSTEM MESSAGE DATA PROTOCOL
Start sign
Response
length
Response mode
Type code
Content
16bits
30bits
2bits
8bits
-
FIG 3 YDLIDAR G4 SYSTEM MESSAGE DATA PROTOCOL
Start sign: G4's message sign is unified as 0xA55A.
Response length: When the answer mode is continuous, the length should be infinite, so this
value is invalid.
Response mode: This bit is only 2 bits, which means this time it is a single response or
continuous response. Its value and corresponding mode are as follows:
CHART 3 YDLIDAR G4 RESPONSE VALUE
Mode
0x0
0x1
0x2
0x3
Response mode
Single
response
continuous
response
Undefined
Type code: Different system commands correspond to different types codes.
Content: Different system commands, feedback different data content, and their data protocols
are also different.
HH
LL
HH
LL
HH
LL
LL
‥‥
Start sign
Response length
Response mode
Type code
Content
Byte offset
Byte
0
2
4
6
7