CN111123843A - Servo driver period synchronous position instruction processing method - Google Patents

Servo driver period synchronous position instruction processing method Download PDF

Info

Publication number
CN111123843A
CN111123843A CN201911366868.2A CN201911366868A CN111123843A CN 111123843 A CN111123843 A CN 111123843A CN 201911366868 A CN201911366868 A CN 201911366868A CN 111123843 A CN111123843 A CN 111123843A
Authority
CN
China
Prior art keywords
instruction
servo driver
synchronization
ethercat
synchronous
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.)
Granted
Application number
CN201911366868.2A
Other languages
Chinese (zh)
Other versions
CN111123843B (en
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.)
Shenzhen Kstar New Energy Co Ltd
Shenzhen Kstar Technology Co Ltd
Original Assignee
Shenzhen Kstar New Energy Co Ltd
Shenzhen Kstar Technology Co Ltd
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 Shenzhen Kstar New Energy Co Ltd, Shenzhen Kstar Technology Co Ltd filed Critical Shenzhen Kstar New Energy Co Ltd
Priority to CN201911366868.2A priority Critical patent/CN111123843B/en
Publication of CN111123843A publication Critical patent/CN111123843A/en
Application granted granted Critical
Publication of CN111123843B publication Critical patent/CN111123843B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/414Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller
    • G05B19/4142Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller characterised by the use of a microprocessor
    • 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/34013Servocontroller
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (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 provides a servo driver period synchronous position instruction processing method, which comprises the following steps: step S1, a position instruction Queue is established in the servo driver; step S2, when the MCU of the servo driver triggers EtherCAT synchronous interruption, calculating the fine value of the position ring, and realizing the enqueue operation of the position instruction Queue; step S3, when the MCU of the servo driver triggers the position ring interruption, the dequeue operation of the position instruction Queue is realized when the condition is met; step S4, adjusting the position command in real time to achieve position synchronization. The invention ensures that the command input synchronization effect of each position ring is good, improves the stability of a servo system and also improves the synchronization of position commands; the method can ensure that when the MCU of the servo driver executes synchronous interrupt position instruction adjustment, even if interrupted by the interrupt of the position ring with high priority, the instruction of the position ring is continuous.

Description

Servo driver period synchronous position instruction processing method
Technical Field
The invention relates to the technical field of servo driver Control, in particular to a servo driver period synchronization position instruction processing method based on EtherCAT (Ethernet for Control Automation technology).
Background
With the continuous development of modern industry and motion control, the role of a servo system in the field of industrial control is more important, and the market demand is rising day by day. Meanwhile, the modern complex industrial application environment puts forward high-speed and high-precision control requirements on a servo system, and the traditional pulse command and analog quantity control mode cannot meet the requirements.
The industrial Ethernet is developed to lead the servo system to be integrated, digitalized and networked. The EtherCAT (Ethernet for Control Automation technology) bus technology has the advantages of high transmission speed, high reliability, good real-time property, accurate synchronization and the like, and is popular among home and abroad servo manufacturers. The EtherCAT bus technology supports the CiA402(Device Profile Drives and Motion Control) protocol, and combines the characteristics of the EtherCAT technology, and new servo working modes such as a periodic synchronous position mode, a periodic synchronous speed mode and a periodic synchronous torque mode are added, wherein the periodic synchronous position mode is most commonly used.
Fig. 2 shows input/output targets in the periodic synchronous position mode, and when the servo driver operates in this mode, the EtherCAT master station periodically transmits planned position commands. For the servo driver based on the EtherCAT, an independent slave chip is needed for realizing the EtherCAT bus technology, and a bus synchronization signal is sent to the MCU of the servo driver through external interruption. In practical application, the EtherCAT synchronization period is larger than the servo position loop period, and if the synchronization period is too large, no position command is input in the position loop before the next synchronization signal arrives, so that the stability of a servo system is influenced. And because the MCU of the servo driver and the clock of the EtherCAT slave chip are independent, a control loop with higher priority than the EtherCAT synchronous interruption is interrupted in the MCU of the servo driver, so that a position instruction issued by a master station cannot be strictly time synchronous, and the control accuracy is influenced.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a servo driver cycle synchronization position instruction processing method based on ethercat (ethernet for Control Automation technology) to ensure synchronization and improve Control accuracy.
To this end, the present invention provides a method for processing a servo driver periodic synchronization position command, comprising the following steps:
step S1, a position instruction Queue is established in the servo driver;
step S2, when the MCU of the servo driver triggers EtherCAT synchronous interruption, calculating the fine value of the position ring, and realizing the enqueue operation of the position instruction Queue;
step S3, when the MCU of the servo driver triggers the position ring interruption, the dequeue operation of the position instruction Queue is realized when the condition is met;
step S4, adjusting the position command in real time to achieve position synchronization.
In a further improvement of the present invention, in the step S1, a ratio K between the synchronization period T1 and the position loop period T2 is calculated through the synchronization period T1 of the EtherCAT master station and the position loop period T2 of the servo drive, and then a position command Queue is created in the servo drive.
In a further refinement of the present invention, the value of the synchronization period T1 is an integer multiple of the position ring period T2, and the size of the elements that can be accommodated in the position instruction Queue is greater than 2 × K.
In step S2, when the MCU of the servo driver triggers EtherCAT synchronous interrupt, the fine value of the position loop is first calculated, and the process of calculating the fine value of the position loop is as follows: and equally dividing the position instruction transmitted from the EtherCAT master station at the current times according to the K value, wherein the equally divided result corresponds to the instruction input value of each position ring in the EtherCAT synchronous period, and the equally divided remainder is compensated into each position ring to serve as the subdivision value of the position ring.
The invention is further improved in that the calculated instruction input value and the subdivision value thereof of each position ring are input into the position instruction Queue by a first-in first-out principle to realize enqueue operation.
In a further improvement of the present invention, the step S2 of calculating the subdivision value of the position ring and compensating the equally divided equal remainder to each position ring includes:
step S201, if the issuing position instruction of the EtherCAT master station which is synchronously interrupted for the Nth time is Sn-1, and the issuing position instruction of the EtherCAT master station which is synchronously interrupted for the Nth time is Sn, the formula is used
Figure BDA0002338651750000021
Calculating an aliquot remainder SRWherein S delta is a position instruction issued by the EtherCAT master station at the current time, S delta is Sn-Sn-1, and N is a natural number;
step S202, judging an equal division remainder SRCompensation of the position loop is implemented.
A further refinement of the invention is that said step S202 comprises the following sub-steps:
step S2021, when the equal division remainder SRWhen the value is equal to 0, the command is issued in K position ring commands within the time interval of the N-1 st synchronous interrupt and the Nth synchronous interrupt
Figure BDA0002338651750000022
m=1,2,…,K,SmFor each position loop instruction within a sync break interval;
step S2022, when the equal division remainder SR>When 0, the process of the equal division remainder compensation is the first S within the time interval of the N-1 time synchronous interruption and the Nth time synchronous interruptionRIn a position ring instruction, instruction
Figure BDA0002338651750000031
m=1,2,…,SR(ii) a In the remaining position loop instructions, the instruction
Figure BDA0002338651750000032
m=(SR+1),(SR+2),…,(SR+(K-SR));
Step S2023, when the equal division remainder SR<When 0, the equal division remainder compensation is needed, and the process of the equal division remainder compensation is thatFirst | S within N-1 st sync break and Nth sync break time intervalRIn the | position ring instruction, the order
Figure BDA0002338651750000033
m=1,2,…,|SRL, |; in the remaining position loop instructions, the instruction
Figure BDA0002338651750000034
m=(|SR|+1),(|SR|+2),…,(|SR|+(K-|SR|))。
The further improvement of the present invention is that in step S3, when the MCU of the servo driver triggers the position loop interrupt, it is determined whether the elements stored in the position instruction Queue are greater than the ratio K, if so, it is determined that the conditions are met, and the dequeue operation of the position instruction Queue is implemented by the first-in first-out principle.
The further improvement of the present invention is that the step S4 adjusts the position command in real time to implement the position synchronization, and the implementation process is as follows: starting from the 2 nd EtherCAT synchronous interruption, before executing the synchronous interruption position instruction subdivision of the step S2, the number K' of the elements remaining in the position instruction Queue is judged, and then the corresponding synchronous control is realized.
The further improvement of the invention lies in that the number K' of the elements left in the position instruction Queue is judged, and then the corresponding synchronous control is realized, and the method specifically comprises the following substeps:
step S401, when the element number K '< the ratio K, it is indicated that the MCU clock of the servo driver is faster than the EtherCAT slave station clock, and in the subdivision process of the position ring in step S2, the ratio K is equally divided after being replaced by the value of (K + (K-K'));
step S402, when the element number K 'is greater than the ratio K, the MCU clock of the servo driver is slower than the EtherCAT slave station clock, at this time, dequeuing operation needs to be carried out on the position instruction Queue until the element number K' is equal to the ratio K, the position instruction taken out from the position instruction Queue is superposed on a new position instruction, and then the step S2 is skipped to carry out equal division according to the ratio K;
in step S403, when the number K' of elements is equal to the ratio K, the process directly proceeds to step S2 to perform the dividing operation.
Compared with the prior art, the invention has the beneficial effects that: for the condition that the synchronization period of the EtherCAT host is greater than the period of the position ring of the servo driver, a position instruction subdivision method in the synchronization period is adopted, so that the instruction input synchronization effect of each position ring is good, and the stability of a servo system is improved; on the basis, for the condition that the clocks of the MCU of the servo driver and the EtherCAT slave station chip are independent, the subdivision instruction input of the position ring is adjusted by judging the residual size of the position instruction Queue in real time in EtherCAT synchronous interruption, the synchronism of the position instruction is improved on the premise of ensuring the stable control of the servo driver, and the method has important significance for multi-axis synchronization based on the EtherCAT; in addition, the position loop instruction of the invention always delays one synchronous cycle execution relative to the EtherCAT synchronous position instruction, thereby ensuring that the instruction of the position loop is continuous even if interrupted by the position loop interruption with high priority when the MCU of the servo driver executes the synchronous interruption position instruction adjustment, and further improving the stability of the servo system.
Drawings
FIG. 1 is a schematic workflow diagram of one embodiment of the present invention;
FIG. 2 is a schematic diagram of an input/output object in a periodic synchronous position mode according to an embodiment of the present invention;
FIG. 3 is a detailed workflow diagram of one embodiment of the present invention;
FIG. 4 is a diagram of a location instruction Queue according to an embodiment of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
As shown in fig. 1, fig. 3 and fig. 4, this example provides a method for processing a servo driver periodic synchronization position command, including the following steps:
step S1, a position instruction Queue is established in the servo driver;
step S2, when the MCU of the servo driver triggers EtherCAT synchronous interruption, calculating the fine value of the position ring, and realizing the enqueue operation of the position instruction Queue;
step S3, when the MCU of the servo driver triggers the position ring interruption, the dequeue operation of the position instruction Queue is realized when the condition is met;
step S4, adjusting the position command in real time to achieve position synchronization.
The EtherCAT refers to Ethernet for Control Automation Technology, that is, Ethernet for Control Automation Technology; in step S1, a ratio K between the synchronization period T1 and the position loop period T2 is calculated through the synchronization period T1 of the EtherCAT master station and the position loop period T2 of the servo drive, and then a position instruction Queue is created in the servo drive. The value of the synchronization period T1 is an integer multiple of the position ring period T2, and the size of the element that can be contained in the position instruction Queue is greater than 2 × K.
The method aims to ensure the instruction input of each position ring under the condition that the EtherCAT synchronization period is greater than the position ring period, and improve the stability of the servo system. Meanwhile, the EtherCAT-based servo driver cycle synchronization position instruction processing method can ensure the synchronization of position instructions and the control accuracy under the condition that the EtherCAT synchronization signal interruption is interrupted by high-priority interruption in the MCU of the servo driver.
In this embodiment, the synchronization period T1 in step S1 is a period set by the user through the EtherCAT master controller, and can be set and adjusted by user-definition according to actual needs, and the value of the synchronization period T1 can be obtained through the EtherCAT object parameter after communication connection. The position loop period T2 of the servo driver is a driver parameter and belongs to a factory fixed value of the servo driver. If the synchronization period T1 is set to 2ms, and the position loop period T2 leaves the factory to 250us, the ratio K is 2000us/250us is 8. The position instruction Queue created is a circular Queue data structure, and the first-in first-out principle is followed, the head of the Queue is deleted, and the tail of the Queue is inserted, as shown in fig. 4: in fig. 4, (a) is an initial state where the queue capacity size is 8, q.front is a head of queue pointer, and q.rear is a tail of queue pointer; in FIG. 4, (b) is a queue enqueue operation, where data is inserted from the end of the queue, and the end of the queue pointer is incremented by 1 for each data enqueue; in FIG. 4, (c) for a queue dequeue operation, data is taken from the head of the queue, and the head of the queue pointer is incremented by 1 for each dequeue of data.
In step S2 in this example, when the MCU of the servo driver triggers EtherCAT synchronous interrupt, the subdivision value of the position loop is first calculated, and the process of calculating the subdivision value of the position loop is as follows: and equally dividing the position instruction transmitted from the EtherCAT master station at the current times according to the K value, wherein the equally divided result corresponds to the instruction input value of each position ring in the EtherCAT synchronous period, and the equally divided remainder is compensated into each position ring to serve as the subdivision value of the position ring.
In this embodiment, the calculated instruction input value and its subdivision value of each position ring are input into the position instruction Queue by a first-in first-out principle to implement enqueue operation.
The process of calculating the subdivision values of the position rings and compensating the equally divided remainder to each position ring in step S2 includes:
step S201, the position instruction issued by the EtherCAT main station is an absolute position, the position instruction processed by the internal position ring of the servo driver is a position increment, K position rings execute in the time interval triggered by each EtherCAT synchronous interruption, the position instruction issued by the EtherCAT main station in the N-1 th synchronous interruption is Sn-1, the position instruction issued by the EtherCAT main station in the N-th synchronous interruption is Sn, and the position instruction issued by the EtherCAT main station in the N-th synchronous interruption is calculated according to a formula
Figure BDA0002338651750000051
Calculating an aliquot remainder SRWherein S delta is a position instruction issued by the EtherCAT master station at the current time, S delta is Sn-Sn-1, and N is a natural number;
step S202, judging an equal division remainder SRCompensation of the position loop is implemented.
Step S202 in this example comprises the following substeps:
step S2021, when the equal division remainder SRWhen equal to 0, the N-1 synchronous interruption and the NIn the K position ring instructions within the synchronous interrupt time interval, the instruction
Figure BDA0002338651750000052
m=1,2,…,K,SmFor each position loop instruction within a sync break interval;
step S2022, when the equal division remainder SR>When 0, the process of the equal division remainder compensation is the first S within the time interval of the N-1 time synchronous interruption and the Nth time synchronous interruptionRIn a position ring instruction, instruction
Figure BDA0002338651750000053
m=1,2,…,SR(ii) a In the remaining position loop instructions, the instruction
Figure BDA0002338651750000054
m=(SR+1),(SR+2),…,(SR+(K-SR));
Step S2023, when the equal division remainder SR<When 0, the process of the equal division remainder compensation is the first | S within the time interval of the N-1 st synchronous interruption and the Nth synchronous interruptionRIn the | position ring instruction, the order
Figure BDA0002338651750000061
m=1,2,…,|SRL, |; in the remaining position loop instructions, the instruction
Figure BDA0002338651750000062
m=(|SR|+1),(|SR|+2),…,(|SR|+(K-|SR|))。
The substeps S2021 to S2023 in step S202 described in this example do not have to be performed in sequence, but may be performed in an order of adjusting the determination according to actual situations, and similar to the substep in step S4, belong to steps of performing corresponding skipping and control according to different situations.
In step S3, when the MCU of the servo driver triggers the position loop interrupt, it is determined whether the elements stored in the position instruction Queue are greater than the ratio K, that is, the position instruction performs position loop operation after delaying a synchronization cycle, if so, it is determined that the condition is satisfied, and dequeue operation of the position instruction Queue is implemented by the first-in first-out principle; due to the first-in first-out characteristic of the queue data structure, the sequence of the position instructions is ensured.
Because the interrupt priority of the position ring in the MCU of the servo driver is higher than the EtherCAT synchronization and the position ring runs independently with the EtherCAT slave chip, the actual position instruction executed by the position ring is asynchronous with the position instruction issued by the master station, and the position instruction needs to be adjusted in real time to ensure the synchronism of the position.
Therefore, the step S4 is set in this example to adjust the position command in real time, so as to achieve the position synchronization as follows: starting from the 2 nd EtherCAT synchronous interruption, before executing the synchronous interruption position instruction subdivision of the step S2, the number K' of the elements remaining in the position instruction Queue is judged, and then the corresponding synchronous control is realized.
As shown in fig. 3, in step S4, the present embodiment determines the number K' of elements remaining in the position instruction Queue, so as to implement the corresponding synchronization control, and specifically includes the following sub-steps:
step S401, when the element number is K'<When the ratio K is higher, it indicates that the MCU clock of the servo driver is faster than the slave clock of EtherCAT, and indicates that (K + (K-K')) position loops are executed in the previous sync interrupt, and SR is in the position command subdivision of step S2
Figure BDA0002338651750000063
The other subdivision processing is the same as step S2; therefore, in the process of subdividing the position ring in step S2, the ratio K is divided equally after being replaced by the value of (K + (K-K'));
step S402, when the element number is K'>When the ratio K is lower, the MCU clock of the servo driver is slower than the EtherCAT slave station clock, and only a (K- (K' -K)) position loop executes in the previous synchronous interrupt, so that the position instructions accumulated in the Queue need to be taken out and accumulated to SΔUntil the Queue is leftThe number of the remaining elements is K, and other subdivision processing is the same as the step S2; therefore, at this time, dequeuing operation needs to be performed on the position instruction Queue until the number K' of elements is equal to the ratio K, and after the position instruction taken out from the position instruction Queue is superposed on the new position instruction, the step S2 is skipped to perform equal division according to the ratio K;
in step S403, when the number K' of elements is equal to the ratio K, the process directly proceeds to step S2 to perform the dividing operation.
As can be seen from fig. 3, steps S401 to S403 are not sequential steps, but steps for performing corresponding jumping and control under different conditions, for example, steps S401 to S403 may be sequential, or as shown in fig. 3, a method of determining whether step S403 is satisfied, and if not, jumping to steps S402 and S401 may be performed.
In summary, for the case that the synchronization period of the EtherCAT host is greater than the period of the position loop of the servo driver, the present embodiment adopts the position instruction subdivision method in the synchronization period, so that the instruction input of each position loop is ensured, the stability of the servo system is improved, and the synchronization effect is good; on the basis, for the condition that the clocks of the MCU of the servo driver and the EtherCAT slave station chip are independent, the subdivision instruction input of the position ring is adjusted by judging the residual size of the position instruction Queue in real time in EtherCAT synchronous interruption, the synchronism of the position instruction is improved on the premise of ensuring the stable control of the servo driver, and the method has important significance for multi-axis synchronization based on the EtherCAT; in addition, the position loop instruction of the embodiment always delays the execution of a synchronous period relative to the EtherCAT synchronous position instruction, so that the continuity of the position loop instruction can be ensured even if the interruption of the position loop with high priority is interrupted when the MCU of the servo driver executes the synchronous interruption position instruction adjustment, and the stability of a servo system is further improved.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. A servo driver cycle synchronization position command processing method is characterized by comprising the following steps:
step S1, a position instruction Queue is established in the servo driver;
step S2, when the MCU of the servo driver triggers EtherCAT synchronous interruption, calculating the fine value of the position ring, and realizing the enqueue operation of the position instruction Queue;
step S3, when the MCU of the servo driver triggers the position ring interruption, the dequeue operation of the position instruction Queue is realized when the condition is met;
step S4, adjusting the position command in real time to achieve position synchronization.
2. The servo drive cycle synchronization position command processing method of claim 1, wherein in step S1, the ratio K between the synchronization period T1 and the position loop period T2 is calculated by the synchronization period T1 of the EtherCAT master station and the position loop period T2 of the servo drive, and then a position command Queue is created in the servo drive.
3. The servo driver period synchronization position instruction processing method according to claim 2, wherein the value of the synchronization period T1 is an integer multiple of the position loop period T2, and the size of the element that can be accommodated in the position instruction Queue is greater than 2 × K.
4. The method for processing the servo driver periodic synchronization position command according to claim 2 or 3, wherein in step S2, when the MCU of the servo driver triggers EtherCAT synchronous interrupt, the subdivision value of the position loop is first calculated, and the process of calculating the subdivision value of the position loop is as follows: and equally dividing the position instruction transmitted from the EtherCAT master station at the current times according to the K value, wherein the equally divided result corresponds to the instruction input value of each position ring in the EtherCAT synchronous period, and the equally divided remainder is compensated into each position ring to serve as the subdivision value of the position ring.
5. The servo driver cycle synchronization position command processing method according to claim 4, wherein the calculated command input value and its subdivision value of each position ring are input into the position command Queue by a first-in first-out principle to realize enqueue operation.
6. The servo driver cycle synchronization position command processing method according to claim 4, wherein the step S2 of calculating the subdivision value of the position loop and compensating the equally divided remainder to each position loop comprises:
step S201, if the issuing position instruction of the EtherCAT master station which is synchronously interrupted for the Nth time is Sn-1, and the issuing position instruction of the EtherCAT master station which is synchronously interrupted for the Nth time is Sn, the formula is used
Figure FDA0002338651740000011
Calculating an aliquot remainder SRWherein S delta is a position instruction issued by the EtherCAT master station at the current time, S delta is Sn-Sn-1, and N is a natural number;
step S202, judging an equal division remainder SRCompensation of the position loop is implemented.
7. The servo driver cycle synchronization position command processing method according to claim 6, wherein the step S202 comprises the following sub-steps:
step S2021, when the equal division remainder SRWhen the value is equal to 0, the command is issued in K position ring commands within the time interval of the N-1 st synchronous interrupt and the Nth synchronous interrupt
Figure FDA0002338651740000021
SmFor each position loop instruction within a sync break interval;
step S2022, when the equal division remainder SR>At 0 time, it is necessary toThe process of the equal remainder compensation is the first S within the time interval of the N-1 synchronous interruption and the Nth synchronous interruptionRIn a position ring instruction, instruction
Figure FDA0002338651740000022
In the remaining position loop instructions, the instruction
Figure FDA0002338651740000023
Figure FDA0002338651740000024
Step S2023, when the equal division remainder SR<When 0, the process of the equal division remainder compensation is the first | S within the time interval of the N-1 st synchronous interruption and the Nth synchronous interruptionRIn the | position ring instruction, the order
Figure FDA0002338651740000025
In the remaining position loop instructions, the instruction
Figure FDA0002338651740000026
Figure FDA0002338651740000027
8. The method for processing the servo driver periodic synchronization position command according to claim 2 or 3, wherein in step S3, when the MCU of the servo driver triggers the position loop interrupt, it is determined whether the elements stored in the position command Queue are greater than the ratio K, if so, it is determined that the condition is satisfied, and the dequeue operation of the position command Queue is implemented by the first-in first-out principle.
9. The servo driver cycle synchronization position command processing method according to claim 2 or 3, wherein the step S4 adjusts the position command in real time to achieve position synchronization as follows: starting from the 2 nd EtherCAT synchronous interruption, before executing the synchronous interruption position instruction subdivision of the step S2, the number K' of the elements remaining in the position instruction Queue is judged, and then the corresponding synchronous control is realized.
10. The servo driver cycle synchronization position instruction processing method according to claim 9, wherein the number K' of remaining elements in the position instruction Queue is determined, so as to implement corresponding synchronization control, and the method specifically includes the following sub-steps:
step S401, when the element number K '< the ratio K, it is indicated that the MCU clock of the servo driver is faster than the EtherCAT slave station clock, and in the subdivision process of the position ring in step S2, the ratio K is equally divided after being replaced by the value of (K + (K-K'));
step S402, when the element number K 'is greater than the ratio K, the MCU clock of the servo driver is slower than the EtherCAT slave station clock, at this time, dequeuing operation needs to be carried out on the position instruction Queue until the element number K' is equal to the ratio K, the position instruction taken out from the position instruction Queue is superposed on a new position instruction, and then the step S2 is skipped to carry out equal division according to the ratio K;
in step S403, when the number K' of elements is equal to the ratio K, the process directly proceeds to step S2 to perform the dividing operation.
CN201911366868.2A 2019-12-26 2019-12-26 Servo driver period synchronous position instruction processing method Active CN111123843B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911366868.2A CN111123843B (en) 2019-12-26 2019-12-26 Servo driver period synchronous position instruction processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911366868.2A CN111123843B (en) 2019-12-26 2019-12-26 Servo driver period synchronous position instruction processing method

