Share this

Laser ranging system based on HOLLiAS LM series PLC

2026-04-06 03:22:32 · · #1
Abstract : This system uses a HOLLiAS LM series small PLC as its core and employs free-port communication technology to monitor multiple laser rangefinders, realizing data acquisition and processing of the laser rangefinder system. Keywords : PLC, laser rangefinder, free-port communication With the development of laser technology, laser rangefinders have been increasingly used in the detection field. This paper studies a laser rangefinder system based on a HOLLiAS LM series PLC, which processes data collected by multiple laser rangefinders and transmits the data to a host computer, realizing the monitoring of multiple laser rangefinders. 1. Basic Principle of Laser Rangefinder The basic principle of a laser rangefinder is to determine the distance between targets by measuring the time required for a laser to travel to and from the target. The principle and structure of a laser rangefinder are very simple, making it the most effective means of long-distance detection. When a laser rangefinder works, a laser diode first emits a laser pulse towards the target. After being reflected by the target, the laser is scattered in all directions. Partially scattered laser light returns to the sensor's receiver, is received by the optical system, and imaged onto an avalanche photodiode. An avalanche photodiode is an optical sensor with internal amplification capabilities, capable of detecting extremely weak light signals. By recording and processing the time it takes for the laser pulse to travel from emission to return, the distance to the target can be obtained. 2. PLC Control System Hardware Design The functional structure diagram of the laser ranging system based on the HOLLiAS LM series PLC is shown in Figure 1. The system receives data from multiple laser ranging sensors via the PLC's freeport communication, parses the data packets according to the data format provided by the sensors, and calculates the measured distance. The system's functions also include displaying the measured distance, alarming in abnormal situations, and exchanging data with a host computer. The PLC's CPU module is the HOLLiAS LM series LM3108 module, which offers a high performance-to-price ratio and is widely used in various fields of industrial control. The standard configuration of the LM3108 module includes two serial communication interfaces, PORT0 and PORT1, where PORT0 is an RS485 interface and PORT1 is an RS232 interface. Communication between the PLC and the host computer is established using an RS232 interface to enable PLC program downloading and monitoring. Communication between the PLC and field instruments is established using an RS485 interface. [align=center]Figure 1 Functional structure diagram of the laser ranging system[/align] 3. PLC Control System Software Design The PLC uses free-port communication to receive data from the laser ranging sensor, using 12 bytes from %MB400 to %MB411 as the communication receive register to store the data received in free-port communication mode. Free-port communication means that users can change the parameters of the communication interface by setting the communication mode to adapt to different communication protocols. The communication parameters of the laser ranging sensor set in the PLC program are shown in Table 1. The PLC control program is completed using PowerPro programming software from Hollysys. The data parsing program is described in detail below. Other application programs are omitted. [align=center]Table 1 Communication Parameters of Laser Ranging Sensor[/align] 3.1 Variable Definitions in the Data Parsing Program PROGRAM PLC_PRG VAR SetRS485: Set_COMM2_PRMT; (* RS485 free port communication parameter settings*) SetRS485Q: BOOL; (* RS485 free port communication parameter setting flag*) Receive: COMM2_RECEIVE; (* RS485 free port communication data reception*) ReceiveQ: BOOL; (* RS485 free port communication data reception flag*) ReceivedData: STRING; (* String storing ASCII data*) Position1: INT; (* Position of the start character*) Position2: INT; (* Position of the end character*) ReceivedData_STRING: STRING; (* Data in ASCII format*) ReceivedData_DWORD: DWORD; (* Data in hexadecimal format*) END_VAR 3.2 Ladder Diagram of Data Parsing Program 3.3 Data Parsing Program Analysis The data received by the PLC from the laser ranging sensor is in ASCII code format, so it needs to be converted into hexadecimal numbers that the PLC can operate on. First, find the starting character "+" in the string "ReceivedData" storing the ASCII code data and store its position in the variable "Position1". Then find the ending character "$R" and store its position in the variable "Position2". Extract the characters between positions "Position2" and "Position1" and store them in the variable "ReceivedData_STRING", which is the ASCII code form of the data. Finally, convert the ASCII code data "ReceivedData_STRING" into hexadecimal data "ReceivedData_DWORD", thus completing the data parsing. 4. Conclusion Using the Hollias LM series PLC as the control core of the laser ranging system allows for convenient communication with the laser ranging sensor. Practice has proven that this scheme has a simple structure, stable and reliable operation, and realizes the data acquisition and processing of the laser ranging system.
Read next

CATDOLL Q Soft Silicone Head

You can choose the skin tone, eye color, and wig, or upgrade to implanted hair. Soft silicone heads come with a functio...

Articles 2026-02-22