CN112600640B - Synchronization method, device and equipment of servo drive equipment and storage medium - Google Patents

Synchronization method, device and equipment of servo drive equipment and storage medium Download PDF

Info

Publication number
CN112600640B
CN112600640B CN202011589811.1A CN202011589811A CN112600640B CN 112600640 B CN112600640 B CN 112600640B CN 202011589811 A CN202011589811 A CN 202011589811A CN 112600640 B CN112600640 B CN 112600640B
Authority
CN
China
Prior art keywords
slave station
master station
station
period
servo drive
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.)
Active
Application number
CN202011589811.1A
Other languages
Chinese (zh)
Other versions
CN112600640A (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.)
Jieka Robot Co ltd
Original Assignee
Shanghai Jaka Robotics 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 Shanghai Jaka Robotics Ltd filed Critical Shanghai Jaka Robotics Ltd
Priority to CN202011589811.1A priority Critical patent/CN112600640B/en
Publication of CN112600640A publication Critical patent/CN112600640A/en
Application granted granted Critical
Publication of CN112600640B publication Critical patent/CN112600640B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0016Arrangements for synchronising receiver with transmitter correction of synchronization errors

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Numerical Control (AREA)

Abstract

The embodiment of the invention discloses a synchronization method, a synchronization device, equipment and a storage medium for servo drive equipment. The method comprises the following steps: after a Sync synchronization signal sent by a response master station analyzes a master station message, clock state information of a slave station to which the servo drive equipment belongs is determined; and adjusting the number of current loop cycles of the next position interpolation cycle according to the clock state information of the slave station so as to keep the master station and the slave station synchronous. By adopting the scheme, the position interpolation is maintained forwards or backwards for a certain current loop period by adjusting the time sequence of the Sync synchronous signal and the position interpolation period of the servo driving equipment, the Sync synchronous signal is ensured to be just at the midpoint of the position interpolation twice each time, the clock drift compensation is realized, and the asynchronous influence of the master station and the slave station caused by the clock drift is solved.

Description

