Laser engraving and cutting system and method based on cooperative control of PLC and upper computer
The laser engraving and cutting system, controlled collaboratively by a PLC and a host computer, integrates engraving and cutting functions, solving the shortcomings of existing equipment in terms of intelligence and flexibility, and achieving efficient and high-precision processing of complex patterns.
Patent Information
- Application Number
- CN202511686009.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-02-27
AI Technical Summary
Existing laser engraving and cutting equipment has limitations in programmability, communication and interconnection capabilities, and intelligence level. It is difficult to achieve real-time processing of complex patterns, remote control, and collaborative operation with other intelligent devices. Furthermore, switching between engraving and cutting modes is inconvenient, making it impossible to efficiently complete complex tasks.
The laser engraving and cutting system adopts PLC and host computer collaborative control. The host computer processes complex patterns and generates control instructions, while the PLC executes motion control. Combined with image processing and path analysis algorithms, it realizes the integration of engraving and cutting functions, and uses HMI touch screen for real-time monitoring and virtual debugging.
It achieves a high degree of integration and intelligence in the laser engraving and cutting system, possessing flexibility and high precision, adapting to complex processing needs, exhibiting strong system stability and scalability, and supporting efficient processing of complex patterns.
Smart Images

Figure CN121578729A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser engraving technology, and in particular to a laser engraving and cutting system and method based on PLC and host computer collaborative control. Background Technology
[0002] Existing laser engraving and cutting equipment mostly uses numerical control systems (CNC) or microcontrollers as the control core. While CNC systems offer high precision, their programmability, communication and interconnection capabilities, and level of intelligence are limited, making it difficult to achieve real-time processing of complex patterns, remote control, and collaborative operation with other intelligent devices. Microcontroller systems, on the other hand, have shortcomings in handling complex data, multi-task coordination, and system stability. Furthermore, traditional equipment has limited functionality; engraving mode (processing grayscale images) and cutting mode (processing vector paths) are typically implemented by different software and hardware modules, making switching inconvenient and preventing the efficient completion of complex tasks within a single system. Therefore, those skilled in the art urgently need a new type of laser processing control system that is highly integrated, intelligent, and flexibly adaptable to complex processing requirements. Summary of the Invention
[0003] The purpose of this invention is to provide a laser engraving and cutting system and method based on the collaborative control of PLC and host computer. Through the collaborative division of labor between the host computer and PLC, intelligent and high-precision processing of complex patterns can be achieved, which solves the shortcomings of traditional CNC systems or single-chip microcomputer systems in terms of flexibility, computing power and multi-functional integration.
[0004] To achieve the above objectives, the present invention provides the following solution: a laser engraving and cutting system based on PLC and host computer collaborative control, comprising a physical layer, a control layer, and an interaction layer; wherein, the physical layer includes a laser, an XY-axis motion mechanism, a material stage, and various sensors; the control layer includes a PLC controller and a host computer; the interaction layer includes a human-machine interface and a digital twin simulation system for virtual monitoring and debugging; the host computer is used to run image processing algorithms and path parsing algorithms, corresponding to the two working modes of engraving and cutting, respectively, and generate control commands; the PLC is connected to the host computer and is used to receive the control commands generated by the host computer to complete the operation control of the physical layer.
[0005] Preferably, the host computer includes an image processing module, a path parsing module, and a communication module; the image processing module is used in carving mode to convert the input image into a pixel grayscale matrix and perform grayscale grading; the path parsing module is used in cutting mode to parse a custom code language and generate motion path instructions; the communication module is used to exchange data with the PLC controller via the TCP / IP protocol.
[0006] Preferably, the human-machine interface is an HMI touch screen, and the PLC controller is connected to the host computer and the HMI touch screen via an Ethernet switch.
[0007] Preferably, the XY axis motion mechanism is driven by a servo motor.
[0008] On the other hand, a laser engraving and cutting method based on PLC and host computer collaborative control is provided. The laser engraving and cutting is performed using the aforementioned PLC and host computer collaborative control system. The specific steps include the following:
[0009] In the host computer, the mode is selected. If the engraving mode is selected, the host computer runs the image processing algorithm to generate engraving control instructions; if the cutting mode is selected, the host computer runs the path parsing algorithm to generate cutting control instructions.
[0010] The PLC receives the engraving control command and the cutting control command from the host computer, and performs motion control on the actuators in the physical layer according to the engraving control command and the cutting control command.
[0011] The operating status and position information of the actuator are displayed in real time on the human-machine interface, realizing the visualization of the processing process.
[0012] Preferably, the specific steps of the carving process are as follows:
[0013] Select the engraving mode on the host computer, import the engraving image, and call the image processing module;
[0014] After receiving the engraved image, the image processing module performs grayscale conversion and hierarchical processing to obtain grayscale data.
[0015] The grayscale data is transmitted to the PLC in real time. The PLC converts the received grayscale value into a corresponding PWM duty cycle signal to control the laser power, and at the same time controls the XY axis servo motor to move at a constant speed, thereby engraving the grayscale image.
[0016] Preferably, the specific steps of the cutting process are as follows:
[0017] Select the cutting mode in the host computer, import the Excel file, and call the path parsing module;
[0018] The path parsing module parses and reads the base code of the Excel file, performs geometric decomposition and unit conversion to convert the base code into the pulse number of the PLC;
[0019] The pulse count is sent to the PLC register in real time, and the PLC drives the motor to move through relative positioning instructions.
[0020] Preferably, after the system is powered on, it also includes performing hardware self-test and reset operations. After the reset is completed, the PLC will send a reset completion signal back to the host computer and the human-machine interface.
[0021] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0022] (1) High integration and intelligence: The engraving and cutting functions are integrated, and the complex patterns are processed by the computing power of the host computer, overcoming the bottleneck of insufficient PLC computing power and realizing truly intelligent processing.
[0023] (2) Flexibility and scalability: By adopting a software-defined function approach, new processing patterns and processes can be adapted by modifying the host computer program, making it easy to upgrade and expand.
[0024] (3) High precision and reliability: Combining the stable motion control and high pulse processing capabilities of the PLC with the precise path interpolation algorithm of the host computer, the processing accuracy is guaranteed. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a system module diagram of the present invention;
[0027] Figure 2 This is a flowchart of the laser processing of the present invention;
[0028] Figure 3 This is a flowchart illustrating the engraving process of the present invention. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] The purpose of this invention is to provide a laser engraving and cutting system based on PLC and host computer collaborative control, comprising a physical layer, a control layer, and an interaction layer. The physical layer includes a laser, an XY-axis motion mechanism, a material stage, and various sensors. The control layer includes a PLC controller and a host computer. The interaction layer includes a human-machine interface and a digital twin simulation system for virtual monitoring and debugging. The host computer runs image processing and path parsing algorithms, corresponding to the engraving and cutting modes respectively, and generates control commands. The PLC is connected to the host computer and receives the control commands generated by the host computer to complete the operation control of the physical layer.
[0031] The host computer includes an image processing module, a path parsing module, and a communication module. The image processing module is used in the carving mode, converting the input image into a pixel grayscale matrix and performing grayscale grading. The path parsing module is used in the cutting mode, parsing the custom code language and generating motion path instructions. The communication module is used to exchange data with the PLC controller via the TCP / IP protocol.
[0032] Furthermore, the human-machine interface is an HMI touchscreen, and the PLC controller is connected to the host computer and the HMI touchscreen via an Ethernet switch. The XY axis motion mechanism is driven by servo motors.
[0033] like Figure 1 As shown, the hardware connections of the laser engraving and cutting system mainly include: an aluminum profile frame forming the overall structure; a synchronous belt module for movement along the X and Y axes; a high-power laser attached to the motion module; limit sensor devices for ensuring the safe and stable operation of the worktable; a rotary work platform containing motors and proximity switches; a Mitsubishi GS2107-WTBD touchscreen for real-time monitoring and operating system status; and mechanical and electrical mounting plates providing various mounting holes. The electrical mounting plate mainly houses a Mitsubishi PLC FX5U-64MT / ES, a servo amplifier MR-JE-10A, and a frequency converter FR-D720S. The PLC is connected to the host PC and HMI touchscreen via an Ethernet switch.
[0034] The method of this invention is a collaborative control mechanism, in which the host computer is responsible for "decision-making" and "calculation," while the PLC is responsible for "execution" and "monitoring." The two communicate via Ethernet. The host computer sends the processed data stream to the PLC, and the PLC sends a feedback signal after completing the current action to request the next batch of data, thus forming a closed-loop control.
[0035] On the other hand, a laser engraving and cutting method based on PLC and host computer collaborative control is provided, which utilizes a laser engraving and cutting system based on PLC and host computer collaborative control for laser engraving and cutting, such as... Figure 2 As shown, the specific steps include the following:
[0036] Step 1: Select the mode in the host computer. If the engraving mode is selected, the host computer will run the image processing algorithm to generate engraving control instructions; if the cutting mode is selected, the host computer will run the path parsing algorithm to generate cutting control instructions.
[0037] Step 2: The PLC receives the engraving control instructions and the cutting control instructions from the host computer, and performs motion control on the actuators in the physical layer according to the engraving control instructions and the cutting control instructions.
[0038] Step 3: The operating status and position information of the actuators are displayed in real time on the human-machine interface, realizing the visualization of the processing process.
[0039] Furthermore, it also includes system initialization and reset procedures:
[0040] After the system is powered on, initialization and reset operations must be performed first to ensure that all components are in a known initial state.
[0041] (1) Power-on and hardware self-test: Close the main circuit air switch, and the 220V AC power is converted to 24V DC power by the transformer to power the PLC, sensors and other low-voltage equipment. After the PLC starts, it reads the status of each limit switch and encoder and performs a hardware self-test.
[0042] (2) Execute the reset operation: After receiving the reset signal, the PLC executes the reset program:
[0043] The PLC drives the XY axis servo motors to move to the mechanical origin via the DDRVI relative positioning command.
[0044] When the motor triggers the origin sensor, the PLC uses the DHIOEH instruction to clear the encoder value in the high-speed counter to zero, thereby setting the current position as the coordinate zero point.
[0045] After the reset is complete, the PLC sends a "Reset Complete" signal back to the HMI and the host computer, and the indicator light on the HMI changes from flashing to solid.
[0046] Furthermore, in this embodiment, as Figure 3 As shown, when grayscale image engraving is required, follow the specific steps of the engraving process:
[0047] Step 1: In the host computer PC software, select "Engraving Mode" and import an image that needs to be precisely engraved;
[0048] Step 2: The software calls the image processing module to scale the color or black and white image to 256x256 pixels and perform grayscale or binarization processing.
[0049] Step 3: Subsequently, the software writes the grayscale level data line by line into the designated data register (D area) of the PLC. Based on the received grayscale values, the PLC program outputs signals with different duty cycles to the laser through the built-in PWM instruction, while simultaneously controlling the XY axis servo motors to move at a constant speed, thereby engraving the grayscale image.
[0050] It's important to note that during binarization, a basic global thresholding method is used. A global threshold is selected; pixels with values greater than this threshold are assigned a value of 255, and those with values less than this threshold are assigned 0. White is assigned 255, and black is assigned 0. During grayscale conversion, since the grayscale value range of an image is generally from 0 to 255, and in actual engraving, the range of color depths observable by the human eye in laser-engraved wood patterns is relatively narrow, the program further divides the values within the 0-255 range into 0-14 levels for processing. The processed grayscale levels correspond to the power intensity at different points during laser engraving, and the data can be stored in an Excel spreadsheet for easy retrieval and inspection.
[0051] Once communication between the PC and PLC is successful, the data processed by the PC program is read and written to the PLC in real time during the engraving process. Specifically, the Python program running on the PC writes the grayscale values of all processed points in a row to the controller register and reads the values of key registers to determine the current laser engraving status and sends feedback to the PC. If the row has been successfully assigned values, the row count is incremented and the program returns to the start point to check if the row count is greater than 255, indicating whether engraving is complete. If engraving is complete, the communication channel between the laser and PLC is closed. Before engraving is complete, the PLC controller converts the grayscale data of all points in that row transmitted from the PC into PWM duty cycle data and sequentially imports it into PWM instructions, controlling the grayscale of the actual engraved image by controlling the laser intensity. After the last row is assigned values and the process is complete, the laser is turned off, and an engraving completion signal is returned to the main interface.
[0052] Furthermore, the core of the entire cutting process is parsing and executing the base code from the Excel spreadsheet. The program first imports and converts the data in the Excel file, then checks the flag signals of the PLC (Programmable Logic Controller), and then executes the corresponding actions based on different cutting modes (line, circle, diagonal line). When vector graphics cutting is required, follow these specific steps:
[0053] Step 1: Data Import and Conversion: Use the Pandas module to read the Excel spreadsheet, store the data in a list, and perform necessary unit conversions to convert it into pulse counts that the PLC can understand;
[0054] Step 2, Readiness Check: The program continuously checks the "Motion Completed" flag in the PLC. The program will only continue running if this signal is "0" (indicating the device is idle) and there are still unexecuted commands in Excel.
[0055] Step 3, Mode Selection and Execution: Based on the mode code (such as lin, cir, xlin) in the first column of the Excel spreadsheet, call the corresponding subroutine (straight line, circular engraving, or oblique line cutting).
[0056] Step 4, Command Execution and Looping: After executing a single command, check the "Motion Completed" signal again. Execute the next command only after completion, continuing until all commands have been executed, and finally turn off all signals.
[0057] Throughout the engraving or cutting process, the HMI touchscreen displays real-time information such as the XY coordinates of the laser head and its current operating status. The digital twin system synchronously displays the movement of the virtual model, achieving simultaneous monitoring of the virtual and real worlds.
[0058] Furthermore, the straight-line cutting procedure in the cutting mode is as follows:
[0059] Step 1, Pattern Recognition: The pattern is read as lin.
[0060] Step 2, Status Check: Check if the PLC's "Motion Completed" signal is 0 and if the previous instruction has ended.
[0061] Step 3, Laser Control: Read the data in the second column of Excel. If it is 1, turn on the laser (set the laser PWM register to 1); if it is 0, turn off the laser (set the laser PWM register to 987).
[0062] Step 4, Motion Control:
[0063] The movement distance in Excel is converted into pulse counts and written to the specified PLC register. To ensure successful data writing, the register is read again for verification. If the assignment is successful, the relay controlling the movement in the corresponding direction in the PLC is set to 1 to initiate the movement.
[0064] Step 5: Completion Judgment: After the movement is completed, read the relay indicating the completion of the movement in the PLC and determine if it is set to 1. If the movement is complete, clear the corresponding motor run instruction in the PLC and determine if the table command has been completed. If the command has not yet been completed, continue to the next command. If the command has been completed, turn off all signals and return to the completed instruction, ending the entire process.
[0065] Furthermore, the circular engraving program in cutting mode is as follows:
[0066] Step 1: Pattern Recognition and Data Preprocessing
[0067] Upon reading the pattern "cir", the program first checks if the number of steps is 0. If it is, it calls the data processing subroutine.
[0068] Data processing: After importing the radius and angle of the circle to be run, the entire arc is divided into multiple small line segments every 5 degrees. Based on the quadrant of the arc (0-90°, 90-180°, 180-270°, 270-360°) or positive and negative angles, trigonometric functions (sin / cos) are used to calculate the pulse increment required for each step in the forward / backward and left / right directions.
[0069] After processing, three lists will be generated: a list of pulse values, a list of corresponding PLC registers, and a list of directional relays, and the total number of running steps will be obtained.
[0070] Step 2, Real-time Cutting Control:
[0071] Status check: Check whether the movement is complete, whether the previous instruction has ended, whether the overall command has not been completed, and whether the current circle has not completed its steps.
[0072] Laser control: Similar to linear cutting, the laser switch is controlled based on the data in the second column of Excel.
[0073] Motion control: Retrieve the pulse data, register and relay information of the current step from the pre-processed list, write it into the PLC and start the motion.
[0074] Stepping and Looping: After completing one step, determine whether all the steps of the circle have been completed.
[0075] If not completed, return and proceed to the next step.
[0076] If the operation is complete, clear the motor command and check if there is another command in the Excel spreadsheet to decide whether to continue or terminate the process.
[0077] Furthermore, the oblique cutting procedure in the cutting mode is as follows:
[0078] Step 1: Pattern Recognition and Data Preprocessing
[0079] The mode is read as xlin. Similarly, the number of steps is checked first; if it is 0, the data processing subroutine is called.
[0080] Data processing: Divide the diagonal line into 50 equal parts. Based on the range of the tilt angle (0-90°, 90-180°, -90-0°, -180° to -90°), use trigonometric functions to calculate the movement components (number of pulses) in the left-right and forward-backward directions for each step.
[0081] After processing, three lists are generated: pulse value, PLC register, and direction relay, and the total number of running steps is obtained.
[0082] Step 2, Real-time Cutting Control:
[0083] The control logic for this part is basically the same as that of the circular engraving program. It performs status checks and laser control. Data is retrieved from the preprocessing list, and the PLC is controlled to execute each step of the compound motion. After 50 steps, it determines whether to execute the next Excel command or terminate the process.
[0084] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A laser engraving and cutting system based on PLC and host computer collaborative control, characterized in that, It comprises a physical layer, a control layer, and an interaction layer. The physical layer includes a laser, an XY-axis motion mechanism, a material stage, and various sensors. The control layer includes a PLC controller and a host computer. The interaction layer includes a human-machine interface and a digital twin simulation system for virtual monitoring and debugging. The host computer runs image processing and path parsing algorithms, corresponding to carving and cutting modes respectively, and generates control commands. The PLC is connected to the host computer and receives the control commands generated by the host computer to control the operation of the physical layer.
2. The laser engraving and cutting system based on PLC and host computer collaborative control according to claim 1, characterized in that, The host computer includes an image processing module, a path parsing module, and a communication module. The image processing module is used in carving mode to convert the input image into a pixel grayscale matrix and perform grayscale grading. The path parsing module is used in cutting mode to parse custom code language and generate motion path instructions. The communication module is used to exchange data with the PLC controller via TCP / IP protocol.
3. The laser engraving and cutting system based on PLC and host computer collaborative control according to claim 1, characterized in that, The human-machine interface is an HMI touch screen, and the PLC controller is connected to the host computer and the HMI touch screen through an Ethernet switch.
4. The laser engraving and cutting system based on PLC and host computer collaborative control according to claim 1, characterized in that, The XY axis motion mechanism is driven by a servo motor.
5. A laser engraving and cutting method based on PLC and host computer collaborative control, characterized in that, The laser engraving and cutting system based on PLC and host computer collaborative control, as described in any one of claims 1-4, includes the following specific steps: In the host computer, the mode is selected. If the engraving mode is selected, the host computer runs the image processing algorithm to generate engraving control instructions; if the cutting mode is selected, the host computer runs the path parsing algorithm to generate cutting control instructions. The PLC receives the engraving control command and the cutting control command from the host computer, and performs motion control on the actuators in the physical layer according to the engraving control command and the cutting control command. The operating status and position information of the actuator are displayed in real time on the human-machine interface, realizing the visualization of the processing process.
6. The laser engraving and cutting method based on PLC and host computer collaborative control according to claim 5, characterized in that, The specific steps of the carving process are as follows: Select the engraving mode on the host computer, import the engraving image, and call the image processing module; After receiving the engraved image, the image processing module performs grayscale conversion and hierarchical processing to obtain grayscale data. The grayscale data is transmitted to the PLC in real time. The PLC converts the received grayscale value into a corresponding PWM duty cycle signal to control the laser power, and at the same time controls the XY axis servo motor to move at a constant speed, thereby engraving the grayscale image.
7. The laser engraving and cutting method based on PLC and host computer collaborative control according to claim 5, characterized in that, The specific steps of the cutting process are as follows: Select the cutting mode in the host computer, import the Excel file, and call the path parsing module; The path parsing module parses and reads the base code of the Excel file, performs geometric decomposition and unit conversion to convert the base code into the pulse number of the PLC; The pulse count is sent to the PLC register in real time, and the PLC drives the motor to move through relative positioning instructions.
8. The laser engraving and cutting method based on PLC and host computer collaborative control according to claim 5, characterized in that, After the system is powered on, it also includes performing hardware self-test and reset operations. After the reset is completed, the PLC will send a reset completion signal back to the host computer and the human-machine interface.