CN117331347A - EtherCAT-based multi-axis compliant interpolation synchronization method - Google Patents

EtherCAT-based multi-axis compliant interpolation synchronization method Download PDF

Info

Publication number
CN117331347A
CN117331347A CN202311312669.XA CN202311312669A CN117331347A CN 117331347 A CN117331347 A CN 117331347A CN 202311312669 A CN202311312669 A CN 202311312669A CN 117331347 A CN117331347 A CN 117331347A
Authority
CN
China
Prior art keywords
distribution
temp
interpolation
axis
decmal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311312669.XA
Other languages
Chinese (zh)
Inventor
董辉
董翼旗
毕梦
周祥清
吴祥
张丹
宋斌
刘悦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN202311312669.XA priority Critical patent/CN117331347A/en
Publication of CN117331347A publication Critical patent/CN117331347A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/41Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by interpolation, e.g. the computation of intermediate points between programmed end points to define the path to be followed and the rate of travel along that path
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/34Director, elements to supervisory
    • G05B2219/34083Interpolation general

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Abstract

The invention relates to the field of EtherCAT bus control, in particular to a multiaxial compliant interpolation synchronization method based on EtherCAT. The invention calculates the maximum distribution d max Maximum distribution L of the distribution increment stage ac And a maximum distribution L of the distribution decreasing stage de The method comprises the steps of carrying out a first treatment on the surface of the According to L ac +L de And/l rem Determining the number N of the initial segment of the distribution quantity increment 0 Number of end segments N of incremental distribution 1 Maximum distribution quantity end segment number N 2 And the number of entire interpolation segments N 3 The method comprises the steps of carrying out a first treatment on the surface of the Calculating the main shaft distribution quantity of the required distribution of N interpolation periods before the main shaft; calculating the distribution amount of the slave axis by using the calculated distribution amount of the master axis. The invention can improve the speed smoothness on the cutting machine, reduce the interpolation period and achieve the cutting precision, improve the running speed in the middle interpolation period, and avoid the shake caused by the change of the corner speed at the front and rear joint positions.

Description