Synchronization method, device and equipment of servo drive equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of motion control, in particular to a synchronization method, a synchronization device, synchronization equipment and a storage medium for servo drive equipment.
Background
The servo driver is a controller for controlling a servo motor, and is mainly applied to a high-precision positioning system. For a multi-axis synchronous system adopting a bus communication protocol, the performance of the system is directly influenced by the quality of synchronization, because the track at the tail end of the system is inversely converted into the tracks of a plurality of axes, each axis receives an instruction position sent by a controller once in each period, and position closed-loop control is realized through position subdivision interpolation in a servo. However, the Sync synchronization signal is triggered by the master station, and the servo position interpolation period is of the servo slave station, because the clocks of the master station and the slave station are not consistent, the period of the Sync synchronization signal and the servo interpolation period are not completely equal, and the problem of out-of-synchronization between the master station and the slave station is caused.
Disclosure of Invention
The embodiment of the invention provides a synchronization method, a synchronization device, synchronization equipment and a storage medium of servo drive equipment, which are used for realizing the compensation of the servo drive equipment on clock drift and keeping the synchronization of a master station and a slave station.
In a first aspect, an embodiment of the present invention provides a synchronization method for a servo drive device, where the synchronization method is applied to the servo drive device, and the method includes:
after a Sync synchronization signal sent by a response master station analyzes a master station message, clock state information of a slave station to which the servo drive equipment belongs is determined;
and adjusting the number of current loop cycles of the next position interpolation cycle according to the clock state information of the slave station so as to keep the master station and the slave station synchronous.
In a second aspect, an embodiment of the present invention further provides a synchronization apparatus for a servo driving device, where the synchronization apparatus is configured in the servo driving device, and the apparatus includes:
the clock state determining module is used for determining the clock state information of the slave station to which the servo driving equipment belongs after analyzing the master station message in response to the Sync synchronization signal sent by the master station;
and the synchronous adjustment and maintenance module is used for adjusting the number of current loop cycles of the next position interpolation cycle according to the clock state information of the slave station so as to keep the master station and the slave station synchronous.
In a third aspect, an embodiment of the present invention further provides a servo driving device, including:
one or more processors;
storage means for storing one or more programs;
the one or more programs are executed by the one or more processors, so that the one or more processors implement the synchronization method of the servo driving apparatus as described in any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the synchronization method of the servo drive apparatus according to any embodiment of the present invention.
The embodiment of the invention provides a synchronization method of servo drive equipment, which comprises the steps of determining clock state information of a slave station to which the servo drive equipment belongs after analyzing a master station message in response to a Sync synchronization signal sent by a master station; and further, according to the clock state information of the slave station, adjusting the number of current loop cycles of the next position interpolation cycle so as to keep the master station and the slave station synchronous. By adopting the scheme of the embodiment, the position interpolation is maintained forwards or backwards for a certain current loop period by adjusting the time sequence of the Sync synchronization signal and the position interpolation period of the servo driving device, the Sync synchronization signal is ensured to be exactly positioned at the midpoint of the position interpolation twice each time, the clock drift compensation is realized, and the asynchronous influence of the master station and the slave station caused by the clock drift is solved.
The above summary of the present invention is merely an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description in order to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of a synchronization method of a servo driving apparatus provided in an embodiment of the present invention;
FIG. 2 is a timing diagram of a bus communication cycle and a servo inner position interpolation cycle according to an embodiment of the present invention;
fig. 3 is a block diagram of a synchronization apparatus of a servo drive device provided in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a servo driving apparatus provided in an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations (or steps) can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
For better understanding of the scheme of the present application, the present application will briefly explain the related art between the master station and the slave station. The method comprises the following specific steps: taking an EtherCAT bus as an example, in each bus communication period, a master station sends a frame of EtherCAT message to a slave station, after the message is transmitted to the slave station, PDI interruption of the slave station is triggered, and in the PDI interruption, the slave station stores data information sent by the master station into a local RAM variable of the slave station; the slave will also receive a Sync signal every bus communication cycle, which triggers a Sync interrupt in which the RAM variables stored in the PDI interrupt are specifically parsed.
Fig. 1 is a flowchart of a synchronization method for a servo driving apparatus according to an embodiment of the present invention. The embodiment of the invention can be suitable for synchronizing the multi-axis servo driving equipment. The method can be executed by a synchronizer of the servo drive equipment, and the synchronizer of the servo drive equipment can be realized in a software and/or hardware mode and is integrated on the servo drive equipment with a network communication function. As shown in fig. 1, the synchronization method of the servo driving apparatus in the embodiment of the present invention may include the following steps:
s110, after the Sync synchronous signal sent by the main station is responded to analyze the main station message, the clock state information of the slave station to which the servo driving equipment belongs is determined.
In this embodiment, the Sync synchronization signal is triggered by the master station, and the position interpolation period of the servo drive device is performed by the servo slave station itself, because clocks of the master station and the slave station are not consistent, the period of the Sync synchronization signal and the period of the position interpolation period are not completely equal, a serious "clock drift" problem occurs after gradual accumulation, and as time goes on, it is possible that the Sync synchronization signal is received twice in a certain position interpolation period, and the Sync synchronization signal is not received in the next position interpolation period.
In this embodiment, since the Sync signal is triggered by the master station, and the station cannot change the arrival time of the Sync signal from the perspective of the slave station, the present application can only adjust the logic of position interpolation in the servo driving device according to the arrival time of the Sync signal from the master station to the slave station, and it is implemented that the Sync signal is exactly located at the midpoint of two position interpolations each time, that is, it is implemented that there is one Sync signal between two position interpolations and only one Sync signal must be used. Based on the situation, after the slave station receives the Sync signal, the slave station starts to analyze the message of the EtherCAT master station, and after the analysis is finished, the corresponding relation between the Sync signal and the clock cycle of the slave station is calculated, namely the clock state information of the slave station to which the servo driving equipment belongs is determined. The clock state information of the slave station comprises that due to the fact that clock frequencies of the slave station and the master station are not consistent, serious clock drift occurs between the slave station and the master station, the clock frequency of the slave station is faster than that of the master station or the clock frequency of the slave station is slower than that of the master station, and therefore clock drift correction between the slave station and the master station is determined to be started.
In an alternative of this embodiment, combinations with each of the alternatives of one or more of the embodiments described above are possible. The synchronization method of the servo driving device in this embodiment further includes the following operations:
after a Sync synchronization signal sent by a response master station for the first time is used for analyzing a master station message, the position interpolation of the servo driving device is started after a half bus communication period is delayed backwards.
In this embodiment, the slave station is powered on, waits for the EtherCAT bus to be initialized, receives Sync synchronization signals sent by the master station for the first time, analyzes messages of the EtherCAT master station sent by the master station, delays for half a bus communication period after the analysis is completed, and starts position interpolation operation of the servo drive device, so that the Sync synchronization signals are just in the middle point of two times of position interpolation, and further realizes two times of servo position interpolation.
And S120, adjusting the number of current loop cycles of the next position interpolation cycle according to the clock state information of the slave station so as to keep the master station and the slave station synchronous.
In this embodiment, the inconsistency between the clock frequency of the slave and the clock frequency of the master may cause the position interpolation period of the servo driver of the slave to be inconsistent with the bus communication period of the master, thereby causing a "clock drift" problem, and as time goes on, in a certain position interpolation period, the Sync synchronization signal is received twice, so that the Sync synchronization signal is not received in the next position interpolation period.
In this embodiment, if it is determined that the clock frequency of the slave is faster than the clock frequency of the master according to the clock state information of the slave, it indicates that the position interpolation period of the slave is shorter than the bus communication period of the master, and after a period of time, the slave will have one more current loop period, and at this time, the next position interpolation process of the slave can be allowed to maintain one more current loop, so that the master and the slave can keep synchronization.
In this embodiment, if it is determined that the clock frequency of the slave is slower than the clock frequency of the master according to the clock state information of the slave, it indicates that the position interpolation period of the slave is longer than the bus communication period of the master, and after a period of time, the slave will have one less current loop period, at this time, the next position interpolation process of the slave can be performed, and a current loop is reduced to maintain, so that the master and the slave can keep synchronization.
In an alternative of this embodiment, combinations with each of the alternatives of one or more of the embodiments described above are possible. Wherein, determining the clock status information of the slave station to which the servo drive apparatus belongs may include steps a1-a 2:
and step A1, determining the counted accumulated number of bus communication cycles experienced by the master station and the accumulated number of current loop cycles experienced by the slave station when entering the current position interpolation cycle.
And step A2, if the accumulated difference between the accumulated number of the current loop cycles and the accumulated number of the bus communication cycles is not the preset difference, determining to start the clock drift correction operation between the slave station and the master station so as to reduce the clock drift between the slave station and the master station.
In this embodiment, fig. 2 is a timing diagram of a bus communication cycle and a servo internal position interpolation cycle provided in the embodiment of the present invention. Referring to fig. 2, taking EtherCAT bus as an example, the bus communication cycle of the master station is 1ms, the position interpolation cycle inside the slave station servo is also 1ms, the position loop cycle of the slave station is 200us, and the current loop cycle of the slave station is 40 us. In general, the position loop period and the current loop period satisfy the following relationship: position loop period n (us) ═ x current loop period ═ x × m (us).
In this embodiment, in the case where the clock frequencies of the master station and the slave station are kept consistent, the position interpolation period g (us) is equal to the communication period k (us) of EtherCAT; meanwhile, the position interpolation period, the bus communication period, the current loop period and the position loop period satisfy the following relations: the position interpolation period g (us) ═ EtherCAT bus communication period k (us) ═ y ═ position ring period (y) ((us) ═ y ═ current ring period) (x ═ y × (us)). That is, under the condition that there is no clock drift between the master station and the slave station, a position interpolation period or a communication period of EtherCAT corresponds to a preset integral multiple of current loop periods, for example, corresponds to x × y current loop periods.
In this embodiment, two variables are defined at the secondary station: ECAT _ Cnt and ACR _ Cnt, wherein ECAT _ Cnt represents the accumulated number of bus communication cycles experienced by the master station, ACR _ Cnt represents the accumulated number of current loop cycles experienced by the slave station, and the two variables are cleared and start to count again. After the Sync synchronous signal is received or analyzed, the bus communication cycle accumulated number ECAT _ Cnt experienced by the master station and the current loop cycle accumulated number ACR _ Cnt experienced by the slave station are accumulated and counted in real time. Based on the foregoing principle, if the clock frequencies of the master station and the slave station are kept consistent, the cumulative difference Err _ Cnt between the current loop cycle cumulative number and the preset multiple of the bus communication cycle cumulative number should be zero; if clock drift occurs, the cumulative difference Err _ Cnt of the cumulative number of current loop cycles to a predetermined multiple of the cumulative number of bus communication cycles should be + -1. Therefore, whether clock drift occurs between the master station and the slave station or not can be reversely deduced according to the relationship between the current loop cycle accumulated number and the preset multiple of the bus communication cycle accumulated number, namely whether the clock frequencies are inconsistent or not can be judged.
In an alternative of this embodiment, combinations with each of the alternatives of one or more of the embodiments described above are possible. The adjusting the number of current loop cycles in the next position interpolation cycle according to the clock frequency state information of the slave station may include steps B1-B2:
and step B1, if the clock drift correction operation is started between the slave station and the master station and the clock frequency of the slave station is determined to be faster than that of the master station, adding a current loop for maintaining in the next position interpolation period process of the slave station to which the servo drive equipment belongs so as to enable the next Sync synchronous signal to be at the midpoint of the two position interpolation.
And step B2, if the clock drift correction operation between the slave station and the master station is started and the clock frequency of the slave station is determined to be slower than that of the master station, reducing a current loop for maintaining in the process of the next position interpolation period of the slave station to which the servo driving device belongs so as to enable the Sync signal to be at the midpoint of the two position interpolation periods.
In this embodiment, the normal communication of the EtherCAT bus is started, and each time the slave station receives and parses the Sync synchronization signal, the servo driving device may calculate a difference between the current loop cycle accumulated number ACR _ Cnt and a preset multiple of the bus communication cycle accumulated number ECAT _ Cnt (for example, the preset multiple of the bus communication cycle accumulated number ECAT _ Cnt is x y ECAT _ Cnt). Under the normal condition that clock drift does not occur between the master station and the slave station, the difference value between the preset multiples of the current loop cycle accumulated quantity ACR _ Cnt and the bus communication cycle accumulated quantity ECAT _ Cnt is zero; however, in the event of clock drift between the master and slave, the cumulative difference Err _ Cnt between the current loop cycle cumulative number ACR _ Cnt and the predetermined multiple of the bus communication cycle cumulative number ECAT _ Cnt will only be ± 1.
In this embodiment, when the accumulated difference Err _ Cnt is specifically 1, that is, the accumulated number of current loop cycles ACR _ Cnt is (x × y × accumulated number of bus communication cycles ECAT _ Cnt) +1, which indicates that the clock frequency of the slave station is faster than the clock frequency of the master station, and at this time, the next position interpolation process of the slave station can maintain one more current loop. When the accumulated difference Err _ Cnt is specifically-1, it indicates that the clock frequency of the slave station is slower than that of the master station, and at this time, the next position interpolation process of the slave station can maintain one less current loop.
In this embodiment, when the current loop in the position interpolation period is adjusted according to the difference Err _ Cnt, since the position interpolation period g (us) is y, the position loop period may be controlled to perform position loop closing once every x current loop periods in the position loop period (y-1) before the position interpolation period g (us); and then in the last position loop period of the position interpolation period G (us), controlling every (x + Err _ Cnt) current loop periods, and correspondingly executing position closed loop once, thereby realizing the increase and decrease maintenance of the number of the current loop periods in the position interpolation period. Therefore, the Sync synchronous signal is just positioned at the midpoint of the position interpolation twice each time, and the compensation of clock drift is realized.
In this embodiment, after the number of current loop cycles of the next position interpolation cycle is adjusted, the count values of the bus communication cycle cumulative number ECAT _ Cnt and the current loop cycle cumulative number ACR _ Cnt may be cleared, and the count values may be re-counted and cleared again after the next adjustment.
According to the synchronization method of the servo driving device provided in the embodiment of the application, the position interpolation is maintained forward or backward for a certain current loop period by adjusting the time sequence of the Sync synchronization signal and the position interpolation period of the servo driving device, the Sync synchronization signal is ensured to be exactly in the middle point of the position interpolation twice each time, the clock drift compensation is realized, and the asynchronous influence of the master station and the slave station caused by the clock drift is solved. Meanwhile, the situation that two times of Sync signals are received or no Sync signal is received in a position interpolation period in the next servo (namely, the situation that two times of command positions are received or the command positions sent by a controller are not taken when fine interpolation is carried out) in a certain servo interpolation period can be avoided as much as possible, and the situation that speed feedforward generates large mutation, torque mutation and large mechanical pause are caused is avoided; in addition, when each axis carries out subdivision interpolation of the command position, the position command of a certain axis is not right, so that the actual path which runs out deviates from the command path planned by the controller.
Fig. 3 is a block diagram of a synchronization apparatus of a servo drive device according to an embodiment of the present invention. The embodiment of the invention can be suitable for synchronizing the multi-axis servo driving equipment. The synchronization device of the servo driving device can be realized in a software and/or hardware mode and is integrated on the servo driving device with the network communication function. As shown in fig. 3, the synchronization apparatus of the servo driving device in this embodiment may include the following steps: a clock status determination module 310 and a synchronization adjustment hold module 320. Wherein:
the clock state determining module 310 is configured to determine clock state information of a slave station to which the servo driving device belongs after analyzing a master station message in response to a Sync synchronization signal sent by the master station;
and a synchronization adjustment and holding module 320, configured to adjust the number of current loop cycles of the next position interpolation cycle according to the clock state information of the slave station, so that the master station and the slave station keep synchronized.
On the basis of the foregoing embodiment, optionally, the apparatus further includes:
and the initialization processing module 330 is configured to delay a half bus communication cycle backwards and then start position interpolation of the servo drive device after a Sync synchronization signal is first sent by a responding master station to analyze a master station message.
On the basis of the foregoing embodiment, optionally, the clock status determining module 310 includes:
determining the counted accumulated number of bus communication cycles experienced by the master station and the accumulated number of current loop cycles experienced by the slave station when entering the current position interpolation cycle;
and if the accumulated difference value of the current loop cycle accumulated number and the preset multiple of the bus communication cycle accumulated number is not the preset difference value, determining to start clock drift correction operation between the slave station and the master station so as to reduce the clock drift between the slave station and the master station.
On the basis of the above embodiment, optionally, the synchronization adjustment and maintenance module 320 includes:
if clock drift correction operation is started between the slave station and the master station and the clock frequency of the slave station is determined to be higher than that of the master station, a current loop is added in the next position interpolation period process of the slave station to which the servo drive equipment belongs to maintain so that a next Sync synchronous signal is located at the midpoint of the two position interpolation;
and if the clock drift correction operation is started between the slave station and the master station and the clock frequency of the slave station is determined to be slower than that of the master station, reducing a current loop for maintaining in the process of the next position interpolation period of the slave station to which the servo drive equipment belongs so as to enable the next Sync synchronization signal to be positioned at the midpoint of the two position interpolations.
The synchronization device of the servo driving device provided in the embodiment of the present invention may execute the synchronization method of the servo driving device provided in any embodiment of the present invention, and has corresponding functions and beneficial effects for executing the synchronization method of the servo driving device, and specific processes may refer to the embodiments of the synchronization method of the servo driving device described above.
Fig. 4 is a schematic structural diagram of a servo driving apparatus provided in an embodiment of the present invention. As shown in fig. 4, the servo driving apparatus provided in the embodiment of the present invention includes: one or more processors 410 and storage 420; the number of the processors 410 in the servo driving device may be one or more, and one processor 410 is taken as an example in fig. 4; storage 420 is used to store one or more programs; the one or more programs are executed by the one or more processors 410, so that the one or more processors 410 implement the synchronization method of the servo driving apparatus according to any one of the embodiments of the present invention.
The servo driving apparatus may further include: an input device 430 and an output device 440.
The processor 410, the storage device 420, the input device 430 and the output device 440 in the servo driving apparatus may be connected by a bus or other means, and fig. 4 illustrates the connection by the bus as an example.
The storage device 420 in the servo driving apparatus is used as a computer readable storage medium for storing one or more programs, which may be software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the synchronization method of the servo driving apparatus provided in the embodiment of the present invention. The processor 410 executes various functional applications and data processing of the servo driving device by running software programs, instructions and modules stored in the storage device 420, that is, implements the synchronization method of the servo driving device in the above method embodiments.
The storage device 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the servo driving apparatus, and the like. Further, the storage 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 420 may further include memory located remotely from the processor 410, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the servo drive apparatus. The output device 640 may include a display device such as a display screen.
And, when one or more programs included in the above-described servo driving apparatus are executed by the one or more processors 410, the programs perform the following operations:
after a Sync synchronization signal sent by a response master station analyzes a master station message, clock state information of a slave station to which the servo drive equipment belongs is determined;
and adjusting the number of current loop cycles of the next position interpolation cycle according to the clock state information of the slave station so as to keep the master station and the slave station synchronous.
Of course, it will be understood by those skilled in the art that when the one or more programs included in the servo driving apparatus are executed by the one or more processors 410, the programs may also perform related operations in the synchronization method of the servo driving apparatus provided in any embodiment of the present invention.
An embodiment of the present invention provides a computer-readable medium having stored thereon a computer program for executing a synchronization method of a servo driving apparatus when the program is executed by a processor, the method including:
after a Sync synchronization signal sent by a response master station analyzes a master station message, clock state information of a slave station to which the servo drive equipment belongs is determined;
and adjusting the number of current loop cycles of the next position interpolation cycle according to the clock state information of the slave station so as to keep the master station and the slave station synchronous.
Alternatively, the program may be used to execute the synchronization method of the servo driving apparatus provided in any embodiment of the present invention when the program is executed by the processor.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (4)

