Motion control system, control method and device thereof, storage medium and servo motor

By sending firmware programs to the microcontroller units of slave devices each time the motion control system is powered on and running them in the running memory, the problems of complex firmware upgrades and flash memory occupation in the prior art are solved, thus achieving the effects of saving flash memory space and improving the reliability of firmware upgrades.

CN121634945APending Publication Date: 2026-03-10KUKA ROBOTICS GUANGDONG CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing motion control systems require complex upgrade processes and error handling mechanisms during firmware upgrades, resulting in additional flash memory usage, and firmware upgrade failures may render the device unusable.

Method used

By treating each power-on process of the motion control system as a firmware upgrade, the motion controller sends the firmware program to the microcontroller of the slave device upon power-on, which runs directly in the running memory, avoiding dependence on flash memory chips. It uses an analog flash memory interface for communication and switches to backup firmware when the firmware update fails.

Benefits of technology

It reduces the amount of flash memory used, improves the reliability of firmware upgrades, and prevents devices from becoming unusable due to firmware upgrade failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121634945A_ABST
    Figure CN121634945A_ABST
Patent Text Reader

Abstract

The invention provides a motion control system, a control method and device thereof, a storage medium and a servo motor, and relates to the technical field of motion control systems. The motion control system comprises a motion controller; the slave station equipment comprises a micro-control unit, and the micro-control unit is in communication connection with the motion controller; wherein after the power-on initialization of the motion controller and the micro-control unit is completed, the micro-control unit enters a programming mode, the motion controller sends a first instruction to the micro-control unit, and the first instruction is used for indicating the micro-control unit to operate the first firmware program. According to the method and the device, a flash memory for storing firmware does not need to be arranged in the slave station equipment in a mode of not distinguishing normal starting of the system from firmware upgrading, so that occupation of a flash memory space can be reduced, and a flash memory chip is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of motion control system technology, and more specifically, to a motion control system and its control method, device, storage medium and servo motor. Background Technology

[0002] In related technologies, the firmware of motion control systems is used to control the operation of slave devices. After production, by upgrading the firmware, it is possible to improve the control algorithm, increase the response speed, reduce latency, and optimize the performance of slave devices.

[0003] To enable firmware upgrades, a complex upgrade process and error handling mechanism need to be designed to ensure that the correct firmware can be upgraded and that the device will not become unusable due to upgrade failure. This requires storing a specially designed firmware boot program in the flash memory chip of the slave device, resulting in additional flash memory usage. Summary of the Invention

[0004] This application aims to address at least one of the technical problems existing in the prior art or related technologies.

[0005] Therefore, the first aspect of this application proposes a motion control system.

[0006] The second aspect of this application proposes a control method for a motion control system.

[0007] The third aspect of this application proposes a control device for a motion control system.

[0008] The fourth aspect of this application proposes a readable storage medium.

[0009] The fifth aspect of this application proposes a servo motor.

[0010] In view of the above, a first aspect of this application provides a motion control system, comprising: a motion controller; a slave device, the slave device including a microcontroller unit, the microcontroller unit being communicatively connected to the motion controller; wherein, after the motion controller and the microcontroller unit are powered on and initialized, the microcontroller unit enters a programming mode, and the motion controller sends a first instruction to the microcontroller unit, the first instruction being used to instruct the microcontroller unit to run a first firmware program.

[0011] In this technical solution, the motion control system includes a motion controller and a slave device, wherein the slave device is equipped with a microcontroller unit (MCU). For example, the motion control system is used in a robot, meaning it functions as the robot's controller. The robot includes servo motors, which drive the robot's walking mechanisms or joint movements. Taking the application of the motion control system in a robot as an example, the motion controller is the robot's motion control chip, responsible for planning and controlling the robot to execute corresponding motion actions, while the slave device drives the servo motors.

[0012] In related technologies, motion controllers and slave devices are usually two independent components. For example, the manufacturers of motion controllers and slave devices are different, and they are located on different physical chips or printed circuit boards (PCBs). Therefore, when upgrading firmware, it is generally necessary to obtain the update code from the system through the MCU and reprogram itself, using the firmware update program to change the original firmware program.

[0013] This firmware upgrade method requires designing a complex firmware upgrade program and an error handling mechanism to ensure that the firmware is upgraded to the correct version and to prevent the device from becoming unusable due to the firmware upgrade. Furthermore, the firmware update program used in this method needs to be stored in the MCU's flash memory chip for an extended period, thus occupying valuable flash memory space.

[0014] To address this issue, this application presents a firmware upgrade method that does not require flash memory chips. In this solution, each power-on process of the motion control system is considered a firmware upgrade, without distinguishing between firmware upgrades and normal system startup. Therefore, it is unnecessary to install a separate firmware storage chip in the slave device. The slave device retrieves the firmware from the motion controller during each power-on process; this firmware may be the original firmware or an updated firmware.

[0015] For example, when the first firmware is an outdated firmware, it may be a program stored in the flash memory chip of the motion controller. For example, when the first firmware is an updated firmware, it may be sent to the motion controller by a host computer or downloaded by the motion controller via a network connection; this application does not impose any restrictions on this.

[0016] For example, when the motion control system is powered on, after the microcontroller and motion controller have completed their power-on initialization, the microcontroller enters the programming mode. The motion controller sends a first instruction to the microcontroller. After receiving the first instruction, the microcontroller in programming mode obtains and runs the first firmware program. The first firmware program can be an unupdated stable firmware program or an updated new firmware program.

[0017] For example, the first firmware program described above can be written into the Random Access Memory (RAM) by the motion controller, and then read from the RAM by the microcontroller. For example, the first firmware program described above can be sent to the microcontroller by a host computer.

[0018] After the first firmware program is run, the slave device runs with the firmware corresponding to the first firmware program.

[0019] The technical solution of this application treats each power-on of the motion control system as a firmware update. Each time the system is powered on, the motion controller sends a first instruction to instruct the MCU of the slave device to run the firmware program. By not distinguishing between normal system startup and firmware upgrade, the slave device does not need to set up flash memory for storing firmware, which can reduce the occupation of flash memory space and save flash memory chips.

[0020] In addition, the motion control system in the above-mentioned technical solution provided in this application may also have the following additional technical features:

[0021] In some technical solutions of this application, optionally, the motion controller and the microcontroller are connected via a communication interface; before sending the first instruction to the microcontroller, the motion controller sends the first firmware program to the microcontroller.

[0022] In this technical solution, the motion controller and the slave device can be integrated on the same PCB board, enabling the microcontroller units in the motion controller and the slave device to communicate via independent onboard communication interfaces. For example, the communication interface can be a serial port or a parallel port, enabling high-speed communication connections between the chips.

[0023] After the microcontroller and motion controller complete their power-on initialization, the microcontroller enters programming mode. Before sending the first command, the motion controller first sends the first firmware program required for this startup to the microcontroller via the communication interface. This first firmware program can be the firmware program used during the last startup of the motion control system that has not been updated, or it can be a new, updated firmware program. After receiving the first firmware program, the microcontroller can either store it in its own flash memory chip or write it into its running memory (RAM).

