Application of EtherCAT Motion Controller in Lithium Battery Welding

Click on the aboveZhèng Yùndòng Assistant, stay updated with new developments!

Application Background
Since the development of technology, lithium batteries have advantages such as long service life, strong adaptability, and high energy, thus their applications in electronic products, transportation, and other fields have become increasingly widespread. The lithium battery welding and other production industries derived from this are also rapidly expanding in the market.
With the continuous growth of market competition, the lithium battery welding industry has higher and higher precision requirements. This article mainly introduces how the SS curve of the Zhèng Yùndòng controller ZMC432 can meet the high-precision welding process requirements.
The ZMC432 can control multiple motors with one controller, meeting the needs of the lithium battery welding industry for simultaneous multi-axis and multi-station processing.
Application of EtherCAT Motion Controller in Lithium Battery Welding
01
ZMC432 Function Introduction
ZMC432is a multi-axis high-performance EtherCAT bus motion controller launched by Zhèng Yùndòng, featuring communication interfaces such as EtherCAT, Ethernet, RS232, CAN, and USB. ZMC series motion controllers can be applied in various scenarios requiring offline or online operation.
The ZMC432 supports motion control for up to 32 axes, supporting linear interpolation, arbitrary arc interpolation, spatial arc, helical interpolation, electronic cam, electronic gear, synchronous follow, and other functions.
Application of EtherCAT Motion Controller in Lithium Battery Welding
The ZMC432 supports three programming methods: PLC, Basic, and HMI configuration. PC upper computer API programming supports interfaces such as C#, C++, LabVIEW, Matlab, Qt, Linux, VB.Net, Python, etc.
Application of EtherCAT Motion Controller in Lithium Battery Welding
The ZMC432 has a built-in high-precision PSO position synchronization output function, which can control the laser output with equal spacing even during corner and curve processing, even with speed adjustments in high-speed processing scenarios.
The commands to achieve the PSO hardware comparison output function mainly include HW_PSWITCH2, MOVE_HWPSWITCH, HW_TIMER, etc.
For example, when performing corner processing in lithium battery welding, it can ensure constant output spacing while decelerating, and combining with the SS curve processing technology increases process flexibility. This ensures processing effects, reduces mechanical jitter, and maximizes productivity.

Application of EtherCAT Motion Controller in Lithium Battery Welding

02
Velocity Curve

Common motion curves are divided into trapezoidal velocity curves and S-shaped velocity curves. Based on this, Zhèng Yùndòng has introduced another type of velocity curve: SS velocity curve.

The following will mainly introduce three common velocity curves!

1. Trapezoidal Velocity Curve

The trapezoidal curve, also known as the T-shaped curve, is used to express the relationship between velocity and time, as shown in the figure below. From the figure, it can be seen that the standard trapezoidal velocity curve has three stages: uniform acceleration, constant speed, and uniform deceleration.
Therefore, when performing interpolation motion, the speed parameters of the axis can be directly set using Basic instructions during axis parameter initialization (SPEED speed, ACCEL acceleration, DECEL deceleration).
Since the trapezoidal velocity curve is the fastest and simplest for motion control planning, it is the most widely used in industrial control applications.
However, the trapezoidal curve also has disadvantages; the trapezoidal velocity is not smooth enough, and the acceleration is discontinuous at the corners of the velocity curve, which can easily lead to machine jitter or impact on the machine during actual interpolation motion.

Application of EtherCAT Motion Controller in Lithium Battery Welding

2. S-shaped Velocity Curve

The S-shaped velocity curve is also used to express the relationship between velocity and time. However, unlike the trapezoidal curve, it smooths the acceleration and deceleration stages, resulting in a curve shape resembling the letter S. The S-shaped velocity curve is shown in the figure below.
Zhèng Yùndòng Basic language provides a dedicated SRAMP instruction for this. In actual motion applications, using the SRAMP instruction to set corresponding values can make the velocity curve during motion smoother, thereby reducing impacts during the control process and providing flexibility in the interpolation process.

Application of EtherCAT Motion Controller in Lithium Battery Welding

SRAMP instruction usage syntax:VAR1 = SRAMP,SRAMP = smoothms.
smoothms: millisecond unit, after setting, the acceleration and deceleration process will extend the corresponding time, and the length of time that can be set is related to distance, speed, and acceleration.

