Share this

Application of motion buffer in precision laser processing

2026-04-06 04:18:10 · · #1

In the wave of rapid global technological development, the semiconductor industry, as a key technology field, has always been at the forefront of innovation and transformation. At the same time, the demands for real-time performance are constantly increasing.

For example, in the application of laser processing technology in the semiconductor industry, higher requirements have been placed on the speed and precision of laser cutting. Motion buffering is an effective means to quickly improve real-time performance.

This article mainly introduces the principles of motion buffering and its application in laser processing by using the ZMC408SCAN-V22 motion controller for positive motion laser galvanometers.

ZMC408SCAN-V22 Hardware Introduction

The ZMC408SCAN-V22 is a high-performance dual-galvanometer motion controller from Zheng Motion Technology. It integrates two 100Mbps Ethernet ports, supporting EtherCAT, EtherNET, CAN, RS232, RS485, 24 general-purpose digital inputs, 20 general-purpose digital outputs, 2 general-purpose analog outputs, 2 general-purpose analog inputs, 4 local differential pulse axis interfaces, 1 MPG handwheel encoder interface, 2 galvanometer interfaces with feedback, 1 LASER interface, and 1 FIBER interface. The open system block diagram is shown below:

The ZMC408SCAN-V22 bus controller supports EtherCAT bus connection, a refresh cycle of up to 500μs, and motion control of up to 16 axes. It supports linear interpolation, arbitrary circular interpolation, spatial circular interpolation, helical interpolation, electronic cam, electronic gear, synchronous following, virtual axis setting, etc.; and can achieve real-time motion control by using an optimized network communication protocol.

The ZMC408SCAN-V22 can connect to various expansion modules via CAN and EtherCAT buses, thereby expanding digital, analog, or motion axes. It can be developed for various operating systems including Windows, Linux, Mac, Android, and WinCE, and provides DLL libraries for various environments such as VC, C#, VB.NET, and LabVIEW. For upper-computer software programming, refer to the "ZMotion PC Function Library Programming Manual".

Motion cushioning principle

When executing motion commands, the controller provides a buffer to store the motion buffer queue. Motion commands are stored in the motion buffer, retrieved from the buffer, and then executed, eliminating program scanning time and greatly improving real-time performance. This also allows the program to scan downwards normally without blocking. The ZMotion motion controller has multi-level motion buffers and follows a first-in, first-out (FIFO) principle. When the motion buffer is enabled, when the program scans and recognizes the first motion command of the program task, it assigns the motion command to the motion buffer of the designated axis, and the motor begins to move. The program continues scanning downwards, and when it reaches the second motion command, it stores it in the motion buffer. While continuously scanning and storing motion commands, motion commands are sequentially retrieved from the motion buffer and executed. See the diagram below for the motion buffer principle:

1. MTYPE and NTYPE are the type of the currently running motion instruction and the type of the first instruction following MTYPE, respectively.

2. Any motion instruction in a program can enter the motion buffer of any axis, specified by the axis number.

3. The motion buffer for each axis is independent and does not interfere with each other.

As shown in the diagram: When there is space in the motion buffer, motion instructions will enter the motion buffer. Then, a flag can be set using `MOVE_MARK` to indicate the MARK number of the next motion instruction to be called. This flag will be written to the motion buffer along with the motion instruction. After the instruction is executed, it exits the motion buffer, and the previous next instruction becomes the currently executing instruction. This process repeats until there are no more instructions to execute in the buffer.

When buffering multiple motion instructions, to determine which instruction the current motion is executing, the `MOVE_MARK` instruction and the `MOVE_CURMARK` instruction for the current motion instruction are provided. The `MOVE_MARK` instruction is incremented by 1 for each motion instruction scanned.

The MOVE_CURMARK instruction is the label of the current motion, indicating which motion instruction the current motion has reached. It returns -1 after all motions are completed.

After the current motion is completed, the next motion in the motion buffer will be executed automatically. After all motion instructions have been executed, the motion buffer will be empty, or you can use the CANCEL/RAPIDSTOP command to clear the motion buffer.

Extended Explanation