[0024] After the first firmware program is sent, the motion controller sends a first instruction to the microcontroller unit. The first instruction instructs the microcontroller unit, which is in programming mode, to start based on the first firmware program. When the first firmware program is not updated, this step is equivalent to a normal power-on startup. When the first firmware program is updated, this step is equivalent to updating the firmware.

[0025] Each time the power is turned on, the motion controller repeats the above process, so that the motion control system no longer distinguishes between normal startup and firmware update when starting up. This eliminates the need for the slave device to store the firmware upgrade boot program, thus reducing the use of flash memory.

[0026] Optionally, in some technical solutions of this application, the motion controller includes an analog flash memory interface; after entering the programming mode, the microcontroller establishes data communication with the motion controller through a communication interface corresponding to the analog flash memory interface to obtain the first firmware program.

[0027] In this technical solution, the motion controller's capabilities can be utilized to enable it to simulate the interface of a flash memory chip, i.e., the aforementioned simulated flash memory interface. Through the simulated flash memory interface, the microcontroller can treat the motion controller as a flash memory chip. After entering programming mode, the microcontroller can establish data communication with the motion controller through communication interfaces originally used to communicate with the flash memory chip, such as JTAG (Joint Test Action Group) communication interface, SPI (Serial Peripheral Interface) communication interface, UART (Universal Asynchronous Receiver / Transmitter) communication interface, etc., and obtain the first firmware program stored or received by the motion controller.

[0028] This application directly relaxes the firmware required for the motion controller to run into the MCU's RAM and runs it directly. Therefore, the MCU does not need to load the program from the chip or from the external flash memory chip into the RAM, which can save flash memory chips.

[0029] Optionally, in some technical solutions of this application, the motion control system further includes: the microcontroller unit is able to access the running memory to perform read and write operations on the running memory; wherein, before sending the first instruction to the microcontroller unit, the motion controller writes the first firmware program into the running memory.

[0030] In this technical solution, the motion control system includes running memory, and the storage space of the running memory can be a shared running memory space between the motion controller and the motion control system, so that both the microcontroller and the motion controller can perform read and write operations on it.

[0031] For example, running memory is RAM. Running memory has the characteristics of being able to read and write at any time and having a fast read and write speed. During operation, it can write to or operate independently from any designated address at any time. Running memory also has the characteristics of data volatility. After power is turned off, the data stored in running memory will be lost.

[0032] In this application's technical solution, each time the motion control system is powered on, the motion controller writes the first firmware program into the running memory. After the writing is completed, the motion controller sends a first instruction to the microcontroller unit, which is in programming mode. After receiving the first instruction, the microcontroller unit reads and runs the first firmware program from the running memory, thereby completing the normal startup or firmware update operation.

[0033] The technical solution of this application saves flash memory by having the motion controller write the firmware program into the running memory each time it is powered on, thus eliminating the need for a flash memory chip in the drive controller to store the firmware.

[0034] In some technical solutions of this application, the communication interface may optionally include: RS-485 interface, parallel interface, joint test behavior organization interface, serial line debugging interface, universal asynchronous transceiver interface or serial peripheral interface.

[0035] In this technical solution, for example, the communication interface can be RS-485 (an electrical standard that specifies 2-wire, half-duplex, balanced transmission line multi-point communication).

[0036] For example, the communication interface can be a parallel interface, such as an AXI (Advanced eXtensible Interface, a bus protocol) bus interface.

[0037] For example, the communication interface can also be a Joint Test Action Group (JTAG) interface.

[0038] For example, the communication interface can also be a Serial Wire Debug (SWD) interface.

[0039] For example, the communication interface can also be a Universal Asynchronous Receiver / Transmitter (UART) interface.

[0040] For example, the communication interface can also be a Serial Peripheral Interface (SPI).

[0041] In some technical solutions of this application, after the motion controller sends a first instruction to the microcontroller, it starts timing; when the timing duration reaches a first preset duration, the motion controller initiates a communication connection with the microcontroller; and when the communication between the motion controller and the microcontroller fails, the motion controller sends a second instruction to the microcontroller, the second instruction being used to instruct the microcontroller to perform an initialization operation based on a second firmware program.

[0042] In this technical solution, the first instruction is an instruction used to instruct the microcontroller to execute the first firmware program. After receiving the first instruction, the microcontroller reads the first firmware program from the running memory and executes it.

[0043] When the first firmware program is the updated firmware, the microcontroller unit actually performs the firmware update process. During the firmware update, the microcontroller unit can be in a powered-on running state or a powered-off state, and will be powered on again after the firmware program update is completed.

[0044] Because firmware updates may encounter abnormal situations that could lead to update failure, the microcontroller unit will not function properly. To prevent device malfunction due to firmware update failure, the motion controller, after sending the aforementioned first instruction to the microcontroller unit, simultaneously starts timing for a first preset duration. This first preset duration is the sum of the maximum duration required for the microcontroller unit to perform a normal firmware update and the redundant duration.

[0045] When the timing duration reaches the first preset duration, if the microcontroller has successfully completed a firmware update, it will be in a normal power-on and operating state. At this point, the motion controller should be able to communicate normally with the microcontroller. The motion controller then initiates a communication connection with the microcontroller and determines whether normal communication is possible.

[0046] If the motion controller and the microcontroller can communicate normally, it means that the microcontroller has started running based on the first firmware program or the firmware update has been successful. At this time, the motion control system can operate normally.

[0047] If the motion controller cannot communicate normally with the microcontroller, specifically if the motion controller fails to communicate with the microcontroller, it indicates that the microcontroller failed to start or update based on the first firmware program. In this case, switch to the backup firmware, that is, the second firmware program re-controls the microcontroller to start.

[0048] For example, after the motion controller fails to communicate with the microcontroller, the motion controller writes a second firmware program into its runtime memory and sends a second instruction to the microcontroller. This second firmware program is a backup firmware; for example, assuming the first firmware program is an updated firmware, the second firmware program is a backup firmware before the update. For example, assuming the first firmware program is not updated firmware, the second firmware program can be the same firmware program as the first firmware program, that is, the microcontroller is re-initialized through the second firmware program. For example, assuming the first firmware program is not updated firmware, the second firmware program can be a preset "security firmware".

[0049] The technical solution of this application determines whether the microcontroller has started successfully by setting a first preset time period and then judging whether the motion controller and the microcontroller can communicate successfully after the first preset time period. When the microcontroller fails to start based on the first firmware program, the microcontroller is initialized by controlling the second firmware program as backup firmware. This can effectively prevent the device from becoming unusable due to firmware upgrade failure and improve the reliability of firmware upgrade of the motion control system.

[0050] A second aspect of this application provides a control method for a motion control system. The motion control system includes a motion controller and a slave device. The slave device includes a microcontroller unit. The control method includes: when the microcontroller unit is powered on and initialized, controlling the microcontroller unit to enter a programming mode; when the motion controller is powered on and initialized, controlling the motion controller to send a first instruction to the microcontroller unit. The first instruction is used to instruct the microcontroller unit to run a first firmware program.

[0051] In this technical solution, the motion control system includes a motion controller and a slave device, wherein the slave device is equipped with a microcontroller unit (MCU). For example, the motion control system is used in a robot, meaning it functions as the robot's controller. The robot includes servo motors, which drive the robot's walking mechanisms or joint movements. Taking the application of the motion control system in a robot as an example, the motion controller is the robot's motion control chip, responsible for planning and controlling the robot to execute corresponding motion actions, while the slave device drives the servo motors.