3. SS Velocity Curve

The SS velocity curve, also known as the acceleration acceleration curve, is used to express the relationship between acceleration and time. Acceleration acceleration is a physical quantity that describes how quickly acceleration changes, i.e., the rate of change of acceleration.
In Zhèng Yùndòng Basic language, the VP_MODE instruction modes 6 and 7 can achieve the SS curve (which will be explained in detail later), smoothing the acceleration and deceleration stages, as shown in the figure below.
Application of EtherCAT Motion Controller in Lithium Battery Welding
Smoothing the acceleration acceleration can reduce the impact and jitter caused by rapid changes in acceleration in some high-precision motion industrial applications.
For example, in the common lithium battery welding processing industry, when performing trajectory welding on the top cover of the power battery, applying the SS curve when chamfering at each corner can effectively increase its flexibility, reduce machine jitter and impact, making the welding process smoother and more continuous.
03
Theoretical Analysis of Velocity Curves

The trapezoidal velocity curve has only three stages: uniform acceleration, constant speed, and uniform deceleration. The S-shaped curve, due to its smoothing of the acceleration and deceleration stages, can be divided into seven stages, as shown in the figure below. The effective ranges of the S curve are T1, T3, T5, T7; the effective ranges of the SS curve are the same, with the difference that the acceleration changes more gently in the SS curve.

Application of EtherCAT Motion Controller in Lithium Battery Welding

Since the S-shaped curve has varying acceleration during the acceleration and deceleration processes, a new variable J is introduced, i.e., acceleration acceleration.

J=da/dt

During the acceleration change process, the maximum acceleration is defined asamax and the minimum acceleration as-amax, from which the relationship between the acceleration at each stage and acceleration acceleration can be derived:
Application of EtherCAT Motion Controller in Lithium Battery Welding

To determine the entire operation process, three basic system parameters need to be known:

1. Acceleration Time Relationship

According to the acceleration change curve shown in the above figure, T1-T3 is the uniform acceleration stage, T4 is the uniform acceleration stage, and T5-T6 is the uniform deceleration stage. Another variable μ is introduced here. Therefore:

Application of EtherCAT Motion Controller in Lithium Battery Welding

According to formulas ① and ②, the relationship function between acceleration and time can be obtained as follows:
Application of EtherCAT Motion Controller in Lithium Battery Welding

2. Velocity Time Relationship

The functional relationship between velocity and acceleration is: v=at; the relationship between acceleration acceleration and velocity is:

Application of EtherCAT Motion Controller in Lithium Battery Welding

Combining the acceleration time relationship and the above acceleration and time relationship function, the following relationship can be obtained:

Application of EtherCAT Motion Controller in Lithium Battery Welding

After simplification, we get:

Application of EtherCAT Motion Controller in Lithium Battery Welding

The above is the functional relationship between the curves of velocity, acceleration, and acceleration acceleration.
04
VP_MODE Instruction Description and Usage Examples
1. Instruction Details
1. Instruction Description

The VP_MODE instruction can be used to set the type of acceleration and deceleration curves, with multiple modes to choose from, allowing for the setting of S-shaped curves and SS curves, making trapezoidal curves smoother. This instruction is generally used in axis parameter initialization programs and can be used together with the SRAMP instruction. When VP_MODE is set to mode 0, the values set by SRAMP take effect.

Syntax:VAR1 = VP_MODE or VP_MODE(axis)=mode

mode:Mode selection

The VP_MODE modes are as follows:

Mode

Description

0

Default value, usingSRAMP to set the S curve;

4

Maximum acceleration at startup, the acceleration gradually becomes 0 when reaching maximum speed; the S and SS curve graphs are shown below.

This mode is suitable for high-speed start-stop processing occasions where there are no impact requirements.

Application of EtherCAT Motion Controller in Lithium Battery Welding

6

New type SS curve, a continuous curve type for acceleration acceleration, the SS mode increases deceleration time by 87% compared to T-shaped deceleration. This mode only takes effect during the deceleration phase; the acceleration phase takes effect in mode 0, facilitating continuous small segment interpolation;

This mode is suitable for high-speed startup and smooth stopping processing occasions.

Application of EtherCAT Motion Controller in Lithium Battery Welding

7

