CN117590778A - Servo driver synchronous control method, device, equipment and storage medium - Google Patents

Servo driver synchronous control method, device, equipment and storage medium Download PDF

Info

Publication number
CN117590778A
CN117590778A CN202311490425.0A CN202311490425A CN117590778A CN 117590778 A CN117590778 A CN 117590778A CN 202311490425 A CN202311490425 A CN 202311490425A CN 117590778 A CN117590778 A CN 117590778A
Authority
CN
China
Prior art keywords
servo
current loop
slave station
period
slave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311490425.0A
Other languages
Chinese (zh)
Inventor
梅仕锋
张中华
曾雨权
李耀斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shanlong Intelligent Control Co ltd
Original Assignee
Shenzhen Shanlong Intelligent Control 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 Shanlong Intelligent Control Co ltd filed Critical Shenzhen Shanlong Intelligent Control Co ltd
Priority to CN202311490425.0A priority Critical patent/CN117590778A/en
Publication of CN117590778A publication Critical patent/CN117590778A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • 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/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24215Scada supervisory control and data acquisition
    • 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]

Abstract

The invention relates to the field of computers and discloses a servo driver synchronous control method, a device, equipment and a storage medium. The method comprises the following steps: receiving a bus servo synchronous request, wherein the bus servo synchronous request carries the number of slave station servo current loop interruption times detected in the master station bus interruption; acquiring a master station bus synchronization period and a slave station servo current loop period, and acquiring a slave station servo interruption expected value according to the master station bus synchronization period and the slave station servo current loop period; according to the number of times of slave station servo current loop interruption and the expected value of slave station servo interruption, a period register of slave station servo current loop timing is adjusted; the slave servo current loop period is adjusted by the adjusted period register to synchronize the slave servo with the master bus period. In the embodiment of the invention, when the slave station servo and the master station bus cycle synchronization are realized, the scheduling of the position ring, the speed ring and the current ring in the slave station servo is ensured not to change.

Description