[0052] The technical solution of this application treats each power-on process of the motion control system as a firmware upgrade, without distinguishing between firmware upgrades and normal system startup. Therefore, it is not necessary to set a separate firmware storage chip in the slave device. The slave device obtains the firmware from the motion controller during each power-on process. This firmware may be the original firmware or the updated firmware.

[0053] For example, when the first firmware is an outdated firmware, it may be a program stored in the flash memory chip of the motion controller. For example, when the first firmware is an updated firmware, it may be sent to the motion controller by a host computer or downloaded by the motion controller via a network connection; this application does not impose any restrictions on this.

[0054] For example, when the motion control system is powered on, after the microcontroller and motion controller have completed their power-on initialization, the microcontroller enters the programming mode. The motion controller sends a first instruction to the microcontroller. After receiving the first instruction, the microcontroller in programming mode obtains and runs the first firmware program. The first firmware program can be an unupdated stable firmware program or an updated new firmware program.

[0055] For example, the first firmware program described above can be written into the Random Access Memory (RAM) by the motion controller, and then read from the RAM by the microcontroller. For example, the first firmware program described above can be sent to the microcontroller by a host computer.

[0056] After the first firmware program is run, the slave device runs with the firmware corresponding to the first firmware program.

[0057] The technical solution of this application treats each power-on of the motion control system as a firmware update. Each time the system is powered on, the motion controller sends a first instruction to instruct the MCU of the slave device to run the firmware program. By not distinguishing between normal system startup and firmware upgrade, the slave device does not need to set up flash memory for storing firmware, which can reduce the occupation of flash memory space and save flash memory chips.

[0058] Optionally, in some technical solutions of this application, before the motion controller sends the first instruction to the microcontroller, the control method further includes: controlling the motion controller to send the first firmware program to the microcontroller.

[0059] In this technical solution, the motion controller and the slave device can be integrated on the same PCB board, enabling the microcontroller units in the motion controller and the slave device to communicate via independent onboard communication interfaces. For example, the communication interface can be a serial port or a parallel port, enabling high-speed communication connections between the chips.

[0060] After the microcontroller and motion controller complete their power-on initialization, the microcontroller enters programming mode. Before sending the first command, the motion controller first sends the first firmware program required for this startup to the microcontroller via the communication interface. This first firmware program can be the firmware program used during the last startup of the motion control system that has not been updated, or it can be a new, updated firmware program. After receiving the first firmware program, the microcontroller can either store it in its own flash memory chip or write it into its running memory (RAM).

[0061] After the first firmware program is sent, the motion controller sends a first instruction to the microcontroller unit. The first instruction instructs the microcontroller unit, which is in programming mode, to start based on the first firmware program. When the first firmware program is not updated, this step is equivalent to a normal power-on startup. When the first firmware program is updated, this step is equivalent to updating the firmware.

[0062] Each time the power is turned on, the motion controller repeats the above process, so that the motion control system no longer distinguishes between normal startup and firmware update when starting up. This eliminates the need for the slave device to store the firmware upgrade boot program, thus reducing the use of flash memory.

[0063] Optionally, in some technical solutions of this application, before the motion controller sends the first instruction to the microcontroller, the control method further includes: controlling the motion controller to generate an analog flash interface; after the microcontroller enters the programming mode, the control method further includes: controlling the microcontroller to establish data communication through a communication interface corresponding to the analog flash interface; and obtaining the first firmware program through data communication.

[0064] In this technical solution, the motion controller's capabilities can be utilized to enable the motion controller to simulate the interface of a flash memory chip, i.e., the aforementioned simulated flash memory interface. Through the simulated flash memory interface, the microcontroller unit can treat the motion controller as a flash memory chip. After entering programming mode, the microcontroller unit can establish data communication with the motion controller through the SPI (Serial Peripheral Interface) communication interface originally used to communicate with the flash memory chip, such as QSPI (Quad SPI, 6-wire SPI), and obtain the first firmware program stored or received by the motion controller.

[0065] This method utilizes the inherent performance of the motion controller to simulate a flash memory chip. For the microcontroller unit, without any adjustments or modifications to the running logic and program, there is no need to set up a flash memory chip for storing firmware programs. It can achieve the exact same process as setting up a flash memory chip and starting or updating firmware through the flash memory chip, thereby saving the effect of one flash memory chip.

[0066] Optionally, in some technical solutions of this application, the motion control system further includes running memory; before the motion controller sends the first instruction to the microcontroller, the control method further includes: the microcontroller can access the running memory to perform read and write operations on the running memory; wherein, before the motion controller sends the first instruction to the microcontroller, the first firmware program is written into the running memory.

[0067] In this technical solution, the motion control system includes running memory, and the storage space of the running memory can be a shared running memory space between the motion controller and the motion control system, so that both the microcontroller and the motion controller can perform read and write operations on it.

[0068] For example, running memory is RAM. Running memory has the characteristics of being able to read and write at any time and having a fast read and write speed. During operation, it can write to or operate independently from any designated address at any time. Running memory also has the characteristics of data volatility. After power is turned off, the data stored in running memory will be lost.

[0069] In this application's technical solution, each time the motion control system is powered on, the motion controller writes the first firmware program into the running memory. After the writing is completed, the motion controller sends a first instruction to the microcontroller unit, which is in programming mode. After receiving the first instruction, the microcontroller unit reads and runs the first firmware program from the running memory, thereby completing the normal startup or firmware update operation.

[0070] Optionally, in some technical solutions of this application, after the motion controller sends a first instruction to the microcontroller, the control method further includes: controlling the motion controller to start timing; when the timing duration reaches a first preset duration, controlling the motion controller to initiate a communication connection with the microcontroller; and when the communication between the motion controller and the microcontroller fails, controlling the motion controller to send a second instruction to the microcontroller, the second instruction being used to instruct the microcontroller to perform an initialization operation based on a second firmware program.

[0071] In this technical solution, the first instruction is an instruction used to instruct the microcontroller to execute the first firmware program. After receiving the first instruction, the microcontroller reads the first firmware program from the running memory and executes it.

[0072] When the first firmware program is the updated firmware, the microcontroller unit actually performs the firmware update process. During the firmware update, the microcontroller unit can be in a powered-on running state or a powered-off state, and will be powered on again after the firmware program update is completed.

[0073] Because firmware updates may encounter abnormal situations that could lead to update failure, the microcontroller unit will not function properly. To prevent device malfunction due to firmware update failure, the motion controller, after sending the aforementioned first instruction to the microcontroller unit, simultaneously starts timing for a first preset duration. This first preset duration is the sum of the maximum duration required for the microcontroller unit to perform a normal firmware update and the redundant duration.

[0074] When the timing duration reaches the first preset duration, if the microcontroller has successfully completed a firmware update, it will be in a normal power-on and operating state. At this point, the motion controller should be able to communicate normally with the microcontroller. The motion controller then initiates a communication connection with the microcontroller and determines whether normal communication is possible.

[0075] If the motion controller and the microcontroller can communicate normally, it means that the microcontroller has started running based on the first firmware program or the firmware update has been successful. At this time, the motion control system can operate normally.