New type SS curve, a continuous curve type for acceleration acceleration. Dynamic modification of axis parameters or continuous interpolation may cause acceleration acceleration to be non-continuous; in this case, it will switch to mode 0, so it is recommended to set appropriate values for SRAMP as well.

This mode is suitable for high precision and smooth speed start-stop processing occasions without impact.

Application of EtherCAT Motion Controller in Lithium Battery Welding

2. Usage Examples

The following examples can all be implemented through the ZMC432 controller, and the connection architecture diagram is as follows:

Application of EtherCAT Motion Controller in Lithium Battery Welding

(1) Set VP_MODE to mode 0, taking single-axis motion as an example.

RAPIDSTOP(2) 'Stop all axes before WAIT IDLE(0) 'Wait for axis 0 to stop BASE(0) 'Set axis ATYPE=1 'Set axis type to pulse UNITS=1000 'Pulse equivalent DPOS=0 MPOS=0 SPEED=100 'Set speed to 100 ACCEL=1000 'Set acceleration to 1000 DECEL=1000 'Set deceleration to 1000 SRAMP=50 'Set S curve time to 50ms VP_MODE=0 'Set axis 0 to mode 0 TRIGGERMOVE(25) 'Single-axis motion 25 END
When SRAMP=50, the velocity and acceleration curves are shown in the figure below, both smoothed during acceleration and deceleration phases, and the motion time will also be extended accordingly. It can be compared with the curve when SRAMP=0.

Application of EtherCAT Motion Controller in Lithium Battery Welding

When SRAMP=0, the velocity and acceleration curves are shown in the figure below:

Application of EtherCAT Motion Controller in Lithium Battery Welding

(2) Set VP_MODE to mode 4, taking multi-axis linear interpolation motion as an example.

RAPIDSTOP(2) 'Stop all axes before WAIT UNTIL IDLE(0) AND IDLE(1) 'Wait for axis 0 and axis 1 to stop BASE(0,1) 'Set axes, axis 0 as the main axis ATYPE=1,1 UNITS=1000,1000 DPOS=0,0 MPOS=0,0 SPEED=100,100 'Set speed for axes 0 and 1 to 100 ACCEL=1000,1000 DECEL=1000,1000 MERGE=ON 'Enable continuous interpolation SRAMP=0,0 'Do not set S curve VP_MODE=4,0 'Set axis 0 to mode 4, axis 1 to mode 0 TRIGGERMOVE(25,25) 'Interpolation motion END
In the above configuration, axis 0 uses VP_MODE mode 4, starting with maximum acceleration and then decreasing to 0. This mode is suitable for occasions requiring fast start-stop.

Note: Since this motion is interpolation motion, axis 0 is the main axis, so just look at the velocity and acceleration curves of the main axis. The VP_ACCEL data source needs to be manually input, collecting the changes in acceleration values under the S curve and SS curve.

Application of EtherCAT Motion Controller in Lithium Battery Welding

(3) Set VP_MODE to mode 6, taking multi-axis linear interpolation motion as an example.

RAPIDSTOP(2) 'Stop all axes before WAIT UNTIL IDLE(0) AND IDLE(1) 'Wait for axis 0 and axis 1 to stop BASE(0,1) 'Set axes, axis 0 as the main axis ATYPE=1,1 UNITS=1000,1000 DPOS=0,0 MPOS=0,0 SPEED=100,100 'Set speed for axes 0 and 1 to 100 ACCEL=1000,1000 DECEL=1000,1000 MERGE=ON 'Enable continuous interpolation SRAMP=0,0 'Do not set S curve VP_MODE=6,0 'Set axis 0 to mode 6, axis 1 to mode 0 TRIGGERMOVE(25,25) 'Interpolation motion END

When VP_MODE is set to mode 6, it only smooths the deceleration phase. When the acceleration phase is not set to S or SS curves, the acceleration reaches the maximum value instantly upon power-on and moves at the set acceleration. When the deceleration phase is set to SS curve, as shown in the figure below, the acceleration curve is smoothed during deceleration, making the motion transition more natural and smooth.

This mode is suitable for continuous interpolation occasions, improving efficiency under the condition of ensuring smooth motion.

Note: Since this motion is interpolation motion, axis 0 is the main axis, so just look at the velocity and acceleration curves of the main axis.

Application of EtherCAT Motion Controller in Lithium Battery Welding