The FORCE_SPEED, ENDMOVE_SPEED, and STRATMOVE_SPEED instructions in the above diagram belong to SP motion instructions. SP instructions are also motion instructions. When using SP motion instructions (such as MOVESP, MOVECIRCSP, etc., where SP is added directly after the motion instruction), the SP speeds FORCE_SPEED, ENDMOVE_SPEED, and STRATMOVE_SPEED are written to the motion buffer along with the SP motion instruction. The difference between SP motion instructions and regular motion instructions is: MOVE(100) has a speed of SPEED=100, while MOVESP(100) has a speed of FORCE_SPEED=200. See the diagram below for details:

Application of motion buffer in laser processing

Through the above introduction, you should now have a basic understanding of motion buffering. Next, we will introduce the application of motion buffering in laser processing.

In laser processing applications, the motion control system not only needs to solve the axial motion problem of the machine tool, but also must accurately control the laser output.

For example, laser power, focus, motion speed, assist gas, and material absorption all require the motion control system to execute operations and outputs. The trajectory control of the laser beam must be extremely accurate, ensuring that no data parameters are lost. Otherwise, workpiece processing cannot be completed properly. Burrs will form on the workpiece edges, and in more serious cases, it may even damage the workpiece.

The image below shows the trajectory of a simulated laser processing procedure. Motion buffering can maximize the accuracy of turning the laser on and off at fixed points.

The control of positive motion laser control, such as enable and light output, is all controlled through general IO output commands.

Taking the switching operation as an example: the output port can only be controlled to switch on after the axis has moved to the set switching position. Therefore, the MOVE_OP motion buffer output command must be used instead of the OP normal output command. The motion buffer ensures that the switching operation is only performed after other motion commands in front of the axis have been executed and have reached the switching point at the same time, thus ensuring the timing of the motion.

As shown in the figure below: When the etching pattern begins, operations such as moving to the starting position, turning on the light, straightening, and adjusting the light are performed. These instructions are placed into the motion buffer in sequence and executed in a first-in-first-out order.

In laser processing applications, using interpolation buffering to control the laser not only ensures the timing of motion, but also allows for adjustment of the laser's output power and intensity of light emission through motion buffering commands such as MOVE_PWM or MOVE_AOUT, thereby meeting more process requirements and improving processing results.

Examples of motion buffer applications in laser processing

Using this example requires selecting a controller model with SCAN functionality. (This article uses the ZMC408SCAN-V22 as an example.) The SCAN series motion controller can not only control the motor but also the laser galvanometer to perform positioning and interpolation. During motion, it can perform laser control, IO control, DA control, PWM control, and other process operations. Interpolation trajectory movement can also be performed between the galvanometer axis and the motor axis. (Note: Only controllers with SCAN functionality can be set to axis type 21.)

1. MOVESCANABS(pos1[,pos2] [,pos3]…) - Command for linear motion of the galvanometer.

(1)pos1: The motion coordinate of the first axis, absolute position

(2)pos2: The motion coordinate of the next axis, absolute position

2.MSCANCIRCABS(end1,end2,centre1,centre2,direction) - Command to draw an arc at the center of a galvanometer circle.

(1) end1: The coordinate of the first axis of motion at the endpoint, the absolute position

(2) end2: The second axis coordinate of the endpoint, absolute position

(3)centre1: The coordinates of the first axis of motion of the center of the circle, absolute position

(4)centre2: The second axis of motion coordinates of the center, absolute position

(5) Direction: 0 - counterclockwise, 1 - clockwise

For other instructions in the example program, please refer to the "Laser Galvanometer Control Programming Manual" (contact Zhengdong staff for the manual).