[0076] If the motion controller cannot communicate normally with the microcontroller, specifically if the motion controller fails to communicate with the microcontroller, it indicates that the microcontroller failed to start or update based on the first firmware program. In this case, switch to the backup firmware, that is, the second firmware program re-controls the microcontroller to start.

[0077] For example, after the motion controller fails to communicate with the microcontroller, the motion controller writes a second firmware program into its runtime memory and sends a second instruction to the microcontroller. This second firmware program is a backup firmware; for example, assuming the first firmware program is an updated firmware, the second firmware program is a backup firmware before the update. For example, assuming the first firmware program is not updated firmware, the second firmware program can be the same firmware program as the first firmware program, that is, the microcontroller is re-initialized through the second firmware program. For example, assuming the first firmware program is not updated firmware, the second firmware program can be a preset "security firmware".

[0078] The technical solution of this application determines whether the microcontroller has started successfully by setting a first preset time period and then judging whether the motion controller and the microcontroller can communicate successfully after the first preset time period. When the microcontroller fails to start based on the first firmware program, the microcontroller is initialized by controlling the second firmware program as backup firmware. This can effectively prevent the device from becoming unusable due to firmware upgrade failure and improve the reliability of firmware upgrade of the motion control system.

[0079] A third aspect of this application provides a control device for a motion control system, comprising: a memory for storing programs or instructions; and a processor for executing programs or instructions to implement the steps of the control method of the motion control system provided in any of the above technical solutions. Therefore, it also includes all the beneficial effects of the control method of the motion control system provided in any of the above technical solutions, and will not be repeated here to avoid repetition.

[0080] The fourth aspect of this application provides a readable storage medium having a program or instructions stored thereon. When the program or instructions are executed by a processor, they implement the steps of the control method of the motion control system provided in any of the above technical solutions. Therefore, it also includes all the beneficial effects of the control method of the motion control system provided in any of the above technical solutions. To avoid repetition, it will not be described again here.

[0081] The fifth aspect of this application provides a servo motor, including a motion control system as provided in any of the above technical solutions; and / or a control device for the motion control system as provided in any of the above technical solutions; and / or a readable storage medium as provided in any of the above technical solutions, thus also including the motion control system as provided in any of the above technical solutions; and / or the control device for the motion control system as provided in any of the above technical solutions; and / or all the beneficial effects of the readable storage medium as provided in any of the above technical solutions are not described in detail here to avoid repetition. Attached Figure Description

[0082] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0083] Figure 1 The following are schematic diagrams illustrating the structure of a motion control system according to some embodiments of this application;

[0084] Figure 2 The following are schematic diagrams illustrating the structure of a motion control system according to some embodiments of this application;

[0085] Figure 3 The following are schematic diagrams illustrating the structure of a motion control system according to some embodiments of this application;

[0086] Figure 4 Flowcharts illustrating control methods of motion control systems according to some embodiments of this application are shown.

[0087] Figure 5 A structural block diagram of the control device of a motion control system according to some embodiments of this application is shown.

[0088] Figure label:

[0089] 100 Motion control system, 102 Motion controller, 104 Slave device, 1042 Microcontroller unit, 106 Communication interface, 108 Analog flash memory interface, 110 Running memory. Detailed Implementation

[0090] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0091] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below.

[0092] The following reference Figures 1 to 5 This application describes a motion control system, control method, apparatus, storage medium, and servo motor provided according to some embodiments of the present application.

[0093] In some embodiments of this application, a motion control system is provided. Figure 1 , Figure 2 and Figure 3 The following are schematic diagrams illustrating the structure of the motion control system of some embodiments of this application, such as... Figure 1 , Figure 2 and Figure 3 As shown, the motion control system 100 includes: a motion controller 102; and a slave device 104, which includes a microcontroller unit 1042. The microcontroller unit 1042 is communicatively connected to the motion controller 102. After the motion controller 102 and the microcontroller unit 1042 are powered on and initialized, the microcontroller unit 1042 enters the programming mode. The motion controller 102 sends a first instruction to the microcontroller unit 1042, which instructs the microcontroller unit 1042 to run a first firmware program.

[0094] In this embodiment, the motion control system 100 includes a motion controller 102 and a slave device 104, wherein the slave device 104 is provided with a microcontroller unit 1042 (MCU). Exemplarily, the motion control system 100 is used in a robot, that is, the motion control system 100 is formed as a controller for the robot. The robot includes servo motors, which are used to drive the robot's walking devices or joint movements. Taking the application of the motion control system 100 to a robot as an example, the motion controller 102 is the robot's motion control chip, responsible for planning and controlling the robot to execute corresponding motion actions, while the slave device 104 is used to drive the servo motors.

[0095] The slave device 104 can be a servo driver, an interface (IO) module, or a communication module.

[0096] For example, Figure 1 , Figure 2 and Figure 3 The communication buses include EtherCAT, Profinet, and CClink. Interface communication includes serial communication such as JTAG, UART, and SPI, as well as parallel communication.

[0097] In related technologies, motion controller 102 and slave device 104 are usually two independent components. For example, motion controller 102 and slave device 104 are manufactured by different companies and are located on different physical chips or printed circuit boards (PCBs). Therefore, when upgrading firmware, it is generally necessary to obtain the update code from the system through the MCU and reprogram itself, and use the firmware update program to change the original firmware program.

[0098] This firmware upgrade method requires designing a complex firmware upgrade program and an error handling mechanism to ensure that the firmware is upgraded to the correct version and to prevent the device from becoming unusable due to the firmware upgrade. Furthermore, the firmware update program used in this method needs to be stored in the MCU's flash memory chip for an extended period, thus occupying valuable flash memory space.

[0099] To address this issue, this application presents a firmware upgrade method that does not require a flash memory chip. In this application, each power-on process of the motion control system 100 is considered a firmware upgrade, and no distinction is made between firmware upgrades and normal system startup. Therefore, it is not necessary to set a separate firmware storage chip in the slave device 104. The slave device 104 obtains the firmware from the motion controller 102 during each power-on process. This firmware may be the original firmware or the updated firmware.

[0100] The motion controller 102 can send power control commands or reset commands to the slave device 104. For example, the motion controller 102 and the slave device 104 communicate via EtherCAT Foe (File Access over EtherCAT, a protocol that enables file transfer between EtherCAT nodes).

[0101] For example, when the first firmware is an outdated firmware, it may be a program stored in the flash memory chip of the motion controller 102. For example, when the first firmware is an updated firmware, it may be sent to the motion controller 102 by a host computer or downloaded by the motion controller 102 via a network connection; this application does not impose any restrictions on this.

[0102] For example, when the motion control system 100 is powered on, after the microcontroller 1042 and the motion controller 102 have completed their power-on initialization, the microcontroller 1042 enters the programming mode. The motion controller 102 sends a first instruction to the microcontroller 1042. After receiving the first instruction, the microcontroller 1042 in the programming mode obtains and runs the first firmware program. The first firmware program can be an unupdated stable firmware program or an updated new firmware program.

[0103] For example, the first firmware program described above can be written into the Random Access Memory (RAM) by the motion controller 102, and then read from the RAM by the microcontroller unit 1042. For example, the first firmware program described above can be sent to the microcontroller unit 1042 by the host computer.