EtherCAT-based multi-axis compliant interpolation synchronization method
Technical Field
Relates to the field of EtherCAT bus control, in particular to a multiaxial compliant interpolation synchronization method based on EtherCAT.
Background
With the increasing competition of industries, the market demands of multi-axis manufacturing equipment such as cutting machines, die cutting machines, engraving machines and the like are increasing. As related product demand increases, manufacturing industry is facing higher challenges, so processing technology is being innovated to meet market challenges. In the industrial field, an EtherCAT (Ethernet control Automation technology) bus is a high-performance bus, and real-time high-speed communication in the field has good effect. EtherCAT is faster and less delayed than conventional pulse communication, and is more suitable for application scenarios of multi-axis manufacturing equipment requiring rapid response. The EtherCAT networked control is more convenient for centralized control and monitoring, greatly simplifies the wiring and debugging of the system, and has better expandability. The EtherCAT network slave station node uses a special control chip, and the master station uses a standard Ethernet controller. Under the EtherCAT periodic synchronous position mode motion of the servo driver, the controller of the invention transmits position information to the servo driver every 1ms, and controls the position information under the 1ms interpolation period.
SOEM is a simple EtherCAT Master station communication program. The development language of the SOEM protocol stack is C language which is convenient for transplanting, the common systems such as Windows and Linux systems are mutually transplanted, and the SOEM does not impose any design framework, so that the SOEM protocol stack can be transplanted into an embedded operating system.
In the prior art, if the two-point straight line segment runs, the point position speed of the tail end is 0, the jitter middle smooth running does not occur, and no residual value of the final interpolation period can be ensured; however, if the motor is operated in the curve segment, the last interpolation period may not have a distance less than one interpolation step length in the acceleration segment or the deceleration segment, which leads to motor shake and mechanical equipment shake.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, develop a set of EtherCAT-based algorithm for improving flexibility by solving the terminal interpolation allowance, and provide a EtherCAT-based multi-axis flexible interpolation synchronization method.
In order to achieve the above purpose, the invention provides a multiaxial compliant interpolation synchronization method based on EtherCAT, comprising the following steps:
calculating the total time of the straight line segment according to the total length of the straight line segment of the main shaft and the current feeding speed, calculating the ratio of the total time of the straight line segment to the interpolation period, and recording the interpolation allowance of the last interpolation period as l when the ratio of the total time of the straight line segment to the interpolation period is a decimal rem
Given a maximum distribution d max According to the maximum distribution d max Calculating the maximum distribution L of the distribution increment stage ac And a maximum distribution L of the distribution decreasing stage de Judgment of L ac +L de And/l rem If L is the size of ac +L de >l rem The maximum distribution d is recalculated max And according to the maximum distribution d max Calculating the maximum distribution L of the distribution increment stage ac And a maximum distribution L of the distribution decreasing stage de
According to L ac +L de And/l rem Determining the number N of the initial segment of the distribution quantity increment 0 Number of end segments N of incremental distribution 1 Maximum distribution quantity end segment number N 2 And the number of entire interpolation segments N 3
According to the maximum distribution d max Number of start segment N of incremental distribution 0 Number of end segments N of incremental distribution 1 Maximum distribution quantity end segment number N 2 And the number of entire interpolation segments N 3 Calculating the main shaft distribution quantity required to be distributed in the first N interpolation periods of the main shaft, and respectively adding the N main shaft distribution quantities to main shaft interpolation step lengths in the first N interpolation periods;
and calculating the slave axis distribution amount by using the calculated master axis distribution amount, and respectively adding the N slave axis distribution amounts to slave axis interpolation step sizes of the first N interpolation periods.
Further, the maximum distribution L of the distribution increment stage ac And a maximum distribution L of the distribution decreasing stage de The calculation formula of (2) is as follows:
wherein Δd ac Represents the increment of the increment stage of the distribution quantity, delta d de Representing the decreasing amount of the distribution amount decreasing stage.
Further, the case L ac +L de >l rem The maximum distribution d is recalculated max Calculated according to the following formula:
wherein Δd ac Representing the incremental amount of the distribution amount increment stage.
Further, according to L ac +L de And/l rem Determining the number N of the initial segment of the distribution quantity increment 0 Number of end segments N of incremental distribution 1 Maximum distribution quantity end segment number N 2 And the number of entire interpolation segments N 3 Comprising:
if l rem ≥L ac +L de Then calculate N 0 、N 1 、N 2 And N 3 The formula is as follows:
wherein DeltaN 1 Representing the increment of the distribution quantityThe number of required segments, deltaN 3 Representing the number of segments required for decreasing the distribution quantity, delta N 2 Representing the number of segments required for maximum distribution, d max Representing when l rem ≥L ac +L de Maximum distribution quantity Δd at time max Representing the maximum amount of difference between adjacent distribution amounts, L representing the total length of the straight line segment;
if L ac +L de >l rem Delta N 2 =0, calculate N 0 、N 1 、N 2 And N 3 The formula is as follows:
wherein d max When L is represented by ac +L de >l rem Maximum amount of distribution at that time.
Further, the calculating the spindle distribution amount of the first N interpolation periods of the spindle, and increasing the N spindle distribution amounts to spindle interpolation step sizes of the first N interpolation periods, respectively, includes the following steps:
step 1: creating an array S [ N ] of N size]If l rem ≥L ac +L de Step 2 is executed; if l rem <L ac +L de Step 7 is executed;
step 2: order thei=1,temp=0,decimal_temp=0;
Step 3: judging N and N 0 、N 1 、N 2 、N 3 If N is the size of 0 <n≤N 1 Step 4 is executed; if N 1 ≤n≤N 2 Step 5 is executed; if N 2 ≤n≤N 3 Step 6 is executed; if N > N 3 Then execute the steps11;
Step 4: calculation of
Wherein S [ i ]]The principal axis distribution amount representing the i-th interpolation period, and N represents N 3 Dividing the S-shaped distribution into an ith section in N sections, wherein n= (i/N) N 3
Let decmal_temp plus the decimal part of S [ i ], if decmal_temp is greater than or equal to 1, S [ i ] is rounded down and added with 1, decmal_temp minus 1, if decmal_temp is less than 1, S [ i ] is rounded down;
temp=temp+S[i],i=i+1,repeating the step 3;
step 5: calculate S [ i ]]=d max (n-N 1 )+L ac -temp, let decimal_temp plus S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards;
temp=temp+S[i],i=i+1,repeating the step 3;
step 6: calculation ofWherein L is 2 =d max *(N 2 -N 1 )+L ac
Let decmal_temp plus the decimal part of S [ i ], if decmal_temp is greater than or equal to 1, S [ i ] is rounded down and added with 1, decmal_temp minus 1, if decmal_temp is less than 1, S [ i ] is rounded down;
temp=temp+S[i],i=i+1,repeating the step 3;
step 7: order thei=1,temp=0,decimal_temp=0;
Step 8: judging N and N 0 、N 1 、N 3 Is of a size of (2); if N 0 <n≤N 1 Step 9 is executed; if N 1 <n≤N 3 Step 10 is executed; if N > N 3 Step 11 is executed;
step 9: calculation ofAfterwards, let decimal_temp add S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards;
temp=temp+S[i],i=i+1,repeating the step 8;
step 10: calculation ofAfterwards, let decimal_temp add S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards;
temp=temp+S[i],i=i+1,repeating the step 8;
step 11: and respectively increasing the N main shaft distribution amounts to main shaft interpolation step sizes of the first N interpolation periods.
Further, the calculating the slave axis distribution amount by using the calculated master axis distribution amount, and increasing the slave axis distribution amount to the slave axis interpolation step length of the first N interpolation periods respectively includes:
step 1: creating a spindle S [ N ]]Arrays S' [ N ] of the same size]Acquiring an array S [ N ]]And a main shaft interpolation margin l rem And the slave axis interpolation margin l' rem Let i=1, decimal_temp=0;
step 2: judging the sizes of i and N, and if i is less than or equal to N, executing the step 3; if i is more than N, executing the step 4;
step 3: calculation ofLet decimal_temp add S' [ i ]]If decomal_temp is greater than or equal to 1, then S' [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S' [ i ]]Rounding downwards;
i=i+1, repeating step 2;
step 4: and adding N slave axis distribution quantities in the calculated array S' [ N ] to slave axis interpolation step sizes of the first N interpolation periods respectively.
Compared with the prior art, the invention has the remarkable advantages that: the method can solve the problem that the position command pulse in the last interpolation period is less than one interpolation step length, ensure the cutting precision while reducing the interpolation period, improve the running speed in the middle interpolation period, and avoid the shake caused by the change of the corner speed at the front and rear connection positions.
Drawings
FIG. 1 is a flow chart of a multiaxial compliant interpolation synchronization method based on EtherCAT of the present invention;
FIG. 2 is a schematic diagram of a motion trail of a multiaxial compliant interpolation synchronization method based on EtherCAT of the present invention;
FIG. 3 shows the number of interpolation pulses per interpolation period for an unprocessed X-axis;
FIG. 4 shows the number of interpolation pulses per interpolation period for an unprocessed Y-axis;
FIG. 5 shows the number of interpolation pulses per interpolation period for the X-axis of the isosceles trapezoid process;
FIG. 6 is a graph showing the number of interpolation pulses per interpolation period for the Y-axis of the isosceles trapezoid process;
FIG. 7 is a graph showing the number of interpolation pulses per interpolation period for the X-axis processed in accordance with the present invention;
FIG. 8 is a graph showing the number of interpolation pulses per interpolation period for the Y-axis processed by the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The multi-axis compliant interpolation synchronization method based on EtherCAT provided by the invention can be applied to interpolation of the motion tracks of the X axis and the Y axis of multi-axis manufacturing equipment.
The application range of the present invention includes a multi-axis manufacturing apparatus section, an alternating current servo driving section, and a control section. The multi-axis manufacturing apparatus portion in this embodiment includes: an x-axis and y-axis isokinetic frame and a support frame. The present embodiment is described by taking x-axis and y-axis as examples, but it is not meant to limit the application of the method of the present invention to two-axis control.
The alternating current servo motor works in a synchronous position mode and is used for outputting a position according to a pulse signal given by the controller and outputting a photoelectric encoder value, an angular velocity value and a moment value of a corresponding servo driver. The controller section includes: SOEM EtherCAT master station control panel, master station control panel include display screen module, ethernet control module, SD card module and USB flash disk module. The user can control the cutting machine through the display screen module to perform man-machine interaction. The SD card module and the U disk module are used for storing the graphic position information of the required cutting material. The master station control board is connected with the AC servo driver slave stations through the Ethernet control module and the network cable and is used for initializing the EtherCAT network, realizing the clock synchronization of master stations of the control board master station and the AC servo driver slave stations, sending the position information to each AC servo driver slave station, receiving the reference clock, the angular velocity value, the position information and the like fed back by the AC servo driver.
As shown in fig. 1, the initial position, the end position, the feeding speed, and the number of interpolation cycles of the line segment are recorded in the controller, and the interpolation cycle in this embodiment is 1ms. Taking a straight line of a machine tool plane as an example, according to the starting point coordinate and the ending point coordinate of the straight line, the total length L of the straight line segment can be obtained as follows:
in the above, x 0 ,y 0 Is a straight line origin coordinate value; x is x N ,y N Is the straight line end point coordinate value.
The time required by the linear track motion of the x axis and the y axis is t Total (S)
Where V is the current feed rate.
According to the total time t Total (S) And an interpolation period t=1ms, calculating a ratio M of the total time of the straight line segment to the interpolation period;
in most cases, e.g. acceleration and deceleration in the curve section of the cutter, time t Total (S) Not being an integer multiple of the interpolation period T, when T Total (S) When M is an integer multiple of the interpolation period T, the interpolation is directly performed without performing the interpolation margin processing. When t Total (S) When the distance is not the integer multiple of the interpolation period T, M is a decimal, and the fact that a small straight line section distance is remained after M is rounded, the distance is not full of the interpolation period distance of the current feeding speed, and motor shake is caused when the difference between the last section and the previous section of interpolation period is larger; when the last interpolation period of a program segment is unequal to the interpolation step length, special processing is required to be carried out on the last interpolation period, and the interpolation allowance of the last segment is marked as l rem After each interpolation period is executed, judgment is carried out: l (L) rem < VT, when l rem When VT is less than, the linear interpolation can be judged to enter the last interpolation period.
After determining that the linear interpolation enters the last interpolation period, there are generally two options for the last interpolation period: and (5) balancing the balance and not processing the balance.
Referring to fig. 2-8, when the last interpolation period is left unprocessed, if the remaining non-running length of the last interpolation period is smaller and the difference from the previous interpolation period is larger (the difference is in the order of 10 times), the distance that the last interpolation period segment moves within 1ms is larger than the difference between the previous interpolation step length and the first interpolation step length of the next segment connecting line segment, and the motor and the machine tool shake when the last interpolation period of the current segment is caused.
When the margin is uniformly spread for the last interpolation period, if the last interpolation period is larger and the difference between the last interpolation period and the previous interpolation period is smaller, the uniform spreading (n=m-1) for the previous N interpolation periods can result in a larger difference between interpolation step sizes at the joint of the previous straight line segment and the current straight line segment of the straight line segment in the curve segment, and also result in a larger difference between interpolation step sizes at the joint of the last straight line segment and the current straight line segment in the curve segment, and the shake between the motor and the machine tool is caused during the first interpolation period and the last interpolation period of the straight line segment.
In order to ensure the processing precision and the speed maximization and simultaneously meet the acceleration and deceleration characteristics and realize the smooth and soft speed, the algorithm adopts an S-shaped curve with continuous and smooth acceleration as a model for interpolation margin distribution. Because the traditional S-shaped speed control curve has seven sections, the algorithm is complex and complicated, and the simplified cubic S-shaped curve is adopted as the interpolation margin distribution model in consideration of the calculation force and the memory resource of the master station control chip, the invention not only ensures the continuity and smoothness in the interpolation margin distribution process, but also has convenient realization and higher efficiency.
The reference three-time S-shaped curve acceleration and deceleration process model is divided into three continuous stages:
acceleration stage T e [ T ] 0 ,T 1 ]Acceleration decreases from 0 to maximum to 0, and speed increases from 0 to maximum;
constant velocity stage T e [ T ] 1 ,T 2 ]Acceleration is 0, and the maximum value of the velocity value is kept unchanged;
deceleration stage T e [ T ] 2 ,T 3 ]The deceleration phase is the reverse of the acceleration phase.
The calculation formula of the velocity and the displacement can be obtained through deduction as follows:
velocity versus time (v-t) formula:
displacement versus time (S-t) formula:
wherein acceleration phase acceleration a ac Acceleration a during deceleration stage de And maximum velocity v max Is set by the control system; the maximum acceleration in the acceleration stage is equal to the maximum acceleration in the deceleration stage under normal conditions; v s And v e The start speed and the end speed, respectively.
Because to do with rem Performing interpolation allowance distribution, and at the moment, carrying out micro-differentiation on a (v-t) formula and a (S-t) formula model in the three S-shaped curve acceleration and deceleration process to obtain a (d-n) formula and a (L-n) formula:
the formula of the distribution quantity of the main shaft of each section and the number of sections (d-n):
the total principal axis distribution quantity and the segment number (L-n) formula:
after differentiation, d is defined because smooth connection between the first interpolation period and the last interpolation period and the front and rear straight line segments is avoided s =d e =0,d s And d e Principal axis components respectively of first interpolation periodThe distribution of the cloth amount and the main axis distribution of the last interpolation period, thereby obtaining the condition
The formula of the distribution quantity of the main shaft of each section and the number of sections (d-n):
the total principal axis distribution quantity and the segment number (L-n) formula:
after deriving the formula of total principal axis distribution and the number of segments (L-n), the principal axis distribution of each segment can be obtained from d (n) =l (n) -L (n-1), and in the following steps, the principal axis distribution of each segment of interpolation period is calculated from the formula of d (n) =l (n) -L (n-1).
Wherein the distribution amount increases by a step increment Δd ac The distribution amount decreasing stage decreases by an amount Δd de And a maximum distribution d max A fixed value set by the control system; the increment of the distribution quantity increasing stage and the decrement of the distribution quantity decreasing stage are generally equal, namely delta d ac =Δd de . After the micro-differentiation, and the following conditions must be satisfied:
L(N)=l rem
if the maximum distribution of the distribution increment stage is L ac The maximum distribution amount of the distribution amount decreasing stage is L de There are several cases:
1)L ac +L de ≤l rem the change process of the distribution quantity of the main shaft is increasing-unchanged-decreasing.
L ac And L de The calculation formula is as follows:
due to d s =d e =0; thus, it is possible to obtain:
2)L ac +L de >l rem the change process of the distribution quantity of the main shaft is increment-decrement
Interpolation margin l rem Not enough, the spindle distribution has not reached a given maximum distribution d max I.e. begin to decrement to the last segment. In this case, since the spindle distribution amount cannot reach the maximum distribution amount, it is necessary to recalculate the maximum distribution amount:
due to d s =d e =0; thus, it is possible to obtain:
and further deduce the number of segments delta N required for increasing the distribution quantity 1 The distribution quantity is reduced by the required segment quantity delta N 3 And the number of segments Δn required for the maximum distribution amount 2 Is calculated according to the formula:
due to d s =d e =0; thus, it is possible to obtain:
wherein d max Representing when l rem ≥L ac +L de Maximum distribution quantity Δd at time max Representing the maximum amount of difference between adjacent distribution amounts.
Number of starting segments N of incremental distribution 0 Number of end segments for incremental distribution(maximum distribution amount start segment number) N 1 Maximum distribution quantity end segment number N 2 Number of entire interpolation segments N 3 Calculated by the following formula:
the calculation of the interpolation margin processing for each segment of the main shaft is performed next by the above formula derivation:
step 1: acquisition parameters (interpolation margin l) rem Maximum distribution d max Representing the maximum phase difference Δd between adjacent distribution amounts max And the number of interpolation segments N).
Step 2: creating an array S [ N ] of N size]Calculating the maximum distribution d of the incoming max L below ac And L is equal to de And judge L ac +L de And/l rem If l is the size of rem ≥L ac +L de Step 3 is executed; if l rem <L ac +L de Step 8 is performed.
Step 3: calculating N 1 、N 2 、N 3 Order-making(i=1),temp=0,decimal_temp=0。
Step 4: judging N and N 0 、N 1 、N 2 、N 3 If N is the size of 0 <n≤N 1 Step 5 is executed; if N 1 ≤n≤N 2 Step 6 is executed; if N 2 ≤n≤N 3 Step 7 is executed; if N > N 3 Step 12 is performed.
Step 5: calculatingAfterwards, let decimal_temp add S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards; temp=temp+s [ i ]]、i=i+1,/>And (4) repeating the step 4.
Step 6: calculate S [ i ]]=d max (n-N 1 )+L ac -temp followed by decimal_temp plus S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards; temp=temp+s [ i ]]、i=i+1,And (4) repeating the step 4.
Step 7:wherein L is 2 =d max *(N 2 -N 1 )+L ac Let decimal_temp add S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards; temp=temp+s [ i ]]、i=i+1,/>And (4) repeating the step 4.
Step 8: recalculating the maximum distribution that can be achievedAt this time DeltaN 2 =0、N 1 =N 2Calculate->New L below ac And L de The method comprises the steps of carrying out a first treatment on the surface of the Let->(i=1),temp=0,decimal_temp=0。
Step 9: judgingBreaking N and N 0 、N 1 、N 3 Is of a size of (2); if N 0 <n≤N 1 Step 10 is executed; if N 1 <n≤N 3 Step 11 is executed; if N > N 3 Step 12 is performed.
Step 10:afterwards, let decimal_temp add S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards; temp=temp+s [ i ]],i=i+1,/>Step 9 is repeated.
Step 11:let decimal_temp add S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards; temp=temp+s [ i ]]、i=i+1,/>Step 9 is repeated.
Step 12: and adding the N main shaft distribution quantities in the array S to interpolation step sizes of the first N interpolation periods respectively.
After the corresponding main shaft distribution amount is calculated, the interpolation allowance of the main shaft is processed, and as the main shaft distribution amount of each section of interpolation period of the main shaft interpolation allowance is obtained, the main shaft can be calculated by directly utilizing the calculated main shaft distribution amount without using three times of S-type model calculation, the calculated result is not greatly different from the three times of S-type calculation, and the synchronous effect can be achieved.
Step 1: creating a spindle S [ N ]]Arrays S' [ N ] of the same size]Acquiring an array S [ N ]]And a main shaft interpolation margin l rem And the slave axis interpolation margin l' rem Let i=1, decimal_temp=0;
Step 2: judging the sizes of i and N, and if i is less than or equal to N, executing the step 3; if i is more than N, executing the step 4;
step 3: calculatingLet decimal_temp add S' [ i ]]If decomal_temp is greater than or equal to 1, then S' [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S' [ i ]]Rounding downwards; i=i+1, repeating step 2;
step 4: and adding N slave axis distribution quantities in the calculated array S' [ N ] to slave axis interpolation step sizes of the first N interpolation periods respectively.
The method calculates the S-shaped distribution algorithm of the spindle without repeating the spindle three times, reduces the time complexity and the space complexity and can meet the synchronous step length in interpolation.
The speed smoothness of EtherCAT multiaxial manufacturing equipment can be improved by applying the algorithm, one interpolation period is reduced, meanwhile, the cutting precision is achieved, meanwhile, the running speed is improved in the middle interpolation period, and shake caused by corner speed change at the front-rear joint is not influenced.
The invention is applied to the communication between the controller and the servo driver, and comprises the following steps:
step 1: the master station control board card initializes the Ethernet control chip, configures the Ethernet control chip to correspond to the master station control board pin mode and pin transmission speed, starts a pin bus clock, starts a network self-adaption function, closes feedback, closes retransmission function, closes automatic PDA/CRC removing function, closes all frames received, allows all broadcast frames to be received, closes address filtering in a mixed mode, uses the beauty address filtering for multicast addresses, and uses the beauty address filtering for unicast addresses. Starting DMA configuration, configuring a DMA bus clock, starting and discarding TCP/IP error frames, starting and discarding a forwarding mode of received data, starting and forwarding a storage mode of transmitted data, prohibiting forwarding of the error frames, configuring the maximum burst length of DMA transmission as 32 beats and configuring the maximum burst length of DMA reception as 32 beats; initializing a MAC address in an ethernet MAC; initializing Tx and Rx descriptor lists: chain mode, MAC and DMA transmission and reception enabled.
Step 2: the method comprises the steps that after an Ethernet control chip and DMA initialization are completed, SOEM binds socket to an ifname, the number of slave station nodes is obtained, a PDO structure is bound for the slave station, slave station site address registers of all alternating current servo drivers are configured, mailbox channel parameters are configured, motion parameters of all alternating current servo drivers are configured, distributed clock synchronization related registers are configured, clock synchronization among the slave stations is achieved, clock error estimation is carried out before each data frame transmitted next, error compensation sub-data frames caused by clock drift are carried out on all the alternating current servo drivers, and synchronization period and frame period errors are set; the master control board performs a write operation on the state control register of the ac servo driver slave to switch the slave driver state to the operating state, and transmits one data frame every 1ms.
Step 3: the master control board performs master-slave clock synchronization with the servo driver slave station.
Step 4: when the cutting start instruction is executed, the cutting machine performs track planning and speed planning according to the position information of the target file, calculates interpolation data (namely calculated position data) and stores the interpolation data in a buffer area, and periodically transmits the position information of the 1ms interpolation period in the calculated buffer area to a slave station servo driver in a csp mode in 1ms.
The above examples merely represent one or several embodiments of the present invention, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (6)

1. The EtherCAT-based multi-axis compliant interpolation synchronization method is characterized by comprising the following steps of:
calculating the total time of the straight line segment according to the total length of the straight line segment of the main shaft and the current feeding speed, calculating the ratio of the total time of the straight line segment to the interpolation period, and recording the interpolation allowance of the last interpolation period as l when the ratio of the total time of the straight line segment to the interpolation period is a decimal rem
Given a maximum distribution d max According to the maximum distribution d max Calculating the maximum distribution L of the distribution increment stage ac And a maximum distribution L of the distribution decreasing stage de Judgment of L ac +L de And/l rem If L is the size of ac +L de >l rem The maximum distribution d is recalculated max And according to the maximum distribution d max Calculating the maximum distribution L of the distribution increment stage ac And a maximum distribution L of the distribution decreasing stage de
According to L ac +L de And/l rem Determining the number N of the initial segment of the distribution quantity increment 0 Number of end segments N of incremental distribution 1 Maximum distribution quantity end segment number N 2 And the number of entire interpolation segments N 3
According to the maximum distribution d max Number of start segment N of incremental distribution 0 Number of end segments N of incremental distribution 1 Maximum distribution quantity end segment number N 2 And the number of entire interpolation segments N 3 Calculating the main shaft distribution quantity required to be distributed in the first N interpolation periods of the main shaft, and respectively adding the N main shaft distribution quantities to main shaft interpolation step lengths in the first N interpolation periods;
and calculating the slave axis distribution amount by using the calculated master axis distribution amount, and respectively adding the N slave axis distribution amounts to slave axis interpolation step sizes of the first N interpolation periods.
2. The EtherCAT-based multi-axis compliant interpolation synchronization method of claim 1, wherein the maximum distribution L of the distribution increment stage ac And a maximum distribution L of the distribution decreasing stage de The calculation formula of (2) is as follows:
wherein Δd ac Represents the increment of the increment stage of the distribution quantity, delta d de Representing the decreasing amount of the distribution amount decreasing stage.
3. The EtherCAT-based multi-axis compliant interpolation synchronization method of claim 1, wherein the if L ac +L de >l rem The maximum distribution d is recalculated max Calculated according to the following formula:
wherein Δd ac Representing the incremental amount of the distribution amount increment stage.
4. The EtherCAT-based multi-axis compliant interpolation synchronization method of claim 1, wherein the reference to L ac +L de And/l rem Determining the number N of the initial segment of the distribution quantity increment 0 Number of end segments N of incremental distribution 1 Maximum distribution quantity end segment number N 2 And the number of entire interpolation segments N 3 Comprising:
if l rem ≥L ac +L de Then calculate N 0 、N 1 、N 2 And N 3 The formula is as follows:
wherein DeltaN 1 Representing the need for incremental distributionNumber of segments, deltaN 3 Representing the number of segments required for decreasing the distribution quantity, delta N 2 Representing the number of segments required for maximum distribution, d max Representing when l rem ≥L ac +L de Maximum distribution quantity Δd at time max Representing the maximum amount of difference between adjacent distribution amounts, L representing the total length of the straight line segment;
if L ac +L de >l rem Delta N 2 =0, calculate N 0 、N 1 、N 2 And N 3 The formula is as follows:
wherein d max When L is represented by ac +L de >l rem Maximum amount of distribution at that time.
5. The EtherCAT-based multi-axis compliant interpolation synchronization method according to claim 4, wherein the calculating the main axis distribution amount of the main axis required to be distributed in the first N interpolation periods, and adding the N main axis distribution amounts to main axis interpolation step sizes of the first N interpolation periods, respectively, includes the following steps:
step 1: creating an array S [ N ] of N size]If l rem ≥L ac +L de Step 2 is executed; if l rem <L ac +L de Step 7 is executed;
step 2: order thei=1,temp=0,decimal_temp=0;
Step 3: judging N and N 0 、N 1 、N 2 、N 3 If N is the size of 0 <n≤N 1 Then executeStep 4, line; if N 1 ≤n≤N 2 Step 5 is executed; if N 2 ≤n≤N 3 Step 6 is executed; if N > N 3 Step 11 is executed;
step 4: calculation of
Wherein S [ i ]]The principal axis distribution amount representing the i-th interpolation period, and N represents N 3 Dividing the S-shaped distribution into an ith section in N sections, wherein n= (i/N) N 3
Let decmal_temp plus the decimal part of S [ i ], if decmal_temp is greater than or equal to 1, S [ i ] is rounded down and added with 1, decmal_temp minus 1, if decmal_temp is less than 1, S [ i ] is rounded down;
temp=temp+S[i],i=i+1,repeating the step 3;
step 5: calculate S [ i ]]=d max (n-N 1 )+L ac -temp, let decimal_temp plus S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards;
temp=temp+S[i],i=i+1,repeating the step 3;
step 6: calculation ofWherein L is 2 =d max *(N 2 -N 1 )+L ac
Let decmal_temp plus the decimal part of S [ i ], if decmal_temp is greater than or equal to 1, S [ i ] is rounded down and added with 1, decmal_temp minus 1, if decmal_temp is less than 1, S [ i ] is rounded down;
temp=temp+S[i],i=i+1,repeating the step 3;
step 7: order thei=1,temp=0,decimal_temp=0;
Step 8: judging N and N 0 、N 1 、N 3 Is of a size of (2); if N 0 <n≤N 1 Step 9 is executed; if N 1 <n≤N 3 Step 10 is executed; if N > N 3 Step 11 is executed;
step 9: calculation ofAfterwards, let decimal_temp add S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards;
temp=temp+S[i],i=i+1,repeating the step 8;
step 10: calculation ofAfterwards, let decimal_temp add S [ i ]]If decomal_temp is greater than or equal to 1, then S [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S [ i ]]Rounding downwards;
temp=temp+S[i],i=i+1,repeating the step 8;
step 11: and respectively increasing the N main shaft distribution amounts to main shaft interpolation step sizes of the first N interpolation periods.
6. The EtherCAT-based multi-axis compliant interpolation synchronization method of claim 5, wherein calculating the slave axis distribution amount using the calculated master axis distribution amount, increasing the N slave axis distribution amounts to the slave axis interpolation step sizes of the first N interpolation periods, respectively, comprises:
step 1: creating a spindle S [ N ]]Arrays S' [ N ] of the same size]Acquiring an array S [ N ]]And a main shaft interpolation margin l rem And the slave axis interpolation margin l rem Let i=1, decimal_temp=0;
step 2: judging the sizes of i and N, and if i is less than or equal to N, executing the step 3; if i is more than N, executing the step 4;
step 3: calculation ofLet decimal_temp add S' [ i ]]If decomal_temp is greater than or equal to 1, then S' [ i ]]Rounding down and adding 1, decmal_temp minus 1, if decmal_temp < 1, then S' [ i ]]Rounding downwards;
i=i+1, repeating step 2;
step 4: and adding N slave axis distribution quantities in the calculated array S' [ N ] to slave axis interpolation step sizes of the first N interpolation periods respectively.
CN202311312669.XA 2023-10-11 2023-10-11 EtherCAT-based multi-axis compliant interpolation synchronization method Pending CN117331347A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311312669.XA CN117331347A (en) 2023-10-11 2023-10-11 EtherCAT-based multi-axis compliant interpolation synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311312669.XA CN117331347A (en) 2023-10-11 2023-10-11 EtherCAT-based multi-axis compliant interpolation synchronization method