Publications (2)

Publication Number Publication Date
CN111123843A true CN111123843A (en) 2020-05-08
CN111123843B CN111123843B (en) 2023-03-28

Family

ID=70503122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911366868.2A Active CN111123843B (en) 2019-12-26 2019-12-26 Servo driver period synchronous position instruction processing method

Country Status (1)

Country Link
CN (1) CN111123843B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111775145A (en) * 2020-06-01 2020-10-16 上海大学 Control system of series-parallel robot

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5046022A (en) * 1988-03-10 1991-09-03 The Regents Of The University Of Michigan Tele-autonomous system and method employing time/position synchrony/desynchrony
JP2004173141A (en) * 2002-11-22 2004-06-17 Yaskawa Electric Corp Method for tracing multiple-axis data
JP2008154407A (en) * 2006-12-20 2008-07-03 Juki Corp Serial communication device for controlling motor
CN102207732A (en) * 2011-06-15 2011-10-05 上海三一精机有限公司 Monitoring system for servo driving system
CN109460011A (en) * 2018-12-25 2019-03-12 欧瑞传动电气股份有限公司 For the comprehensive performance test device and method of bus type kinetic control system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5046022A (en) * 1988-03-10 1991-09-03 The Regents Of The University Of Michigan Tele-autonomous system and method employing time/position synchrony/desynchrony
JP2004173141A (en) * 2002-11-22 2004-06-17 Yaskawa Electric Corp Method for tracing multiple-axis data
JP2008154407A (en) * 2006-12-20 2008-07-03 Juki Corp Serial communication device for controlling motor
CN102207732A (en) * 2011-06-15 2011-10-05 上海三一精机有限公司 Monitoring system for servo driving system
CN109460011A (en) * 2018-12-25 2019-03-12 欧瑞传动电气股份有限公司 For the comprehensive performance test device and method of bus type kinetic control system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李文虎: "伺服驱动器工业以太网接口设计-基于EtherCAT与CANopen技术", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111775145A (en) * 2020-06-01 2020-10-16 上海大学 Control system of series-parallel robot