Servo driver synchronous control method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a method, an apparatus, a device, and a storage medium for synchronously controlling a servo driver.
Background
The servo driving system is a digital discrete closed-loop control driving system and basically comprises an upper controller, a servo driver and a servo motor. The servo driver needs to acquire upper control instructions at intervals, acquires state information such as instant current, instant speed, instant position and the like fed back by a sensor of the servo motor, and performs closed-loop adjustment control on a current loop, a speed loop and a position loop of the servo driver by adopting a given control algorithm.
When the bus master station and the servo send position instructions through the bus, the bus time synchronization is generally realized by: the request response mechanism is synchronous, and the end delay mechanism is synchronous. Although synchronization can be achieved, the master-slave interaction period is not fixed, and interpolation delay exists in each slave station servo during multi-axis interpolation. There are also interpolation of position loop compensation times in servo drive position loop cycles to achieve position loop synchronization, but this affects the scheduling relationship between position loops, speed loops and current loops inside the servo drive, and thus affects the fluctuations in stiffness and speed of the position loops.
Disclosure of Invention
The invention mainly aims to solve the technical problem of ensuring that the scheduling of a position loop, a speed loop and a current loop in a slave station servo is not changed when the slave station servo and a master station bus are synchronous periodically.
The first aspect of the present invention provides a servo driver synchronization control method, which includes:
receiving a bus servo synchronous request, wherein the bus servo synchronous request carries the number of slave station servo current loop interruption times detected in the master station bus interruption;
acquiring a master station bus synchronization period and a slave station servo current loop period, and obtaining a slave station servo interruption expected value according to the master station bus synchronization period and the slave station servo current loop period;
according to the number of times of the slave station servo current loop interruption and the slave station servo interruption expected value, adjusting a period register of slave station servo current loop timing;
the slave servo current loop period is adjusted by the adjusted period register to synchronize the slave servo with the master bus period.
Optionally, in a first implementation manner of the first aspect of the present invention, the period register for adjusting the timing of the slave station servo current loop according to the number of slave station servo current loop interruption and the slave station servo interruption expected value includes:
acquiring the number of master station bus interruption, and detecting the number of slave station servo current loop interruption corresponding to all the master station bus interruption numbers in the master station bus interruption;
obtaining average slave station servo current loop interruption times according to the master station bus interruption times and the slave station servo current loop interruption times corresponding to all the master station bus interruption times;
and adjusting a period register of slave station servo current loop timing according to the average slave station servo current loop interruption times and the slave station servo interruption expected value.
Optionally, in a second implementation manner of the first aspect of the present invention, the period register for adjusting the timing of the slave station servo current loop according to the average number of slave station servo current loop interruption and the slave station servo interruption expected value includes:
adjusting the average slave station servo current loop interruption times;
if the adjusted average slave station servo current loop interruption times are larger than the slave station servo interruption expected value, a period register of slave station servo current loop timing is increased to slow down the slave station servo current loop period.
Optionally, in a third implementation manner of the first aspect of the present invention, the period register for adjusting the timing of the slave station servo current loop according to the average number of slave station servo current loop interruption and the slave station servo interruption expected value further includes:
adjusting the average slave station servo current loop interruption times;
and if the adjusted average slave station servo current loop interruption times are smaller than the slave station servo interruption expected value, reducing a period register of slave station servo current loop timing so as to speed up the slave station servo current loop period.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the receiving a bus servo synchronization request, where the bus servo synchronization request carries a number of slave servo current loop interrupts detected in a master bus interrupt, further includes:
acquiring the current slave station servo current loop calling times and the historical slave station servo current loop calling times;
and obtaining the slave station servo current loop interruption times according to the current slave station servo current loop calling times and the historical slave station servo current loop calling times.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the adjusting, by the adjusted period register, a slave servo current loop period to synchronize a slave servo with a master bus period includes:
adjusting the slave station servo current loop period through the adjusted period register;
obtaining a slave station servo position loop period according to the adjusted slave station servo current loop period and the slave station servo interruption expected value;
and adjusting the master station bus synchronization period according to the slave station servo position loop period so as to synchronize the slave station servo with the master station bus period.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the priority of the master station bus interrupt is higher than the priority of the slave station servo current loop interrupt, so that the execution time of the slave station servo current loop interrupt does not affect the timing sequence of the master station bus, and simultaneously, the effect of the execution time of the master station bus interrupt on the slave station servo current loop is reduced.
A second aspect of the present invention provides a servo driver synchronization control apparatus including: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the servo driver synchronization control device to perform the servo driver synchronization control method described above.
A third aspect of the present invention provides a computer-readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the servo driver synchronization control method described above.
In the embodiment of the invention, a bus servo synchronous request is received, wherein the bus servo synchronous request carries the number of slave station servo current loop interruption times detected in the master station bus interruption; acquiring a master station bus synchronization period and a slave station servo current loop period, and obtaining a slave station servo interruption expected value according to the master station bus synchronization period and the slave station servo current loop period; according to the number of times of the slave station servo current loop interruption and the slave station servo interruption expected value, adjusting a period register of slave station servo current loop timing; the slave servo current loop period is adjusted by the adjusted period register to synchronize the slave servo with the master bus period. In the invention, the slave station servo current loop period is adjusted through the slave station servo current loop interruption times and the slave station servo interruption expected value and the period register of the slave station servo current loop timing is adjusted, the slave station servo and the master station bus period can be synchronized through the slave station servo current loop period adjustment, and meanwhile, the slave station servo inner position loop can be adjusted through the slave station servo current loop period adjustment, thereby ensuring that the scheduling of the slave station servo inner position loop, the speed loop and the current loop is not changed.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a servo driver synchronization control method according to the present invention;
FIG. 2 is a schematic diagram of an embodiment of a synchronous control device for servo driver according to the present invention;
FIG. 3 is a schematic diagram of an embodiment of a synchronous control device for servo driver according to the present invention.
Detailed Description
The embodiment of the invention provides a servo driver synchronous control method, a device, equipment and a storage medium.
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the present disclosure has been illustrated in the drawings in some form, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and examples of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
In describing embodiments of the present disclosure, the term "comprising" and its like should be taken to be open-ended, i.e., including, but not limited to. The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first," "second," and the like, may refer to different or the same object. Other explicit and implicit definitions are also possible below.
For ease of understanding, a specific flow of an embodiment of the present invention is described below with reference to fig. 1, where an embodiment of a servo driver synchronization control method in an embodiment of the present invention includes:
s100, receiving a bus servo synchronous request, wherein the bus servo synchronous request carries the number of slave station servo current loop interruption times detected in the master station bus interruption.
In this embodiment, firstly, in a master station bus interrupt, the number of times of calling a slave station servo current loop is detected, and the number of times of calling the slave station servo current loop is obtained according to the number of times of calling the slave station servo current loop, then, a user sends a bus servo synchronization request to a server through a servo driving system terminal, the server receives the bus servo synchronization request, and the bus servo synchronization request carries the number of times of interruption of the slave station servo current loop detected in the master station bus interrupt.
S200, acquiring a master station bus synchronization period and a slave station servo current loop period, and obtaining a slave station servo interruption expected value according to the master station bus synchronization period and the slave station servo current loop period.
In this embodiment, the existing servo driver includes an FPGA (Field-Programmable Gate Array, field programmable gate array) unit, a DSP (Digital Signal Processing, digital signal processor) unit, a current loop, a speed loop, and a position loop control loop unit, etc., and the DSP includes a PWM (Pulse Width Modulation ) timer, and the PWM timer includes three basic units, namely a period register, a comparison register, and a count register, wherein the period register is provided with a shadow register; the speed loop period coincides with the position loop period. Tsync is a master station bus synchronization period, tpmeriod is the default slave station servo current loop interruption times, and the slave station servo interruption expected value N=Tsync/Tpmeriod, wherein the master station bus synchronization period is the time required by the master station CPU to finish one-time access to the MEM or I/O port operation; the slave servo current loop period is the time required for the servo transformer internal current to change with the same law.
S300, adjusting a period register of slave station servo current loop timing according to the number of slave station servo current loop interruption times and a slave station servo interruption expected value.
In this embodiment, the number of slave station servo current loop interrupts is detected in the master station bus interrupt, the number of slave station servo current loop interrupts M is compared with the slave station servo interrupt expected value N, if M is greater than N, the period of the bus interrupt is indicated to be slower than the period of the current loop interrupt, the current loop period is to be slowed down, and the period register arr=arr+1 of the current loop timing; if M is less than N, the period of the bus interrupt is faster than the period of the current loop interrupt, and the current loop timing period register arr=arr1 is used to speed up the current loop period.
S400, adjusting the slave station servo current loop period through the adjusted period register so as to synchronize the slave station servo with the master station bus period.
In this embodiment, in the adjustment process, m=tsync/Tcurr is guaranteed to be between N-1 and n+1 (most of the time is N), and accumulated errors of the master station and the slave station due to clock errors are eliminated, so as to achieve the purpose of synchronizing the position loop period of each slave station with the bus period of the master station, where Tcurr is the adjusted slave station servo current loop period.
In an alternative embodiment of the first aspect of the present invention, the period register for adjusting the timing of the slave station servo current loop according to the number of slave station servo current loop interrupts and the slave station servo interrupt expectation value comprises:
acquiring the master station bus interruption times, and detecting slave station servo current loop interruption times corresponding to all the master station bus interruption times in the master station bus interruption; obtaining average slave station servo current loop interruption times according to the master station bus interruption times and the slave station servo current loop interruption times corresponding to all the master station bus interruption times; and adjusting a period register of the slave station servo current loop timing according to the average slave station servo current loop interruption times and the slave station servo interruption expected value.
In this embodiment, the number of slave station servo current loop interrupts in each master station bus interrupt is detected, the number of slave station servo current loop interrupts is averaged to obtain an average number of slave station servo current loop interrupts, and the average number of slave station servo current loop interrupts, that is, M, is adjusted, for example, 16 slave station servo current loop interrupts are detected in 99 master station bus interrupts, 17 slave station servo current loop interrupts are detected in 1 master station bus interrupt, and all slave station servo current loop interrupts are averaged to obtain an average number of slave station servo current loop interrupts 16.01, and M becomes 17 because the number of interrupts is an integer. And comparing M with N, and adjusting a period register of the slave station servo current loop timing.
In an alternative embodiment of the first aspect of the present invention, the period register for adjusting the slave servo current loop timing according to the average number of slave servo current loop interrupts and the slave servo interrupt expectation value comprises:
adjusting average slave station servo current loop interruption times; if the adjusted average slave station servo current loop interruption times are greater than the slave station servo interruption expected value, a period register of the slave station servo current loop timing is increased to slow down the slave station servo current loop period.
In the present embodiment, if the master station bus synchronization period tsync=1 millisecond, the slave station servo current loop period tperiod=62.5 microseconds, and the slave station servo interrupt expected value n=tsync/tperiod=1 millisecond/62.5 microseconds=16. However, due to clock errors of the master station and the slave station, 16 slave station servo current loop interrupts are detected in 99 master station bus interrupts, 17 slave station servo current loop interrupts are detected in 1 master station bus interrupts, the value of M is 17, when the fact that m=17 is larger than n=16 is detected, the period register arr=arr+1 of slave station servo current loop timing is adjusted, and the current loop calling period is prolonged. After that, if 16 slave servo current loop interrupts are detected out of 999 master bus interrupts, 17 slave servo current loop interrupts are detected out of 1 master bus interrupts, the average number of slave servo current loop interrupts is 16.001, M becomes 17, and when m=17 is checked again to be greater than n=16, the period register arr=arr+1 of slave servo current loop timing is adjusted.
In an alternative embodiment of the first aspect of the present invention, the period register for adjusting the timing of the slave station servo current loop according to the average number of slave station servo current loop interrupts and the slave station servo interrupt expectation value further comprises:
adjusting average slave station servo current loop interruption times; if the adjusted average slave station servo current loop interrupt number is smaller than the slave station servo interrupt expected value, the period register of the slave station servo current loop timing is reduced to speed up the slave station servo current loop period.
In this embodiment, if 16 slave servo current loop interrupts are detected out of 999 master bus interrupts, 15 slave servo current loop interrupts out of 1 master bus interrupt, and the average number of slave servo current loop interrupts is 15.999, M becomes 15, and when it is checked that m=15 is smaller than n=16, the period register of slave servo current loop timing is adjusted, arr=arr1, the current loop call period becomes short, and m= 16.001. The period register of the slave station servo current loop timing is dynamically adjusted by checking the value of M against the slave station servo interrupt expected value 16 in such a way as to ensure that the actual value M approaches 16 indefinitely.
In an optional implementation manner of the first aspect of the present invention, before receiving a bus servo synchronization request, the bus servo synchronization request carries the number of slave servo current loop interrupts detected in the master bus interrupt, the method further includes:
acquiring the current slave station servo current loop calling times and the historical slave station servo current loop calling times; and obtaining the slave station servo current loop interruption times according to the current slave station servo current loop calling times and the historical slave station servo current loop calling times.
In this embodiment, the current slave station servo current loop call number and the historical slave station servo current loop call number are detected in the current loop interrupt, and the current slave station servo current loop call number is subtracted from the historical slave station servo current loop call number to obtain the slave station servo current loop interrupt number, for example, the current slave station servo current loop call number is 18, the historical slave station servo current loop call number is 10, and then the slave station servo current loop interrupt number=18-10=8.
In an alternative embodiment of the first aspect of the present invention, adjusting the slave servo current loop period by means of an adjusted period register to synchronize the slave servo with the master bus period comprises:
adjusting the slave station servo current loop period through the adjusted period register; obtaining a slave station servo position loop period according to the adjusted slave station servo current loop period and a slave station servo interruption expected value; and adjusting the master bus synchronization period according to the slave station servo position loop period so as to synchronize the slave station servo with the master bus period.
In this embodiment, tpos is a slave servo position loop period, tpos=n×tcurr, and tsync=tpos=n×tcurr after the current loop period adjustment. This achieves synchronization of the master and slave nodes, for example: tsync=1 millisecond, tperiod=62.5 microseconds, then n=tsync/tperiod=16, and the slave servo position loop period is also tpos=tsync=1 millisecond. The servo driver keeps the 16 current loops scheduled once the position loop unchanged.
In an alternative embodiment of the first aspect of the present invention, the priority of the master station bus interrupt is higher than the priority of the slave station servo current loop interrupt, so that the execution time of the slave station servo current loop interrupt does not affect the timing of the master station bus, and at the same time, the effect of the execution time of the master station bus interrupt on the slave station servo current loop is reduced.
In this embodiment, the priority of the master bus interrupt is higher than the priority of the slave servo current loop interrupt, where the interrupt priority refers to the order in which it is determined which interrupt request should be processed when multiple interrupt requests occur simultaneously, and when multiple interrupt requests arrive simultaneously, the system needs to determine which interrupt to process first according to the interrupt priority.
Referring to fig. 2, a second aspect of the present invention provides a servo driver synchronization control apparatus including:
the request module 100 is configured to receive a bus servo synchronization request, where the bus servo synchronization request carries the number of slave station servo current loop interruption times detected in the master station bus interruption;
the data acquisition module 200 is configured to acquire a master station bus synchronization period and a slave station servo current loop period, and obtain a slave station servo interrupt expected value according to the master station bus synchronization period and the slave station servo current loop period;
the adjustment module 300 is configured to adjust a period register of slave station servo current loop timing according to the number of slave station servo current loop interruption times and a slave station servo interruption expected value;
the synchronization module 400 is configured to adjust the slave servo current loop period through the adjusted period register, so as to synchronize the slave servo with the master bus period.
In an alternative embodiment of the second aspect of the present invention, the adjustment module 300 is further configured to obtain the number of interrupts of the master station bus, and detect, in the master station bus interrupts, the number of slave station servo current loop interrupts corresponding to all the number of interrupts of the master station bus; obtaining average slave station servo current loop interruption times according to the master station bus interruption times and the slave station servo current loop interruption times corresponding to all the master station bus interruption times; and adjusting a period register of the slave station servo current loop timing according to the average slave station servo current loop interruption times and the slave station servo interruption expected value.
In an alternative embodiment of the second aspect of the present invention, the adjustment module 300 is further configured to adjust the average slave station servo current loop interruption count; if the adjusted average slave station servo current loop interruption times are greater than the slave station servo interruption expected value, a period register of the slave station servo current loop timing is increased to slow down the slave station servo current loop period.
In an alternative embodiment of the second aspect of the present invention, the adjustment module 300 is further configured to adjust the average slave station servo current loop interruption count; if the adjusted average slave station servo current loop interruption times are smaller than the slave station servo interruption expected value, the period register of the slave station servo current loop timing is reduced so as to speed up the slave station servo current loop period.
In an alternative embodiment of the second aspect of the present invention, the servo driver synchronization control device further includes:
the interruption frequency acquisition module is used for acquiring the current slave station servo current loop calling frequency and the historical slave station servo current loop calling frequency; and obtaining the slave station servo current loop interruption times according to the current slave station servo current loop calling times and the historical slave station servo current loop calling times.
In an alternative embodiment of the second aspect of the present invention, the synchronization module 400 is further configured to adjust the slave station servo current loop period by means of an adjusted period register; obtaining a slave station servo position loop period according to the adjusted slave station servo current loop period and a slave station servo interruption expected value; and adjusting the master bus synchronization period according to the slave station servo position loop period so as to synchronize the slave station servo with the master bus period.
Fig. 3 is a schematic structural diagram of a servo driver synchronous control device according to an embodiment of the present invention, where the servo driver synchronous control device 500 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) storing application programs 533 or data 532. Wherein memory 520 and storage medium 530 may be transitory or persistent storage. The program stored in the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations in the servo driver synchronization control device 500. Still further, the processor 510 may be arranged to communicate with the storage medium 530 and execute a series of instruction operations in the storage medium 530 on the servo drive synchronization control device 500.
The servo-driver based synchronization control apparatus 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input/output interfaces 560, and/or one or more operating systems 531, such as Windows Server, mac OS X, unix, linux, free BSD, and the like. It will be appreciated by those skilled in the art that the servo driver synchronous control device structure shown in FIG. 3 is not limiting of the servo driver based synchronous control device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and may also be a volatile computer readable storage medium, where instructions are stored in the computer readable storage medium, when the instructions are executed on a computer, cause the computer to perform the steps of the servo driver synchronization control method.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Moreover, although operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (10)