(4) Set VP_MODE to mode 7, taking trajectory processing motion in the lithium battery industry as an example.

RAPIDSTOP(2) 'Stop all axes before WAIT UNTIL IDLE(0) AND IDLE(1) 'Wait for axis 0 and axis 1 to stop BASE(0,1) 'Set axes 0 and 1 ATYPE=1,1 UNITS=1000,1000 DPOS=0,0 MPOS=0,0 SPEED=100,100 'Set speed for axes 0 and 1 to 100 ACCEL=1000,1000 'Set acceleration for axes 0 and 1 to 1000 DECEL=1000,1000 MERGE=ON SRAMP=100,100 'Set S curve time to 100 VP_MODE=7,7 'Set axis 0 to mode 7, i.e., set SS curve TRIGGERMOVE(10,0) 'Axis 0 moves forward 10 MOVECIRC(2.5,2.5,0,2.5,0) 'Perform arc motion with a radius of 2.5 MOVE(0,10) 'Axis 1 moves forward 10 MOVECIRC(-2.5,2.5,-2.5,0,0) MOVE(-20,0) 'Axis 0 moves backward 20 MOVECIRC(-2.5,-2.5,0,-2.5,0) MOVE(0,-10) 'Axis 1 moves backward 10 MOVECIRC(2.5,-2.5,2.5,0,0) MOVE(10,0) 'Axis 0 moves forward 10 END
When VP_MODE is set to mode 7, the image after smoothing the SS curve is shown below, which can be compared with the VP_ACCEL acceleration curve (light blue line). This is suitable for occasions with large motion jitter.
Note: Since this motion is interpolation motion, axis 0 is the main axis, so just look at the velocity and acceleration curves of the main axis.

Application of EtherCAT Motion Controller in Lithium Battery Welding

The interpolation trajectory of axes 0 and 1 in XY mode:

Application of EtherCAT Motion Controller in Lithium Battery Welding

(5) The following is the velocity curve graph without setting the SS curve.

SRAMP=100,100 'Set S curve time to 100 VP_MODE=0,0 'Cancel SS curve
From the oscilloscope sampling graph, it can be seen that the current motion is following the S curve.

Application of EtherCAT Motion Controller in Lithium Battery Welding

From this, it can be concluded that VP_MODE=7, the velocity curves of axes 0 and 1 with SS acceleration and deceleration are smoother.
Application of EtherCAT Motion Controller in Lithium Battery Welding
(6) Video Explanation.

The following video is sourced from Zhèng Yùndòng Assistant

This time, the application of Zhèng Yùndòng technology’s high-flexibility SS acceleration and deceleration curves in lithium battery welding is shared here.
For more exciting content, please follow the “Zhèng Yùndòng Assistant” public account. For related development environments and example codes, please consult Zhèng Yùndòng technical sales engineers: 400-089-8936.
This article is original by Zhèng Yùndòng Technology, welcome everyone to reprint, learn together, and improve the level of intelligent manufacturing in China. The copyright of the article belongs to Zhèng Yùndòng Technology. If reprinted, please indicate the source.

About Zhèng Yùndòng Technology

Zhèng Yùndòng Technology focuses on research in motion control technology and the development of general motion control software and hardware products, is a national high-tech enterprise, with main products including motion controllers, motion control cards, visual motion control integrated machines, human-machine interfaces, and expansion modules.
Zhèng Yùndòng Technology gathers outstanding talents from companies such as Huawei and ZTE, while adhering to independent innovation, actively collaborating with major universities to research the basic technology of motion control. It is one of the fastest-growing enterprises in the domestic industrial control field and one of the few enterprises that fully masters core motion control technology and real-time industrial control software platform technology.

Zhèng Yùndòng Technology is backed by the rapidly developing manufacturing industry, keeping pace with the times, rich in innovation, and committed to continuously improving the technical application and manufacturing level of intelligent manufacturing equipment suppliers and end users. After years of application development with numerous partners, the products are widely used in various fields such as domestic and foreign 3C electronics, semiconductors, printing and packaging, textiles and clothing, laser processing, mechanical processing, robotics, new energy, medical care, and stage entertainment.

Application of EtherCAT Motion Controller in Lithium Battery Welding
Application of EtherCAT Motion Controller in Lithium Battery Welding

Application of EtherCAT Motion Controller in Lithium Battery Welding

Leave a Comment