Also Published As

Publication number Publication date
CN111123843B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
CN102130640B (en) Multishaft synchronous servo driving system and synchronous control method thereof
CN106603367A (en) CAN bus communication method for time synchronization
CN102025276B (en) Clock domain crossing controller of digital control switch power supply and control method thereof
CN202094830U (en) Multiaxial synchronizing servo drive system
US7525263B2 (en) Control system
WO2013102338A1 (en) Method for synchronizing starting point and end point in open numerical control system, and servo drive
EP1906283A2 (en) Motion control timing models
US4935942A (en) Data sampling architecture
CN105049309A (en) Servo driver synchronization method based on POWERLINK real-time Ethernet
JP7394986B2 (en) Method of transmitting data packets and apparatus for implementing this method
CN111123843B (en) Servo driver period synchronous position instruction processing method
CN104536835B (en) Self-adapting task scheduling method in a kind of Hot Spare real-time control system
EP3930266A1 (en) Packet scheduling system with desired physical transmission time for packets
KR20180082359A (en) Synchronization mechanism for high speed sensor interface
CN105824275B (en) Method for controlling slave station servo driver to synchronize master station
US20220128977A1 (en) Industrial Device Supporting Multiple Time Synchronization Protocols
CN107402534A (en) Adjusting method, EtherCAT main websites and computer-readable recording medium
US10606225B2 (en) Motor drive system, motor control system, and self-propelled robot
CN109067399B (en) Method for realizing ADC controller with multiple sampling rates
CN113485205B (en) CANBUS bus-based servo driver clock synchronization and position reconstruction method
CN105075155B (en) Automation equipment and method for reducing time jitter
CN113867228B (en) Data real-time synchronization method for CANOPEN master station and CPU
CN108427606B (en) Time slice management and control device for scheduling connection and information exchange of motion controller and servo shaft
CN112511043B (en) Synchronous control system and method based on repeated motion multi-axis control
CN101807070A (en) Numerical control system and method based on EPA field bus

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
GR01 Patent grant
GR01 Patent grant