Publications (1)

Publication Number Publication Date
CN117331347A true CN117331347A (en) 2024-01-02

Family

ID=89275124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311312669.XA Pending CN117331347A (en) 2023-10-11 2023-10-11 EtherCAT-based multi-axis compliant interpolation synchronization method

Country Status (1)

Country Link
CN (1) CN117331347A (en)

Similar Documents

Publication Publication Date Title
CN107229240B (en) EtherCAT-based multi-axis synchronous control device and method
US7904184B2 (en) Motion control timing models
US6757583B2 (en) Interpolated motion control over a serial network
CN106411184B (en) The multi-axle motor sync control device and method of a kind of networking
US7930041B2 (en) Industrial controller with coordination of network transmissions using global clock
US7525263B2 (en) Control system
JP4691601B2 (en) Method, communication network, and control apparatus for cyclic transmission of data
CN106603367A (en) CAN bus communication method for time synchronization
EP0060563A1 (en) Industrial articulated robot linear interpolation control device
CN103425106A (en) Linux-based Ethercat maser/slave station control system and method
CN102130640A (en) Multishaft synchronous servo driving system and synchronous control method thereof
CA2612564A1 (en) Method for data communication of bus users in an open automation system
EP3361635B1 (en) Control system and pulse output device
CN113485205B (en) CANBUS bus-based servo driver clock synchronization and position reconstruction method
US10606225B2 (en) Motor drive system, motor control system, and self-propelled robot
CN117331347A (en) EtherCAT-based multi-axis compliant interpolation synchronization method
CN107861414B (en) Method and system for realizing synchronous motion of servo motor, main controller and servo driver
CN111800054B (en) Multipoint position comparison system and method based on real-time Ethernet
CN110855537B (en) EtherCAT main station implementation method and system based on double MCUs
CN101349907A (en) Numerical control system and method for optimizing data stream
EP4169672A1 (en) Multi-axis servo control system
CN213545092U (en) Control system based on EtherCat bus
JP4118695B2 (en) Numerical control system
CN105334806A (en) Method and system for controlling motions of industrial robot based on EtherCAT bus
CN111522313A (en) Method for controlling servo motor curve motion based on CANOPEN protocol

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination