YDLIDAR F4PRO DEVELOPMENT MANUAL Doc #:01.13.000032 文档编码:01.13.
CONTENTS Working Mechanism ......................................................................................................................... 2 System workflow ......................................................................................................................... 2 System Communication .................................................................................................................... 3 Communication mechanism..........................................................
WORKING MECHANISM The YDLIDAR F4PRO (F4PRO) sets 3 operating modes: Idle mode, Scan mode, and Stop mode. For some users' needs, a new power-off protection mode was added in the scan mode; Idle Mode: When F4PRO is powered on, the default is idle mode. In idle mode, the F4PRO's ranging unit does not work and the laser is not lit. Scan mode: When the F4PRO is in scan mode, the ranging unit turns on the laser and starts to work.
SYSTEM COMMUNICATION Communication mechanism The F4PRO communicates commands and data with external devices through the serial port. When an external device sends a system command to F4PRO, F4PRO resolves the system command and returns a corresponding response message. According to the command content, F4PRO switches the corresponding working status. According to the content of the message, the external system can parse the message and obtain the response data.
Set the direction of motor rotation counterclockwise Single response Get motor rotation direction information Single response Increase 0.1Hz scan frequency Single response Reduce 0.
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.
FIG5 SCAN COMMAND RESPONSE CONTENT DATA STRUCTURE CHART 4 SCAN COMMAND RESPONSE CONTENT DATA STRUCTURE DESCRIPTION Content Name Description The length is 2B, which is 0x55AA. The low one is in the front and the high one is in the back. Packet header PH(2B) Packet type Indicates the type of the current packet; 0x00: Cloud packet 0x01: Zero packet.
That is, the number of response content bytes is 20. The response is a single response, the type code is 04, the type of response content meets the following data structure: Byte offset 0 Model # 1 2 3 4 Firmware ver. ‥ 5 Hardware ver. 19 Serial number FIG 9 YDLIDAR F4PRO DEVICE INFORMATION RESPONSE CONTENT DATA STRUCTURE Model:1 byte, F4PRO's model code is 04; Firmware Ver.:2 bytes. The low byte is the major version number, and the high byte is the minor version number; Hardware Ver.
A5 5A 01 00 Start 00 00 Length 04 01 Mode Type code Content FIG 12 YDLIDAR F4PRO LOW POWER CONSUMPTION According to the protocol: response length = 0x00000001, answer mode = 0x0, type code = 0x04. That is, the number of response content bytes is 1; this response is a single response and the type code is 04. The command response is fixed at 0x01, indicating that the system is enabled for low power consumption. The F4PRO enables low power consumption by default.
FIG 14 YDLIDAR F4PRO MOTOR DIRECTION According to the protocol: response length = 0x00000001, answer mode = 0x0, type code = 0x04. That is, the number of response content bytes is 1; this response is a single response and the type code is 04. The response content indicates the currently set rotation direction, 00 indicates clockwise rotation, and 01 indicates counterclockwise rotation.
Constant frequency enable [A5 0E] This command is used to enable the system constant frequency. After it is turned on, when the lidar is in scanning mode, it will automatically adjust the speed so that the scanning frequency is stable at the currently set scanning frequency.
According to the protocol: response length = 0x00000001, answer mode = 0x0, type code = 0x04. That is, the number of response content bytes is 1. This response is a single response with a type code of 04.
Restart [A5 80] When an external device sends a command (A5 80) to F4PRO, F4PRO will enter a soft reboot and the system will restart. This command does not answer. Standby control The F4PRO integrates the power control of the system into the command interface of the system, not the hardware interface. Therefore, the user only needs to send the corresponding control command (A5 01/02) to enable/disable the low-power state of the system.