RAPIDSTOP(2) 'Clear buffer WAIT IDLE' 1, initialization part, setting galvanometer axis parameters, enabling laser, etc. BASE(4,5) 'Select galvanometer axis, galvanometer X-axis 4, galvanometer Y-axis 5 ATYPE = 21,21 'Set galvanometer axis type UNITS = 1000,1000 'Set galvanometer axis pulse equivalent MERGE = ON 'Enable continuous interpolation AXIS_ZSET = 3 'Enable precise output' Corner delay parameter setting CORNER_MODE = 2 'Set corner mode DECEL_ANGLE = 60 * (PI/180) 'Set starting radian 0-60 without processing 60-90 equal-ratio deceleration STOP_ANGLE = 90 * (PI/180) 'Set stop radian greater than 90 delay LASER_SET(1,1) 'Set energy parallel port MOVE_OP(49,ON) 'Turn on laser emergency stop signal (set according to actual situation) MOVE_OP(47,ON) 'Turn on enable' 2, Power setting (power setting can be interspersed multiple times in the middle of the movement to achieve different layer operations) MOVE_OP(46,OFF) 'Set corner delay (unit us) ZSMOOTH = 500 MOVE_AOUT(3,128) 'Set power (50% 0 - 255) MOVE_PWM(11,0.5,60000) 'Power latch signal (used when the Fiber laser is in latch mode) MOVE_OP(46,ON)' 3, Marking pattern FORCE_SPEED = 1000 'Set idle movement speed 1000 Units/s MOVESCANABS(50,0) 'Idle movement to the starting point MOVE_OP(44,ON) 'Turn on the light MOVESCANABS(150,0) MOVE_PWM(11,0.5,50000) 'Turn on the light (when drawing an arc, the speed is slower than a straight line, there is energy accumulation, so the frequency needs to be reduced) MSCANCIRCABS(150,-100,150,-50,1) MOVE_PWM(11,0.5,60000) 'Turn on the light (when the arc ends, the original frequency is restored) MOVESCANABS(100,-100) MOVE_OP(44,OFF) 'Turn off the light' 4, End part MOVESCANABS(0,0) 'Galvanometer returns to zero WAIT IDLE MOVE_DELAY(0.1,1) 'End delay

Position and output waveform diagram

Speed ​​and output waveform diagram

XY pattern diagram

Normal output and motion buffer output

In the process of programming, the OP instruction is usually used to open or close the output port. At the same time, the MOVE_OP motion buffer output instruction is also provided. The difference between these two instructions is as follows:

1. Normal output instructions: When the program scans for this line of instructions, it executes the output.

2. In motion buffers, output commands are stored after program scanning. The motion buffer retrieves commands sequentially in a first-in, first-out (FIFO) order, executing them only when the desired output command is retrieved. For example, in laser applications, without a motion buffer, if the previous motion command is scanned before the program has finished executing, the output command will be executed immediately, causing the actual switching position of the light to deviate from the intended location.

The following examples will help you understand the difference between the two outputs.

RAPIDSTOP(2) 'Stop all axes WAIT IDLE(0) 'Wait for axis 0 to stop BASE(0) 'Select axis 0 DPOS=0 'Offset axis 0 coordinates to 0 UNITS=100 'Pulse equivalent SPEED=100 'Speed ​​ACCEL=1000 'Acceleration DECEL=1000 'Deceleration TRIGGER 'Trigger oscilloscope sampling OP(0,3,$0) 'Turn off output port 0-3DELAY(1000) 'Delay MOVE(100) 'Linear interpolation relative distance 100MOVE_OP(1,ON) 'Motion buffer output OP(0,ON) 'Normal output

Example execution result: After a 1-second delay, the program scans for the OP instruction, and output port 0 is immediately executed and output.

MOVE_OP fills the motion buffer with IO operation instructions, so output port 1 will only output after MOVE(100) has finished running.

motion buffer blockage

The motion buffer space for each axis is limited. When too many motion commands are scanned and placed into the motion buffer, the multi-level motion buffer will be completely filled. If the program continues to scan more motion commands, the program will also be blocked until the motion commands are completed and exited in sequence, and the motion buffer has space, at which point the motion commands will continue to enter the motion buffer.

For example, taking the ZMC408CE controller as an example, the default is 4096 motion buffers. The example program in the figure below shows that the motion buffer of this controller can store a maximum of 493 circular interpolation instructions. After downloading the program, the value of i is printed as 492, which means that the current FOR loop has not been completed and the program is blocked.

In the diagram below, after some motion instructions are retrieved from the motion buffer and executed, the buffer has space. The FOR loop continues execution, storing motion instructions into the motion buffer. After an instruction exits the motion buffer, new motion instructions will continue to be stored into the motion buffer one by one, as long as there is enough space in the motion buffer.

Each axis's motion buffer is independent and does not interfere with others. The buffer sizes are the same. The number of remaining available buffers for a particular axis can be viewed using the command REMAIN_BUFFER(MTYPE) AXIS(n).