[0104] After running the first firmware program, the slave device 104 runs with the firmware corresponding to that first firmware program. For example, in the first firmware program...

[0105] In this embodiment of the application, each time the motion control system 100 is powered on, it is considered a firmware update. Each time it is powered on, the motion controller 102 sends a first instruction to instruct the MCU of the slave device 104 to run the firmware program. By not distinguishing between normal system startup and firmware upgrade, the slave device 104 does not need to set up flash memory for storing firmware, which can reduce the occupation of flash memory space and save flash memory chips.

[0106] In some embodiments of this application, optionally, such as Figure 1 , Figure 2 and Figure 3 As shown, the motion controller 102 and the microcontroller unit 1042 are connected via a communication interface 106; before sending the first instruction to the microcontroller unit 1042, the motion controller 102 sends the first firmware program to the microcontroller unit 1042.

[0107] In this embodiment, the motion controller 102 and the slave device 104 can be integrated on the same PCB board, enabling the microcontroller unit 1042 in the motion controller 102 and the slave device 104 to communicate via an onboard independent communication interface 106. For example, the communication interface 106 can be a serial port or a parallel port, enabling high-speed communication between the chips.

[0108] After the microcontroller unit 1042 and the motion controller 102 complete their power-on initialization, the microcontroller unit 1042 enters programming mode. Before sending the first command, the motion controller 102 first sends the first firmware program required for this startup to the microcontroller unit 1042 through the communication interface 106. This first firmware program can be the firmware program used during the last startup of the motion control system 100 that has not been updated, or it can be a new firmware program that has been updated. After receiving the first firmware program, the microcontroller unit 1042 can either store it in its own flash memory chip or write it into the running memory 110 (RAM).

[0109] After the first firmware program is sent, the motion controller 102 sends a first instruction to the microcontroller 1042. The first instruction instructs the microcontroller 1042, which is in programming mode, to start based on the first firmware program. When the first firmware program is an unupdated firmware, this step is equivalent to a normal power-on startup. When the first firmware program is an updated firmware, this step is equivalent to updating the firmware.

[0110] Each time the power is turned on, the motion controller 102 repeats the above process, so that the motion control system 100 no longer distinguishes between normal startup and firmware update when it starts up. This means that the slave device 104 does not need to store the firmware upgrade boot program separately, which reduces the use of flash memory space.

[0111] In some embodiments of this application, optionally, such as Figure 1 , Figure 2 and Figure 3 As shown, the motion controller 102 includes an analog flash interface 108; after entering the programming mode, the microcontroller 1042 establishes data communication with the motion controller 102 through the communication interface 106 corresponding to the analog flash interface 108 to obtain the first firmware program.

[0112] In this embodiment, the motion controller 102 can be used to simulate the interface of a flash memory chip, namely the simulated flash memory interface 108. Through the simulated flash memory interface 108, the microcontroller 1042 can regard the motion controller 102 as a flash memory chip. After entering the programming mode, the microcontroller 1042 can establish data communication with the motion controller 102 through the communication interfaces originally used to communicate with the flash memory chip, such as the JTAG (Joint Test Action Group) communication interface, the SPI (Serial Peripheral Interface) communication interface 106, and the UART (Universal Asynchronous Receiver / Transmitter) communication interface, and obtain the first firmware program stored or received by the motion controller 102.

[0113] This application directly relaxes the firmware required for the motion controller to run into the MCU's RAM and runs it directly. Therefore, the MCU does not need to load the program from the chip or from the external flash memory chip into the RAM, which can save flash memory chips.

[0114] In some embodiments of this application, optionally, such as Figure 1 , Figure 2 and Figure 3 As shown, the motion control system 100 also includes: a running memory 110, and a microcontroller unit 1042 is able to access the running memory 110 to perform read and write operations on the running memory 110; wherein, before sending the first instruction to the microcontroller unit 1042, the motion controller 102 writes the first firmware program into the running memory 110.

[0115] In this embodiment, the motion control system 100 includes a running memory 110. The storage space of the running memory 110 can be a shared running memory space between the motion controller 102 and the motion control system 100, so that both the microcontroller unit 1042 and the motion controller 102 can perform read and write operations on it.

[0116] For example, the running memory 110 is RAM. The running memory 110 has the characteristics of being able to read and write at any time and having a fast read and write speed. During operation, it can write to or operate independently from any designated address at any time. The running memory 110 also has the characteristics of data volatility. After power is off, the data stored in the running memory 110 will be lost.

[0117] In this embodiment of the application, each time the motion control system 100 is powered on, the motion controller 102 writes the first firmware program into the running memory. After the writing is completed, the motion controller 102 sends a first instruction to the microcontroller 1042 which is in programming mode. After receiving the first instruction, the microcontroller 1042 reads and runs the first firmware program from the running memory 110, thereby completing the normal startup or firmware update operation.

[0118] In this embodiment, the motion controller 102 writes the firmware program into the running memory 110 each time the power is turned on, so that the drive controller no longer needs to set up a flash memory chip for storing firmware, thus saving flash memory.

[0119] In some embodiments of this application, the communication interface 106 may optionally include: an RS-485 interface, a parallel interface, a joint test behavior organization interface, a serial line debug interface, a universal asynchronous transceiver interface, or a serial peripheral interface.

[0120] In this embodiment, for example, the communication interface 106 may be RS-485 (an electrical standard for 2-wire, half-duplex, balanced transmission line multi-point communication).

[0121] For example, the communication interface 106 can be a parallel interface, such as an AXI (Advanced eXtensible Interface, a bus protocol) bus interface.

[0122] For example, communication interface 106 can also be a Joint Test Action Group (JTAG) interface.

[0123] For example, the communication interface 106 can also be a serial wire debug (SWD) interface.

[0124] For example, the communication interface 106 can also be a Universal Asynchronous Receiver / Transmitter (UART) interface.

[0125] For example, the communication interface 106 can also be a Serial Peripheral Interface (SPI).

[0126] In some embodiments of this application, after the motion controller 102 sends a first instruction to the microcontroller 1042, it starts timing; when the timing duration reaches a first preset duration, the motion controller 102 initiates a communication connection with the microcontroller 1042; and when the communication between the motion controller 102 and the microcontroller 1042 fails, the motion controller 102 sends a second instruction to the microcontroller 1042, the second instruction being used to instruct the microcontroller 1042 to perform an initialization operation based on a second firmware program.

[0127] In this embodiment, the first instruction is an instruction to instruct the microcontroller unit 1042 to execute the first firmware program. After receiving the first instruction, the microcontroller unit 1042 reads the first firmware program from the running memory 110 and executes it.

[0128] When the first firmware program is the updated firmware, the microcontroller 1042 actually performs the firmware update process. During the firmware update, the microcontroller 1042 can be in a power-on running state or a power-off state, and will be powered on again after the firmware program update is completed.

[0129] Because abnormal situations may occur during firmware updates, causing the firmware update to fail, the microcontroller unit 1042 will not be able to operate normally. In order to avoid the device from failing to operate normally due to firmware update failure, after sending the aforementioned first instruction to the microcontroller unit 1042, the motion controller 102 simultaneously starts timing for a first preset duration. This first preset duration is the sum of the maximum duration required for the microcontroller unit 1042 to normally execute the firmware update and the redundant duration.

