Laser synchronous delay method based on data sampling interpolation
By using data sampling and interpolation technology and buffer technology in the laser cutting system, the delay of the laser power signal and enable signal is achieved, solving the problem of motor motion lag over laser power, and improving the synchronization and accuracy of cutting.
Patent Information
- Application Number
- CN202411583073.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-18
AI Technical Summary
During laser cutting, the motor movement lags behind the laser power, resulting in problems such as not cutting through or burning corners, especially when cutting half-cut or multi-layer fabrics.
Using laser synchronization delay method based on data sampling and interpolation, the laser power signal and enable signal delay is achieved through the coarse interpolation module, the fine interpolation module and the laser signal delay control module, so as to achieve the effect of synchronization with the motor motion. .
The synchronous motion of laser and motor is realized, the laser power and enable signal control during the cutting process are optimized, the problems of not cutting through and corner burning are avoided, and the cutting accuracy is improved.
Smart Images

Figure CN119472516A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of laser cutting, and in particular to a laser synchronization delay method based on data sampling and interpolation. Background Art
[0002] Laser cutting uses a high-energy-density laser beam to irradiate the surface of the workpiece, causing the workpiece to reach its melting point or boiling point, while high-pressure gas coaxial with the beam blows away the molten or vaporized metal. As the relative position of the beam and the workpiece moves, a slit is eventually formed in the material, thereby achieving the purpose of cutting. Generally, the movement of the laser beam or the workpiece is controlled by a motor, and the laser is controlled by power PWM and the laser switch light enable signal. In order to avoid situations such as not cutting through or burning the material, the faster the cutting speed, the greater the cutting power, and vice versa, which requires synchronous laser control and motor movement control. The conventional practice is to plan the speed according to the path of the cutting pattern, output the corresponding pulse amount and pulse period to the motor, and at the same time output the laser power and laser enable signal proportional to the cutting speed.
[0003] However, due to factors such as the response delay of the motor driver, belt stretching, gear clearance, motor start-up delay, and the laser's own light on and off delay, the laser switch time, laser power, and motor movement position are not synchronized. If the laser lags behind the motor movement, the cutting starting point will not be able to cut through. If the motor response lags behind the laser, when cutting a rectangle, the laser power at the four corners will be too large, burning through the corners, and not cutting through the corners. Especially when cutting half or multiple layers of fabric, the synchronization problem of the laser and the motor is particularly tested. At present, most of the laser delay synchronization technologies solve the problem of delaying the start of cutting or emitting light in advance, or delaying the light at the end of cutting. It does not take into account the synchronization problem of the laser power signal and the cutting movement during the entire cutting process. Summary of the invention
[0004] The purpose of the present invention is to solve the problem in the prior art that the motor movement lags behind the cutting of the laser power during the laser cutting process, and to propose a laser synchronization delay method based on data sampling interpolation.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A laser synchronization delay method based on data sampling interpolation includes a coarse interpolation module, a fine interpolation module, and a laser signal delay control module, and includes the following steps:
[0007] S1, coarse interpolation module: divide the small processing line segment into a feed segment of an interpolation cycle, perform an interpolation operation in each interpolation cycle, calculate the coordinate pulse increment of each motor axis of the next interpolation point, the coordinate pulse cycle, the corresponding laser power PWM and laser enable data, and store the interpolation data in a ring buffer;
[0008] S2, fine interpolation module: the data obtained by coarse interpolation synchronously outputs pulse data to the servo driver, laser PWM signal and laser enable signal to the laser;
[0009] S3, laser signal delay control module: when reading interpolation data during fine interpolation, if the laser delay parameter is set, the laser power PWM and laser enable data of the current interpolation cycle are stored in a set of circular buffers in sequence, and the circular buffers are traversed from back to front in sequence to accumulate the time of each interpolation cycle. When the accumulated time is greater than the laser delay parameter, the laser power and enable signal data corresponding to the current interpolation cycle are found.
[0010] Preferably, the ring buffer can store data of 32 interpolation cycles, and this process is defined as a coarse interpolation process.
[0011] Preferably, the laser delay cannot be less than one interpolation period, and the interpolation period is 200 microseconds.
[0012] Preferably, the laser delay cannot be greater than the total interpolation time of the 256-level cache area that caches the laser PWM signal. Calculated as 200 microseconds, the maximum delay is less than 200*256=51,200 microseconds.
[0013] Preferably, in S1, according to the data sampling interpolation principle and at a given speed of the user program, the small processing line segment is divided into a feed segment of an interpolation cycle, and an interpolation operation is performed in each interpolation cycle to calculate the coordinate pulse increment of each motor axis of the next interpolation point, the coordinate pulse cycle, the corresponding laser power PWM and laser enable data, and the interpolation data is stored in a ring buffer.
[0014] Preferably, in S2, the data obtained by the rough interpolation are taken out in sequence, and then the pulse data are synchronously output to the servo driver, the laser PWM signal and the laser enable signal are output to the laser.
[0015] Preferably, in S3, when fine interpolation reads interpolation data, if the laser delay parameter is set, the laser power PWM and laser enable data of the current interpolation cycle are sequentially stored in a group of 256-level circular buffers, and the circular buffers are traversed from back to front in sequence to accumulate the time of each interpolation cycle. When the accumulated time is greater than the laser delay parameter, the laser power and enable signal data corresponding to the current interpolation cycle are found.
[0016] In the present invention, the beneficial effects of the laser synchronization delay method based on data sampling and interpolation are as follows:
[0017] The data sampling interpolation technology and buffer technology are adopted, and adjustable laser delay parameters are provided, which will delay the laser power signal and the enable signal behind the motor pulse signal to achieve the effect of synchronous movement of the laser and the motor. Not only can the laser output be delayed at the start and end, but also the laser power and the enable signal can be controlled to be delayed behind the motor pulse signal during the overall movement process.
[0018] The present invention only uses software technology means, without external circuit control, to achieve the synchronization problem of laser power and motor cutting, and optimizes the precise cutting problem of corner graphics such as rectangles. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A rough interpolation flow chart of a laser synchronization delay method based on data sampling interpolation proposed by the present invention;
[0020] Figure 2 A fine interpolation flow chart of a laser synchronization delay method based on data sampling interpolation proposed by the present invention;
[0021] Figure 3 The present invention provides a laser signal delay control flow chart for a laser synchronization delay method based on data sampling and interpolation. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0023] Reference Figure 1-Figure 3 A laser synchronization delay method based on data sampling interpolation includes a coarse interpolation module, a fine interpolation module, and a laser signal delay control module, and includes the following steps:
[0024] S1, coarse interpolation module: divide the small processing line segment into a feed segment of an interpolation cycle, perform an interpolation operation in each interpolation cycle, calculate the coordinate pulse increment of each motor axis of the next interpolation point, the coordinate pulse cycle, the corresponding laser power PWM and laser enable data, and store the interpolation data in a ring buffer;
[0025] S2, fine interpolation module: the data obtained by coarse interpolation synchronously outputs pulse data to the servo driver, laser PWM signal and laser enable signal to the laser;
[0026] S3, laser signal delay control module: when reading interpolation data during fine interpolation, if the laser delay parameter is set, the laser power PWM and laser enable data of the current interpolation cycle are stored in a set of circular buffers in sequence, and the circular buffers are traversed from back to front in sequence to accumulate the time of each interpolation cycle. When the accumulated time is greater than the laser delay parameter, the laser power and enable signal data corresponding to the current interpolation cycle are found.
[0027] The present invention aims to solve the problem that the motor movement lags behind the laser power cutting during the laser cutting process. Because the response of the motor driver, especially the servo driver response, has a lag, when the motion control system outputs a pulse to the servo driver, the servo driver controls the motor movement according to the current and speed feedback, and there is a response delay. The motor pulse output by the motion control system and the laser power PWM signal are generally output at the same time, and the servo driver response is generally in the millisecond level, resulting in the phenomenon that the cutting corners are burned or cannot be cut through. Especially when cutting multiple layers of fabric. The present invention adopts data sampling interpolation technology and buffer technology, and provides adjustable laser delay parameters, which will delay the laser power signal and enable signal behind the motor pulse signal to achieve the effect of synchronous movement of the laser and the motor. The present invention not only delays the control of laser output at the start and end, but also can control the laser power and enable signal during the overall movement process, and the overall delay is behind the motor pulse signal.
[0028] Embodiment 2
[0029] 1. The following is a detailed description of a two-axis XY laser cutting process, using a data sampling interpolation laser delay method. The length units involved below are all in pulse numbers.
[0030] 2. Define the coarse interpolation variables: line segment length L, X-axis length LX, Y-axis length unit LY, line segment remaining distance CurrentToDest, acceleration Acc, start speed Vs, end speed Ve, cutting target speed Vdest, current interpolation cycle cutting speed Vi, interpolation cycle Ti, line segment synthetic interpolation amount Li, X-axis interpolation amount DXi, Y-axis interpolation amount DYi, X-axis coarse interpolation pulse cycle PXi, Y-axis coarse interpolation pulse cycle PYi, laser interpolation enable variable LaserONi, laser interpolation power Pi, laser maximum power Pmax, laser minimum power Pmin, fine interpolation buffer g_PulseDataBuf
[32] , laser delay buffer g_LaserOnDelayBuf
[256] , laser on delay LaserOnDelay, cumulative interpolation cycle Tsum.
[0031] 3. Create an interrupt function with a period of Ti and define the function name as Interpolation_Handle(), where Ti is the interpolation period. Create a fine interpolation interrupt function and name it PulseGen_Handle().
[0032] 4. Perform rough interpolation calculation for laser cutting
[0033] (4.1) Enter the interrupt service function Interpolation_Handle() to determine whether it is a new line segment. If so, initialize the line segment length L, the remaining distance CurrToDest = L, the acceleration Acc, the starting speed Vs, the terminal speed Ve, the target speed Vdest, etc., and clear the new line segment mark.
[0034] (4.2) If the fine interpolation buffer is full, jump to 4.9.
[0035] (4.3) Calculate the motor shaft interpolation amount Li = Vi*Ti, DXi = Li*(LX / L), DYi = Li*(LY / L), PXi = Ti / DXi, PYi = Ti / DYi.
[0036] (4.4) Calculate the laser enable variable LaserONi and the laser interpolation power Pi, where if the line segment is a cutting line, LaserONi=1 (light is emitted), otherwise LaserONi=0 (no light is emitted). Pi=(Vi / Vdest)*(Pmax-Pmin)+Pmin.
[0037] (4.5) Recalculate Ti = Max(DXi*PXi, DYi*PYi).
[0038] (4.6) The interpolation value of the current interpolation cycle [DXi, DYi, PXi, PYi, LaserONi, Pi, Ti] is stored in the fine interpolation buffer g_PulseDataBuf
[32] .
[0039] (4.7) Calculate the remaining distance CurrToDest = CurrToDest-Li. If CurrToDest<=0, it means the processing is completed, continue to load the next line, and jump to 4.1.
[0040] (4.8) Acceleration and deceleration processing Vi = f (Vdest, Vs, Ve, Acc, CurrToDest), where f() is the acceleration and deceleration function, which calculates the speed of the current interpolation cycle based on the set cutting target speed, starting speed, ending speed, acceleration, remaining distance, etc.
[0041] (4.9) The coarse interpolation is completed, the timing value of the coarse interpolation interrupt timing function is updated to Ti, and the interrupt returns.
[0042] 5. Perform fine interpolation processing
[0043] (5.1) Enter the fine interpolation interrupt service function PulseGen_Handle() to check if the motor pulse output is completed. If so, take out a set of interpolation data [DXi, DYi, PXi, PYi, LaserONi, Pi, Ti] from the fine interpolation buffer g_PulseDataBuf
[32] . Otherwise, jump to 5.4.
[0044] (5.2) The laser enable control, laser power, and interpolation period [LaserONi, Pi, Ti] of the current interpolation cycle are stored in the secondary buffer g_LaserOnDelayBuf
[256] .
[0045] (5.3) Take subscript j = 0, traverse from the end to the beginning to read Ti in g_LaserOnDelayBuf
[256] , and accumulate the total time Tsum = Tsum + Ti; when Tsum> = LaserOnDelay, exit the traversal and take out LaserONi and Pi corresponding to subscript j as the current laser enable and laser power. Steps 5.2 and 5.3 are for laser signal delay control.
[0046] (5.4) Output the control pulse and frequency of the motor according to the interpolation quantity [DXi, DYi, PXi, PYi]. According to LaserONi, Pi, control the switching light state and power PWM of the laser in the current interpolation cycle.
[0047] (5.5)The interrupt function returns.
[0048] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A laser synchronization delay method based on data sampling interpolation, comprising a coarse interpolation module, a fine interpolation module, and a laser signal delay control module, characterized in that: The following steps are involved: S1, coarse interpolation module: divide the small processing line segment into a feed segment of an interpolation cycle, perform an interpolation operation in each interpolation cycle, calculate the coordinate pulse increment of each motor axis of the next interpolation point, the coordinate pulse cycle, the corresponding laser power PWM and laser enable data, and store the interpolation data in a ring buffer; S2, fine interpolation module: the data obtained by coarse interpolation synchronously outputs pulse data to the servo driver, laser PWM signal and laser enable signal to the laser; S3, laser signal delay control module: when reading interpolation data during fine interpolation, if the laser delay parameter is set, the laser power PWM and laser enable data of the current interpolation cycle are stored in a set of circular buffers in sequence, and the circular buffers are traversed from back to front in sequence to accumulate the time of each interpolation cycle. When the accumulated time is greater than the laser delay parameter, the laser power and enable signal data corresponding to the current interpolation cycle are found.
2. The laser synchronization delay method based on data sampling and interpolation according to claim 1 is characterized in that: The ring buffer can store data of 32 interpolation cycles, and this process is defined as a coarse interpolation process.
3. The laser synchronization delay method based on data sampling and interpolation according to claim 2 is characterized in that: The laser delay cannot be less than one interpolation period, and the interpolation period is 200 microseconds.
4. The laser synchronization delay method based on data sampling and interpolation according to claim 3 is characterized in that: The laser delay cannot be greater than the total interpolation time of the 256-level buffer area that buffers the laser PWM signal. Calculated as 200 microseconds, the maximum delay is less than 200*256=51,200 microseconds.
5. The laser synchronization delay method based on data sampling and interpolation according to claim 4 is characterized in that: In S1, according to the data sampling interpolation principle and the given speed of the user program, the small processing line segment is divided into a feed segment of an interpolation cycle. An interpolation operation is performed in each interpolation cycle to calculate the coordinate pulse increment, coordinate pulse cycle, corresponding laser power PWM and laser enable data of each motor axis of the next interpolation point, and store the interpolation data in a ring buffer.
6. The laser synchronization delay method based on data sampling and interpolation according to claim 5 is characterized in that: In S2, the data obtained by the rough interpolation are taken out in sequence, and then the pulse data are synchronously output to the servo driver, the laser PWM signal and the laser enable signal are output to the laser.
7. The laser synchronization delay method based on data sampling and interpolation according to claim 6 is characterized in that: In S3, when the fine interpolation reads the interpolation data, if the laser delay parameter is set, the laser power PWM and laser enable data of the current interpolation cycle are stored in a group of 256-level circular buffers in sequence, and the circular buffers are traversed from back to front in sequence to accumulate the time of each interpolation cycle. When the accumulated time is greater than the laser delay parameter, the laser power and enable signal data corresponding to the current interpolation cycle are found.