1. A servo driver synchronization control method, characterized in that the servo driver synchronization control method comprises:
receiving a bus servo synchronous request, wherein the bus servo synchronous request carries the number of slave station servo current loop interruption times detected in the master station bus interruption;
acquiring a master station bus synchronization period and a slave station servo current loop period, and obtaining a slave station servo interruption expected value according to the master station bus synchronization period and the slave station servo current loop period;
according to the number of times of the slave station servo current loop interruption and the slave station servo interruption expected value, adjusting a period register of slave station servo current loop timing;
the slave servo current loop period is adjusted by the adjusted period register to synchronize the slave servo with the master bus period.
2. The servo driver synchronization control method according to claim 1, wherein the period register for adjusting the slave servo current loop timing according to the number of slave servo current loop interrupts and the slave servo interrupt desired value comprises:
acquiring the number of master station bus interruption, and detecting the number of slave station servo current loop interruption corresponding to all the master station bus interruption numbers in the master station bus interruption;
obtaining average slave station servo current loop interruption times according to the master station bus interruption times and the slave station servo current loop interruption times corresponding to all the master station bus interruption times;
and adjusting a period register of slave station servo current loop timing according to the average slave station servo current loop interruption times and the slave station servo interruption expected value.
3. The servo driver synchronization control method according to claim 2, wherein the period register for adjusting the slave servo current loop timing according to the average slave servo current loop interruption number and the slave servo interruption desired value comprises:
adjusting the average slave station servo current loop interruption times;
if the adjusted average slave station servo current loop interruption times are larger than the slave station servo interruption expected value, a period register of slave station servo current loop timing is increased to slow down the slave station servo current loop period.
4. The servo driver synchronization control method according to claim 2, wherein the period register for adjusting the slave servo current loop timing according to the average slave servo current loop interruption number and the slave servo interruption expectation value further comprises:
adjusting the average slave station servo current loop interruption times;
and if the adjusted average slave station servo current loop interruption times are smaller than the slave station servo interruption expected value, reducing a period register of slave station servo current loop timing so as to speed up the slave station servo current loop period.
5. The servo driver synchronization control method according to claim 1, wherein the receiving a bus servo synchronization request, before carrying the number of slave servo current loop interrupts detected in the master bus interrupt, further comprises:
acquiring the current slave station servo current loop calling times and the historical slave station servo current loop calling times;
and obtaining the slave station servo current loop interruption times according to the current slave station servo current loop calling times and the historical slave station servo current loop calling times.
6. The servo driver synchronization control method according to claim 1, wherein adjusting the slave servo current loop period to synchronize the slave servo with the master bus period by the adjusted period register comprises:
adjusting the slave station servo current loop period through the adjusted period register;
obtaining a slave station servo position loop period according to the adjusted slave station servo current loop period and the slave station servo interruption expected value;
and adjusting the master station bus synchronization period according to the slave station servo position loop period so as to synchronize the slave station servo with the master station bus period.
7. The servo driver synchronization control method according to claim 1, wherein the priority of the master bus interrupt is higher than the priority of the slave servo current loop interrupt so that the execution time of the slave servo current loop interrupt does not affect the timing of the master bus while reducing the effect of the execution time of the master bus interrupt on the slave servo current loop.
8. A servo driver synchronization control apparatus, characterized by comprising:
the request module is used for receiving a bus servo synchronous request, wherein the bus servo synchronous request carries the number of slave station servo current loop interruption times detected in the master station bus interruption;
the data acquisition module is used for acquiring a master station bus synchronization period and a slave station servo current loop period, and obtaining a slave station servo interruption expected value according to the master station bus synchronization period and the slave station servo current loop period;
the adjustment module is used for adjusting a period register of slave station servo current loop timing according to the slave station servo current loop interruption times and the slave station servo interruption expected value;
and the synchronization module is used for adjusting the slave station servo current loop period through the adjusted period register so as to synchronize the slave station servo with the master station bus period.
9. A servo driver synchronization control apparatus, characterized by comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the servo driver synchronization control device to perform the servo driver synchronization control method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the servo driver synchronization control method according to any one of claims 1-7.
CN202311490425.0A 2023-11-08 2023-11-08 Servo driver synchronous control method, device, equipment and storage medium Pending CN117590778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311490425.0A CN117590778A (en) 2023-11-08 2023-11-08 Servo driver synchronous control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311490425.0A CN117590778A (en) 2023-11-08 2023-11-08 Servo driver synchronous control method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117590778A true CN117590778A (en) 2024-02-23