[0130] When the timing duration reaches the first preset duration, if the microcontroller unit 1042 has successfully completed a firmware update, then the microcontroller unit 1042 is now in a normal power-on and operating state. At this time, the motion controller 102 should be able to communicate normally with the microcontroller unit 1042. The motion controller 102 then initiates a communication connection with the microcontroller unit 1042 and determines whether normal communication is possible.

[0131] If the motion controller 102 and the microcontroller 1042 can communicate normally, it means that the microcontroller 1042 starts running based on the first firmware program or the firmware update is successful. At this time, the motion control system 100 can run normally.

[0132] If the motion controller 102 cannot communicate normally with the microcontroller 1042, specifically, if the motion controller 102 fails to communicate with the microcontroller 1042, it indicates that the microcontroller 1042 has failed to start or update based on the first firmware program. At this time, the backup firmware is switched, that is, the second firmware program re-controls the microcontroller 1042 to start.

[0133] For example, after the motion controller 102 fails to communicate with the microcontroller 1042, the motion controller 102 writes a second firmware program into the runtime memory 110 and sends a second instruction to the microcontroller 1042. This second firmware program is a backup firmware; for example, assuming the first firmware program is an updated firmware, the second firmware program is a backup firmware before the update. For example, assuming the first firmware program is an outdated firmware, the second firmware program can be the same as the first firmware program, i.e., the microcontroller 1042 is re-initialized through the second firmware program. For example, assuming the first firmware program is an outdated firmware, the second firmware program can be a preset "security firmware".

[0134] This application embodiment sets a first preset time period, and after the first preset time period, determines whether the motion controller 102 and the microcontroller 1042 can successfully communicate to determine whether the microcontroller 1042 has successfully started. When the microcontroller 1042 fails to start based on the first firmware program, the microcontroller 1042 is initialized by controlling the second firmware program as backup firmware. This can effectively prevent the device from becoming unusable due to firmware upgrade failure and improve the reliability of firmware upgrade of the motion control system 100.

[0135] In some embodiments of this application, a control method for a motion control system is provided. The motion control system includes a motion controller and a slave device, the slave device including a microcontroller unit. Figure 4 Flowcharts of control methods for motion control systems according to some embodiments of this application are shown, such as... Figure 4 As shown, the control methods include:

[0136] Step 402: After the microcontroller unit has completed its power-on initialization, control the microcontroller unit to enter programming mode;

[0137] Step 404: After the motion controller has completed its power-on initialization, control the motion controller to send a first instruction to the microcontroller unit. The first instruction is used to instruct the microcontroller unit to run the first firmware program.

[0138] In this embodiment, the motion control system includes a motion controller and a slave device, wherein the slave device is equipped with a microcontroller unit (MCU). Exemplarily, the motion control system is used in a robot, meaning it functions as a controller for the robot. The robot includes servo motors that drive the robot's walking mechanisms or joint movements. Taking the application of the motion control system to a robot as an example, the motion controller is the robot's motion control chip, responsible for planning and controlling the robot to execute corresponding motion actions, while the slave device drives the servo motors.

[0139] In this embodiment, each power-on process of the motion control system is regarded as a firmware upgrade, and no distinction is made between firmware upgrade and normal system startup. Therefore, it is not necessary to set a separate firmware storage chip in the slave device. The slave device obtains the firmware from the motion controller during each power-on process. The firmware may be the original firmware or the updated firmware.

[0140] For example, when the first firmware is an outdated firmware, it may be a program stored in the flash memory chip of the motion controller. For example, when the first firmware is an updated firmware, it may be sent to the motion controller by a host computer or downloaded by the motion controller via a network connection; this application does not impose any restrictions on this.

[0141] For example, when the motion control system is powered on, after the microcontroller and motion controller have completed their power-on initialization, the microcontroller enters the programming mode. The motion controller sends a first instruction to the microcontroller. After receiving the first instruction, the microcontroller in programming mode obtains and runs the first firmware program. The first firmware program can be an unupdated stable firmware program or an updated new firmware program.

[0142] For example, the first firmware program described above can be written into the Random Access Memory (RAM) by the motion controller, and then read from the RAM by the microcontroller. For example, the first firmware program described above can be sent to the microcontroller by a host computer.

[0143] After the first firmware program is run, the slave device runs with the firmware corresponding to the first firmware program.

[0144] In this embodiment of the application, each time the motion control system is powered on, it is considered a firmware update. Each time it is powered on, the motion controller sends a first instruction to instruct the MCU of the slave device to run the firmware program. By not distinguishing between normal system startup and firmware upgrade, the slave device does not need to set up flash memory for storing firmware, which can reduce the occupation of flash memory space and save flash memory chips.

[0145] In some embodiments of this application, optionally, before controlling the motion controller to send the first instruction to the microcontroller, the control method further includes: controlling the motion controller to send the first firmware program to the microcontroller.

[0146] In this embodiment, the motion controller and the slave device can be integrated on the same PCB board, enabling the microcontroller units in the motion controller and the slave device to communicate via an onboard independent communication interface. For example, the communication interface can be a serial port or a parallel port, enabling high-speed communication between the chips.

[0147] After the microcontroller and motion controller complete their power-on initialization, the microcontroller enters programming mode. Before sending the first command, the motion controller first sends the first firmware program required for this startup to the microcontroller via the communication interface. This first firmware program can be the firmware program used during the last startup of the motion control system that has not been updated, or it can be a new, updated firmware program. After receiving the first firmware program, the microcontroller can either store it in its own flash memory chip or write it into its running memory (RAM).

[0148] After the first firmware program is sent, the motion controller sends a first instruction to the microcontroller unit. The first instruction instructs the microcontroller unit, which is in programming mode, to start based on the first firmware program. When the first firmware program is not updated, this step is equivalent to a normal power-on startup. When the first firmware program is updated, this step is equivalent to updating the firmware.

[0149] Each time the power is turned on, the motion controller repeats the above process, so that the motion control system no longer distinguishes between normal startup and firmware update when starting up. This eliminates the need for the slave device to store the firmware upgrade boot program, thus reducing the use of flash memory.

[0150] In some embodiments of this application, optionally, before the motion controller sends a first instruction to the microcontroller, the control method further includes: controlling the motion controller to generate an analog flash interface; after the microcontroller enters programming mode, the control method further includes: controlling the microcontroller to establish data communication through a communication interface corresponding to the analog flash interface; and obtaining a first firmware program through data communication.

[0151] In this embodiment, the motion controller's capabilities can be utilized to enable the motion controller to simulate the interface of a flash memory chip, i.e., the aforementioned simulated flash memory interface. Through the simulated flash memory interface, the microcontroller unit can treat the motion controller as a flash memory chip. After entering programming mode, the microcontroller unit can establish data communication with the motion controller through the SPI (Serial Peripheral Interface) communication interface originally used to communicate with the flash memory chip, such as QSPI (Quad SPI, 6-wire SPI), and obtain the first firmware program stored or received by the motion controller.

[0152] This method utilizes the inherent performance of the motion controller to simulate a flash memory chip. For the microcontroller unit, without any adjustments or modifications to the running logic and program, there is no need to set up a flash memory chip for storing firmware programs. It can achieve the exact same process as setting up a flash memory chip and starting or updating firmware through the flash memory chip, thereby saving the effect of one flash memory chip.