The ZMC4 series motion controller supports up to 4096 motion buffer segments per axis (the number of buffers varies between different controller models; please refer to the controller's user manual or use ?*max to print for details). The LIMIT_BUFFERED motion buffer limit can be manually set.

Different motion commands require different amounts of buffer space; the more complex the motion, the more buffer space it requires.

As shown in the table below: MTYPE 1 indicates MOVE linear interpolation instruction, MTYPE 2 indicates MOVEABS linear interpolation instruction (absolute), MTYPE 3 indicates MHELICAL spiral interpolation instruction, and MTYPE 4 indicates MOVECIRC circular interpolation instruction.

For example, the ZMC408CE controller has a motion buffer size of 4096. The number of MOVE linear interpolation instructions and MOVECIRC circular interpolation instructions that the buffer can buffer at one time are different. See the diagram below for reference:

Note: The interpolation motion buffer is in the motion buffer of the main axis.

To help you better understand the concept of motion buffers, this example limits the number of motion commands that the axis's motion buffer can buffer to 3 (LIMIT_BUFFERED=3). The purpose of LIMIT_BUFFERED is to limit the number of motion buffers, ensuring it doesn't exceed the controller's maximum value. (You can check the controller's maximum number of motion buffers using ?*max).

For example: There are four MOVE commands in this example, but the motion buffer can only hold a maximum of three linear interpolation commands. MOVE(60,40) occupies the MTYPE of axis 0, and axis 0 can still buffer two more commands, leaving zero buffer space. Since the motion buffer is full, MOVE(60,50) cannot enter the motion buffer until MOVE(60,40) has finished executing.

RAPIDSTOP(2) 'Stop all axes WAIT IDLE(0) 'Wait for axis 0 to stop WAIT IDLE(1) 'Wait for axis 1 to stop BASE(0,1) 'Select axis 0, axis 1 ATYPE=1,1 'Set axis type DPOS=0,0 'Offset axis 0 and axis 1 coordinates to 0 UNITS=100,100 'Set pulse equivalent SPEED=100,100 'Set speed ACCEL=1000,1000 'Set acceleration DECEL=1000,1000 'Set deceleration MERGE=ON 'Enable continuous interpolation TRIGGER 'Trigger oscilloscope sampling LIMIT_BUFFERED=3 'Set the number of motion commands that the axis 0/1 motion buffer can buffer to 3 MOVE(60,40) 'Enter MTYPE,Buffer0 MOVE(70,50) 'Enter NTYPE,Buffer1 MOVE(50,40) 'Buffer2MOVE(60,50) 'Buffer full, do not enter yet?'Axis 0 current buffer instruction count="MOVES_BUFFERED(0) 'Result 2?Axis 0 remaining buffer count="REMAIN_BUFFER(1) AXIS(0) 'Result 0?Axis 1 remaining buffer count="REMAIN_BUFFER(1) AXIS(1) 'Result 3END

As shown in the figure below: MOVE(60,40) can only enter the motion buffer of axis 0 after MOVE(60,50) has completed its motion.

The interpolation motion buffer is located in axis 0 of the main spindle, therefore the motion buffer for axis 1 has no instructions, and the remaining buffer size for axis 1 is 3. Each MOVE instruction occupies one buffer space.

The oscilloscope waveform is as follows:

Other motion cushioning instructions

The table below lists some common motion buffering instructions. For more information, please refer to the "RTBasic Programming Manual".

That concludes our discussion on the application of positive motion technology for motion buffering in precision machining.

For more exciting content, please follow the "Zheng Motion Assistant" WeChat official account. For related development environment and example code, please contact Zheng Motion's technical sales engineer: 400-089-8936.

This article is original content from Zheng Motion Technology. We welcome everyone to reprint it for mutual learning and to jointly improve China's intelligent manufacturing level. Copyright belongs to Zheng Motion Technology. Please indicate the source if you reprint this article.

Read next

CATDOLL Ava Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22
CATDOLL Airi Soft Silicone Head

CATDOLL Airi Soft Silicone Head

Articles
2026-02-22
CATDOLL 123CM Olivia TPE

CATDOLL 123CM Olivia TPE

Articles
2026-02-22
CATDOLL 140CM Qing TPE

CATDOLL 140CM Qing TPE

Articles
2026-02-22