Family

ID=89917406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311490425.0A Pending CN117590778A (en) 2023-11-08 2023-11-08 Servo driver synchronous control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117590778A (en)

Similar Documents

Publication Publication Date Title
US7432674B2 (en) Control system
JP4840455B2 (en) Field control system
EP3361635B1 (en) Control system and pulse output device
US7362834B2 (en) Method and device for synchronizing at least one node of a bus system and a corresponding bus system
US10474598B2 (en) Microcomputer
EP3719596B1 (en) Control device and control method
KR20180082359A (en) Synchronization mechanism for high speed sensor interface
CN107402534B (en) Adjusting method, EtherCAT main station and computer readable storage medium
KR20190074026A (en) Synchronization method and system among multiple MCUs in EtherCAT-based slave system
US10606225B2 (en) Motor drive system, motor control system, and self-propelled robot
US6748444B1 (en) Transmission system of short time lag
CN117590778A (en) Servo driver synchronous control method, device, equipment and storage medium
US9677920B2 (en) Automation device and method for reducing jitter
WO2020021597A1 (en) Communication device, communication system, and synchronization control method
JP2000259429A (en) Device and method for managing timer
EP2786494A2 (en) Analog-to-digital converter with early interrupt capability
EP4167588A1 (en) Adaptation to a pulse width modulation frequency variation for a sensor operating in a synchronous mode
JP4487522B2 (en) Motor drive device
CN116318508A (en) EtherCAT slave station servo synchronization device, etherCAT slave station servo synchronization method, electronic equipment and storage medium
CN105302640B (en) A kind of management of timeslice and control device and its management and control method
JPH06318189A (en) Method for synchronizing first frame set corresponding to first processor with second frame set corresponding to second processor
CN113204516A (en) Method and device for time synchronization of processors
CN109991887B (en) Real-time optimization method of embedded real-time EtherCAT main station
US20050143841A1 (en) Electronic controller
KR101610220B1 (en) Method for software pipelining of multi-domain motion control, recording medium and device for performing the method

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