[0153] In some embodiments of this application, optionally, the motion control system further includes running memory; before the motion controller sends the first instruction to the microcontroller, the control method further includes: running memory, wherein the microcontroller can access the running memory to perform read and write operations on the running memory; wherein the motion controller writes the first firmware program into the running memory before sending the first instruction to the microcontroller.

[0154] In this embodiment, the motion control system includes running memory, and the storage space of the running memory can be a shared running memory space between the motion controller and the motion control system, so that both the microcontroller and the motion controller can perform read and write operations on it.

[0155] For example, running memory is RAM. Running memory has the characteristics of being able to read and write at any time and having a fast read and write speed. During operation, it can write to or operate independently from any designated address at any time. Running memory also has the characteristics of data volatility. After power is turned off, the data stored in running memory will be lost.

[0156] In this embodiment of the application, each time the motion control system is powered on, the motion controller writes a first firmware program into the running memory. After the writing is completed, the motion controller sends a first instruction to the microcontroller unit in programming mode. After receiving the first instruction, the microcontroller unit reads and runs the first firmware program from the running memory, thereby completing the normal startup or firmware update operation.

[0157] In some embodiments of this application, optionally, after controlling the motion controller to send a first instruction to the microcontroller, the control method further includes: controlling the motion controller to start timing; when the timing duration reaches a first preset duration, controlling the motion controller to initiate a communication connection with the microcontroller; and when the communication between the motion controller and the microcontroller fails, controlling the motion controller to send a second instruction to the microcontroller, the second instruction being used to instruct the microcontroller to perform an initialization operation based on a second firmware program.

[0158] In this embodiment, the first instruction is an instruction used to instruct the microcontroller to execute the first firmware program. After receiving the first instruction, the microcontroller reads the first firmware program from the running memory and executes it.

[0159] When the first firmware program is the updated firmware, the microcontroller unit actually performs the firmware update process. During the firmware update, the microcontroller unit can be in a powered-on running state or a powered-off state, and will be powered on again after the firmware program update is completed.

[0160] Because firmware updates may encounter abnormal situations that could lead to update failure, the microcontroller unit will not function properly. To prevent device malfunction due to firmware update failure, the motion controller, after sending the aforementioned first instruction to the microcontroller unit, simultaneously starts timing for a first preset duration. This first preset duration is the sum of the maximum duration required for the microcontroller unit to perform a normal firmware update and the redundant duration.

[0161] When the timing duration reaches the first preset duration, if the microcontroller has successfully completed a firmware update, it will be in a normal power-on and operating state. At this point, the motion controller should be able to communicate normally with the microcontroller. The motion controller then initiates a communication connection with the microcontroller and determines whether normal communication is possible.

[0162] If the motion controller and the microcontroller can communicate normally, it means that the microcontroller has started running based on the first firmware program or the firmware update has been successful. At this time, the motion control system can operate normally.

[0163] If the motion controller cannot communicate normally with the microcontroller, specifically if the motion controller fails to communicate with the microcontroller, it indicates that the microcontroller failed to start or update based on the first firmware program. In this case, switch to the backup firmware, that is, the second firmware program re-controls the microcontroller to start.

[0164] For example, after the motion controller fails to communicate with the microcontroller, the motion controller writes a second firmware program into its runtime memory and sends a second instruction to the microcontroller. This second firmware program is a backup firmware; for example, assuming the first firmware program is an updated firmware, the second firmware program is a backup firmware before the update. For example, assuming the first firmware program is not updated firmware, the second firmware program can be the same firmware program as the first firmware program, that is, the microcontroller is re-initialized through the second firmware program. For example, assuming the first firmware program is not updated firmware, the second firmware program can be a preset "security firmware".

[0165] This application embodiment determines whether the microcontroller has started successfully by setting a first preset time period and then judging whether the motion controller and the microcontroller can communicate successfully after the first preset time period. When the microcontroller fails to start based on the first firmware program, the microcontroller is initialized by controlling the second firmware program, which serves as backup firmware. This can effectively prevent the device from becoming unusable due to firmware upgrade failure and improve the reliability of firmware upgrades for the motion control system.

[0166] In some embodiments of this application, a firmware upgrade method without flash memory chips is provided. This method is suitable for highly integrated robot controllers, especially those where motion control chips and servo drive chips are integrated on a single PCB board. Since long-distance communication is not required, board-level chip communication can be used for firmware updates, such as through serial ports (e.g., JTAG, SPI, RS485, or UART) and parallel ports (e.g., AXI bus) to achieve high-speed communication between chips. In some embodiments, the communication interfaces are SPI and UART, which are simple to drive. In other embodiments, the communication interfaces are JTAG and SWD. These interfaces are more universal and applicable to almost all MCUs, but driver development is more complex.

[0167] The core idea of ​​this solution is to treat each MCU power-on process as a firmware upgrade, thus not distinguishing between firmware upgrades and normal system startup. The slave device no longer provides a separate firmware chip storage component; instead, it obtains the latest firmware from the motion controller during each power-on process.

[0168] The MCU startup or upgrade process is as follows:

[0169] 1. After the system is powered on, the MCU enters online programming mode. This mode can be controlled by the controller, or it can be a hardware design that is fixed to start in this mode.

[0170] 2. After the motion controller is initialized, the firmware is sent to the MCU via JTAG, SPI, UART, etc. The firmware will be directly written into the MCU's running memory.

[0171] 3. After the program is written, the motion controller sends a jump command to make the MCU run the program from the specified position.

[0172] 4. The motion controller checks whether the MCU has been successfully powered on within a limited time. For example, it can confirm whether the MCU has started through ECAT bus communication, or it can use the existing SPI interface or serial port to notify the motion controller whether it has started successfully.

[0173] 5. If the motion controller cannot communicate with the MCU within the specified time, the upgrade is deemed to have failed. The motion controller will then restart and initialize the MCU using the backup firmware.

[0174] This method has the following advantages:

[0175] 1. The upgrade process is simple. The entire upgrade process logic is handled by the motion controller, without the need for cooperation with the MCU's boot program.

[0176] 2. No need to develop firmware upgrade and bootloader for the MCU side.

[0177] 3. It can save one flash memory chip.

[0178] 4. There is no issue of being unable to upgrade or restart the system due to upgrade failure.

[0179] 5. There is no need to pre-program the MCU's Flash memory during the production process, which simplifies the production and shipping process.

[0180] 6. It is easy to implement firmware version control for the MCU, because the controller can query the firmware to be downloaded, such as its name, version, and checksum, through the file system without the MCU having to provide version information.

[0181] In some implementations, if the MCU does not support firmware download via serial port, the firmware can be transferred online to the MCU via JTAG or SWD interface, directly writing the firmware into the MCU's memory.

[0182] In other implementations, the motion controller can simulate the interface of a Flash chip. Each time the system powers on, the MCU directly obtains the firmware from the motion controller via the QSPI interface and the Flash chip's communication protocol. For the MCU, no adjustments or modifications are required, but this saves the need for a Flash chip and achieves the same effect as booting from a Flash chip.