1. A synchronization method of a servo drive device is applied to the servo drive device, and the method comprises the following steps:
after a Sync synchronization signal sent by a response master station analyzes a master station message, clock state information of a slave station to which the servo drive equipment belongs is determined;
adjusting the number of current loop cycles of the next position interpolation cycle according to the clock state information of the slave station so as to keep the master station and the slave station synchronous;
after a response master station firstly sends a Sync synchronous signal to analyze a master station message, delaying a half bus communication period backwards and then starting position interpolation of a servo drive device;
the determining the clock state information of the slave station to which the servo driving device belongs includes:
determining the counted accumulated number of bus communication cycles experienced by the master station and the accumulated number of current loop cycles experienced by the slave station when entering the current position interpolation cycle;
the position interpolation period is the bus communication period, the position ring period is y (x current ring period), wherein x and y are preset integer multiples;
if the accumulated difference value of the preset multiple of the accumulated number of the current loop period and the accumulated number of the bus communication period is determined not to be zero, determining to start clock drift correction operation between the slave station and the master station so as to reduce clock drift between the slave station and the master station;
the adjusting the number of current loop cycles in the next position interpolation cycle according to the clock frequency state information of the slave station includes:
if clock drift correction operation is started between the slave station and the master station and the clock frequency of the slave station is determined to be higher than that of the master station, a current loop is added in the next position interpolation period process of the slave station to which the servo drive equipment belongs to maintain so that a next Sync synchronous signal is located at the midpoint of the two position interpolation;
and if the clock drift correction operation is started between the slave station and the master station and the clock frequency of the slave station is determined to be slower than that of the master station, reducing a current loop for maintaining in the process of the next position interpolation period of the slave station to which the servo drive equipment belongs so as to enable the next Sync synchronization signal to be positioned at the midpoint of the two position interpolations.
2. A synchronization apparatus for a servo drive device, configured to a servo drive device, the apparatus comprising:
the clock state determining module is used for determining the clock state information of the slave station to which the servo driving equipment belongs after analyzing the master station message in response to the Sync synchronization signal sent by the master station;
the synchronous adjustment and maintenance module is used for adjusting the number of current loop cycles of the next position interpolation cycle according to the clock state information of the slave station so as to keep the master station and the slave station synchronous;
the system comprises an initialization processing module, a servo drive device and a control module, wherein the initialization processing module is used for delaying a half bus communication period backwards and then starting the position interpolation of the servo drive device after responding to a synchronous signal sent by a master station for the first time to analyze a master station message;
the clock state determination module includes:
determining the counted accumulated number of bus communication cycles experienced by the master station and the accumulated number of current loop cycles experienced by the slave station when entering the current position interpolation cycle;
the position interpolation period is the bus communication period, y, the position ring period, y (x current ring period), wherein x and y are preset integer multiples;
if the accumulated difference value of the current loop period accumulated quantity and the preset multiple of the bus communication period accumulated quantity is not zero, determining to start clock drift correction operation between the slave station and the master station so as to reduce clock drift between the slave station and the master station;
the synchronization adjustment holding module includes:
if clock drift correction operation is started between the slave station and the master station and the clock frequency of the slave station is determined to be higher than that of the master station, a current loop is added in the next position interpolation period process of the slave station to which the servo drive equipment belongs to maintain so that a next Sync synchronous signal is located at the midpoint of the two position interpolation;
and if the clock drift correction operation is started between the slave station and the master station and the clock frequency of the slave station is determined to be slower than that of the master station, reducing a current loop for maintaining in the process of the next position interpolation period of the slave station to which the servo drive equipment belongs so as to enable the next Sync synchronization signal to be positioned at the midpoint of the two position interpolations.
3. A servo drive apparatus, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the synchronization method of the servo drive apparatus of claim 1.
4. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the synchronization method of the servo drive apparatus of claim 1.
CN202011589811.1A 2020-12-29 2020-12-29 Synchronization method, device and equipment of servo drive equipment and storage medium Active CN112600640B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011589811.1A CN112600640B (en) 2020-12-29 2020-12-29 Synchronization method, device and equipment of servo drive equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011589811.1A CN112600640B (en) 2020-12-29 2020-12-29 Synchronization method, device and equipment of servo drive equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112600640A CN112600640A (en) 2021-04-02
CN112600640B true CN112600640B (en) 2022-05-27