[0183] This application treats each MCU power-on process as a firmware upgrade, thus not distinguishing between firmware upgrades and normal system startup. The slave device no longer provides a separate firmware chip storage component; instead, it obtains the latest firmware from the motion controller during each power-on process. In this scheme, the MCU's firmware is stored in the controller's file system, and the controller transmits the firmware to the MCU via the communication interface each time the system powers on. This scheme saves one Flash chip and avoids the need to develop a separate firmware upgrade program, simplifying the MCU's firmware upgrade process. Furthermore, since the firmware is stored in the controller's file system, firmware management and maintenance are much more convenient.

[0184] In some embodiments of this application, a control device for a motion control system is provided. Figure 5 Structural block diagrams of the control devices of motion control systems according to some embodiments of this application are shown, such as... Figure 5 As shown, the control device 500 includes: a memory 502 for storing programs or instructions; and a processor 504 for executing programs or instructions to implement the steps of the control method of the motion control system provided in any of the above embodiments. Therefore, it also includes all the beneficial effects of the control method of the motion control system provided in any of the above embodiments, which will not be described again here to avoid repetition.

[0185] In some embodiments of this application, a readable storage medium is provided on which a program or instructions are stored. When the program or instructions are executed by a processor, they implement the steps of the control method of the motion control system provided in any of the above embodiments. Therefore, it also includes all the beneficial effects of the control method of the motion control system provided in any of the above embodiments. To avoid repetition, it will not be described again here.

[0186] In some embodiments of this application, a servo motor is provided, including a motion control system as provided in any of the above embodiments; and / or a control device for the motion control system as provided in any of the above embodiments; and / or a readable storage medium as provided in any of the above embodiments, and therefore also includes the motion control system as provided in any of the above embodiments; and / or the control device for the motion control system as provided in any of the above embodiments; and / or all the beneficial effects of the readable storage medium as provided in any of the above embodiments will not be repeated here to avoid repetition.

[0187] The methods can be implemented in various ways depending on specific features and / or example applications. For example, these methods can be implemented by a combination of hardware, firmware, and / or software. For instance, in a hardware implementation, the processor can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, electronic devices, other device units for performing the functions described above, and / or combinations thereof.

[0188] A computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A computer-readable storage medium can be an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing, but is not limited thereto. A non-exhaustive list of more specific examples of computer-readable storage media includes: portable computer floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital universal disk (DVD), memory cards, floppy disks, encoding mechanical devices (e.g., punched cards or grooves with raised structures for recording instructions), and any suitable combination of the foregoing. The computer-readable storage medium used herein should not be construed as the transmission of signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media, or electrical signals transmitted through wires.

[0189] In the description of this application, the term "multiple" refers to two or more. Unless otherwise expressly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0190] In the description of this application, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of this application. In this application, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0191] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A motion control system characterized by, The motion controller comprises: a slave device, the slave device comprising a micro control unit, the micro control unit being communicatively connected with the motion controller; wherein, after power-on initialization of the motion controller and the micro control unit is completed, the micro control unit enters a programming mode, the motion controller sends a first instruction to the micro control unit, the first instruction being used to instruct the micro control unit to run a first firmware program. The motion controller and the micro control unit are communicatively connected through a communication interface; 2. The motion control system of claim 1, wherein, Before the motion controller sends the first instruction to the micro control unit, the motion controller sends the first firmware program to the micro control unit. The motion controller comprises an analog flash interface; after the micro control unit enters the programming mode, the micro control unit establishes data communication with the motion controller through a communication interface corresponding to the analog flash interface, to obtain the first firmware program.

3. The motion control system of claim 1, wherein, Further comprising:

4. A motion control system according to claim 2 or 3, characterised in that, a running memory, the micro control unit being able to access the running memory to perform read and write operations on the running memory; wherein, before the motion controller sends the first instruction to the micro control unit, the motion controller writes the first firmware program into the running memory. The communication interface comprises:

5. The motion control system of claim 2 or 3, wherein, an RS-458 interface, a parallel interface, a joint test action group interface, a serial wire debug interface, a universal asynchronous receiver-transmitter interface or a serial peripheral interface. After the motion controller sends the first instruction to the micro control unit, the motion controller starts timing; in the case that the timing duration reaches a first preset duration, the motion controller initiates communication connection with the micro control unit; and 6. The motion control system of any one of claims 1 to 3, wherein, In the case that the motion controller fails to communicate with the micro control unit, the motion controller sends a second instruction to the micro control unit, the second instruction being used to instruct the micro control unit to perform initialization operation based on a second firmware program. The motion control system comprises a motion controller and a slave device, the slave device comprising a micro control unit, and the control method comprises:

7. A control method of a motion control system, characterized by, in the case that power-on initialization of the micro control unit is completed, controlling the micro control unit to enter a programming mode; in the case that power-on initialization of the motion controller is completed, controlling the motion controller to send a first instruction to the micro control unit, the first instruction being used to instruct the micro control unit to run a first firmware program. Before the control of the motion controller sending the first instruction to the micro control unit, the control method further comprises:

8. The control method of a motion control system according to claim 7, wherein controlling the motion controller to send the first firmware program to the micro control unit. Before the control of the motion controller sending the first instruction to the micro control unit, the control method further comprises:

9. The control method of a motion control system according to claim 7, wherein controlling the motion controller to generate an analog flash interface; After the control of the micro control unit entering the programming mode, the control method further comprises: controlling the micro control unit to establish data communication through a communication interface corresponding to the analog flash interface; and obtaining the first firmware program through the data communication. ​ 10. The control method of the motion control system according to claim 7, characterized by, The motion control system further comprises a running memory; before the control of the motion controller sending the first instruction to the micro control unit, the control method further comprises: The micro control unit can access the running memory to read and write the running memory; wherein, before the motion controller sending the first instruction to the micro control unit, the motion controller writes the first firmware program into the running memory.

11. The control method of a motion control system according to any one of claims 7 to 10, characterized by, After the control of the motion controller sending the first instruction to the micro control unit, the control method further comprises: Controlling the motion controller to start timing; In the case that the timing duration reaches the first preset duration, controlling the motion controller to initiate a communication connection with the micro control unit; In the case that the motion controller fails to communicate with the micro control unit, controlling the motion controller to send a second instruction to the micro control unit, the second instruction being used to instruct the micro control unit to perform an initialization operation based on a second firmware program.

12. A control device of a motion control system, characterized by comprising: Comprise: A memory for storing programs or instructions; A processor for executing the programs or instructions to implement the steps of the control method of the motion control system according to any one of claims 7 to 11.

13. A readable storage medium, on which a program or instructions are stored, characterized in that, The programs or instructions are executed by the processor to implement the steps of the control method of the motion control system according to any one of claims 7 to 11.

14. A servo motor characterized by Comprise: The motion control system according to any one of claims 1 to 6; And / or The control device of the motion control system according to claim 12; and / or The readable storage medium according to claim 13.

Citation Information

Patent Citations

  • Device and method for on-line updating fastener programm

    CN101030140A

  • Firmware upgrading method and system based on a flash memory microcontroller and a flash memory microcontroller

    CN109284117A

  • Motion controller and control method

    CN116610069A

  • Firmware debugging method, device, system and equipment and storage medium

    CN116701192A

  • Microcontroller starting method, device and equipment and storage medium

    CN117112059A