Family

ID=75203576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011589811.1A Active CN112600640B (en) 2020-12-29 2020-12-29 Synchronization method, device and equipment of servo drive equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112600640B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679249B (en) * 2022-05-26 2022-09-02 深圳市杰美康机电有限公司 EtherCAT communication synchronization method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130640A (en) * 2011-01-25 2011-07-20 南京雪曼机电科技有限公司 Multishaft synchronous servo driving system and synchronous control method thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130640A (en) * 2011-01-25 2011-07-20 南京雪曼机电科技有限公司 Multishaft synchronous servo driving system and synchronous control method thereof

Also Published As

Publication number Publication date
CN112600640A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
US7983769B2 (en) Time stamped motion control network protocol that enables balanced single cycle timing and utilization of dynamic data structures
US9323235B2 (en) Industrial control system with distributed motion planning
KR101075378B1 (en) Communication protocol for synchronizing animation systems
Lincoln et al. Optimal control over networks with long random delays
CN112788086B (en) Mobile edge computing application data migration method and device and core network node
CN112600640B (en) Synchronization method, device and equipment of servo drive equipment and storage medium
EP3361635B1 (en) Control system and pulse output device
US20140089717A1 (en) Ad-hoc synchronization of industrial control networks
US9118977B2 (en) Content synchronization system, content-synchronization control device, and content playback device
US7924806B2 (en) Time synchronization system
US10606225B2 (en) Motor drive system, motor control system, and self-propelled robot
EP3851925A1 (en) Control system and control device
WO2024124797A1 (en) Wireless network node synchronization method, system and device, and readable storage medium
US9677920B2 (en) Automation device and method for reducing jitter
KR20170135384A (en) Apparatus for distributed clock synchronization based on EtherCAT, method thereof and computer recordable medium storing the method
Gutiérrez et al. Time synchronization in modular collaborative robots
CN113014352A (en) Equipment time synchronization method and device based on fiber channel protocol
JP4733695B2 (en) Method and apparatus for simulation of automated systems
CN113572814B (en) Multi-user online task data synchronization method based on state prediction and verification
KR101379248B1 (en) Ethernet communication system and time synchronization method
KR101748268B1 (en) Synchronization method of can communication and computer-readable medium storing program for executing the same
CN106647574B (en) Multi-axis servo driver synchronization system control method
CN112564841A (en) Method for controlling equipment with different communication protocols in mode of synchronizing clocks
EP4125295A1 (en) Time synchronization in wireless networks
CN112462717B (en) High-precision multi-axis clock synchronization method based on EtherCAT

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
CP01 Change in the name or title of a patent holder

Address after: 200126 building 6, 646 Jianchuan Road, Minhang District, Shanghai

Patentee after: Jieka Robot Co.,Ltd.

Address before: 200126 building 6, 646 Jianchuan Road, Minhang District, Shanghai

Patentee before: SHANGHAI JAKA ROBOTICS Ltd.

CP01 Change in the name or title of a patent holder