Multi-axis motion control method, device, equipment, storage medium and product

By using a high-speed serial bus to poll encoder data and filter adaptive control strategies in a multi-axis motion control system, the problem that traditional single encoders cannot meet the control needs of multiple scenarios is solved, differentiated closed-loop control is realized, and the system integration and control reliability are improved.

CN121578737BActive Publication Date: 2026-07-21SHENZHEN SHENGQIANG TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN SHENGQIANG TECH
Filing Date
2026-01-26
Publication Date
2026-07-21

Smart Images

  • Figure CN121578737B_ABST
    Figure CN121578737B_ABST
Patent Text Reader

Abstract

The application discloses a multi-axis motion control method and device, equipment, storage medium and product, and relates to the technical field of data processing. The method comprises the following steps: polling each axis corresponding motion control chip in a preset control period through a high-speed serial bus in sequence, and obtaining each axis corresponding encoder data fed back by each axis corresponding motion control chip; determining the encoder type corresponding to each axis according to the encoder data corresponding to each axis; selecting a target control strategy from a preset control strategy based on the encoder type corresponding to each axis, and performing closed-loop control on each axis according to the target control strategy. Compared with a traditional single-encoder-type motion control scheme, the application cannot meet the control requirements of multiple scenes. The application selects a control strategy according to the encoder type, selects different control strategies for different encoder types corresponding to each axis, and performs differential closed-loop control according to different control strategies, thereby meeting the control requirements of multiple scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to multi-axis motion control methods, devices, equipment, storage media, and products. Background Technology

[0002] Currently, in multi-axis motion control systems, a single type of encoder is usually chosen to meet the corresponding requirements in order to achieve precise positioning. However, traditional single-type encoder control schemes cannot meet the control requirements of multiple scenarios, resulting in the inability to effectively achieve motion control.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a multi-axis motion control method, device, equipment, storage medium and product, which aims to solve the technical problem that traditional single encoder type motion control schemes cannot meet the control needs of multiple scenarios.

[0005] To achieve the above objectives, this application proposes a multi-axis motion control method, the method comprising: The motion control chip corresponding to each axis is accessed sequentially via a high-speed serial bus within a preset control cycle, and the encoder data corresponding to each axis is obtained from the motion control chip of each axis. Determine the encoder type for each axis based on the encoder data for each axis; Based on the encoder type corresponding to each axis, a target control strategy is selected from the preset control strategies, and closed-loop control is performed on each axis according to the target control strategy.

[0006] In one embodiment, the preset control strategy includes a high-speed closed-loop control strategy and an absolute value closed-loop control strategy. The step of selecting a target control strategy from the preset control strategies based on the encoder type corresponding to each axis, and performing closed-loop control on each axis according to the target control strategy, includes: If the encoder type is an incremental encoder, then a high-speed closed-loop control strategy is selected as the target control strategy, and dynamic following closed-loop control is performed on each axis according to the high-speed closed-loop control strategy. If the encoder type is an absolute encoder, then an absolute closed-loop control strategy is selected as the target control strategy, and static positioning closed-loop control is performed on each axis according to the absolute closed-loop control strategy.

[0007] In one embodiment, the step of selecting an absolute value closed-loop control strategy as the target control strategy if the encoder type is an absolute value encoder, and performing static positioning closed-loop control on each axis according to the absolute value closed-loop control strategy, includes: If the encoder type is an absolute encoder, then the absolute closed-loop control strategy is selected as the target control strategy, and the target motion mode is determined according to the configuration parameters of the motion control chip. Static positioning closed-loop control is performed on each axis according to the target motion pattern and the absolute value closed-loop control strategy.

[0008] In one embodiment, the target motion mode includes a linear motion mode and a circular motion mode, and the step of performing static positioning closed-loop control on each axis according to the target motion mode and the absolute value closed-loop control strategy further includes: In linear motion mode, the actual linear position is determined based on the preset motor zero point information and the position fed back by the encoder contained in the configuration parameters, and static positioning closed-loop control is performed on each axis based on the actual linear position. In circular motion mode, the position fed back by the encoder and the single-turn resolution of the encoder are used to perform a modulo operation to obtain the single-turn angle value within a preset range; Static positioning closed-loop control is performed on each axis based on the single-turn angle value.

[0009] In one embodiment, the step of determining the actual linear position based on the preset motor zero-point information and encoder feedback position included in the configuration parameters, and performing static positioning closed-loop control on each axis based on the actual linear position in linear motion mode, includes: In linear motion mode, the actual linear position is determined based on the preset motor zero-point information included in the configuration parameters and the position fed back by the encoder. The linear actual position is compared with the target position sent by the host computer to obtain the first position deviation information; Static positioning closed-loop control is performed on each axis based on the first position deviation information.

[0010] In one embodiment, the step of performing static positioning closed-loop control on each axis based on the single-turn angle value includes: The actual position of the circumference is determined based on the pulse value corresponding to the single-circle angle value. The actual position of the circumference is compared with the target position sent by the host computer to obtain the second position deviation information; Static positioning closed-loop control is performed on each axis based on the second position deviation information.

[0011] Furthermore, to achieve the above objectives, this application also proposes a multi-axis motion control device, which includes: The data acquisition module is used to sequentially poll the motion control chip corresponding to each axis within a preset control cycle via a high-speed serial bus, and to acquire the encoder data corresponding to each axis fed back by the motion control chip corresponding to each axis. The type determination module is used to determine the encoder type for each axis based on the encoder data for each axis. The strategy control module is used to select a target control strategy from the preset control strategies based on the encoder type corresponding to each axis, and to perform closed-loop control on each axis according to the target control strategy.

[0012] In addition, to achieve the above objectives, this application also proposes a multi-axis motion control device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the multi-axis motion control method as described above.

[0013] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the multi-axis motion control method described above.

[0014] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the multi-axis motion control method described above.

[0015] One or more technical solutions proposed in this application have at least the following technical effects: This application uses a high-speed serial bus to sequentially poll the motion control chip corresponding to each axis within a preset control cycle and obtains the encoder data corresponding to each axis fed back by the motion control chip. Based on the encoder data, the encoder type for each axis is determined. A target control strategy is selected from preset control strategies based on the encoder type, and closed-loop control is performed on each axis according to the target control strategy. Compared to traditional motion control schemes with a single encoder type, which cannot meet the control requirements of multiple scenarios, this application selects the corresponding control strategy by encoder type, enabling different control strategies to be selected for different encoder types for each axis, and achieving differentiated closed-loop control based on different control strategies, thereby meeting the control requirements of multiple scenarios. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating an embodiment of the multi-axis motion control method of this application. Figure 2 This is a hardware connection diagram provided for Embodiment 1 of the multi-axis motion control method of this application; Figure 3 This is a flowchart illustrating Embodiment 2 of the multi-axis motion control method of this application. Figure 4 This is a schematic diagram illustrating the determination of the multi-axis polling strategy in the multi-axis motion control method provided in Embodiment 2 of this application; Figure 5 This is a schematic diagram of the module structure of the multi-axis motion control device according to an embodiment of this application; Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the multi-axis motion control method in the embodiments of this application.

[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0020] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.

[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0022] The main solution of this application embodiment is as follows: This application sequentially polls the motion control chip corresponding to each axis through a high-speed serial bus within a preset control cycle, and obtains the encoder data corresponding to each axis fed back by the motion control chip corresponding to each axis; determines the encoder type corresponding to each axis based on the encoder data corresponding to each axis; selects a target control strategy from the preset control strategy based on the encoder type corresponding to each axis, and performs differentiated closed-loop control on each axis according to the target control strategy.

[0023] In this embodiment, for ease of description, the following description uses a computing service device as the execution subject.

[0024] Traditional motion control solutions with a single encoder type cannot meet the control needs of multiple scenarios.

[0025] This application provides a solution that filters the corresponding control strategy by encoder type, enabling different control strategies to be selected for different encoder types for each axis, and achieving differentiated closed-loop control based on different control strategies, thereby meeting the control needs of multiple scenarios.

[0026] As can be seen from the above embodiments, this application sequentially polls the motion control chip corresponding to each axis within a preset control cycle via a high-speed serial bus, and obtains the encoder data corresponding to each axis fed back by the motion control chip. Based on the encoder data, the encoder type corresponding to each axis is determined. A target control strategy is selected from preset control strategies based on the encoder type of each axis, and differentiated closed-loop control is performed on each axis according to the target control strategy. Compared to the problem that traditional motion control schemes with a single encoder type cannot meet the control requirements of multiple scenarios, this application selects corresponding control strategies by encoder type, realizing the selection of different control strategies for different encoder types corresponding to each axis, and achieving differentiated closed-loop control based on different control strategies, thereby meeting the control requirements of multiple scenarios.

[0027] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, including a device with a multi-axis motion control system. The following description uses a computer as an example to illustrate this embodiment and the subsequent embodiments.

[0028] Based on this, embodiments of this application provide a multi-axis motion control method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the multi-axis motion control method of this application.

[0029] In this embodiment, the multi-axis motion control method includes steps S10 to S30: Step S10: The motion control chip corresponding to each axis is sequentially polled and accessed through the high-speed serial bus within a preset control cycle, and the encoder data corresponding to each axis fed back by the motion control chip of each axis is obtained.

[0030] It should be noted that traditionally, to achieve multiple control scenarios, two types of encoders are installed simultaneously on the critical axis, and data comparison and dual calibration are performed through the program. However, this increases the system hardware cost, complicates wiring, and requires the development of dedicated data fusion and arbitration logic, resulting in a complex overall architecture, low integration, and difficulty in maintenance for multi-axis systems. This application aims to solve the technical problems in multi-axis motion control systems caused by the mixed use of incremental and absolute encoders, such as hardware architecture fragmentation, inconsistent control logic, complex inter-axis coordination, and insufficient reliability in handling specific motion scenarios (such as circular motion). To further illustrate the hardware connection relationships of this application, refer to... Figure 2 The hardware connection diagram shown illustrates the complete path from hardware connection to software judgment and then to the execution of differentiated closed-loop control. This application achieves unified hardware access for heterogeneous encoders through a single type of control chip (TMC4361) and a universal bus (SPI), fundamentally solving the problems of hardware fragmentation and complex wiring caused by different encoder types in multi-axis systems. By providing a unified control method based on cyclic polling and intelligent judgment, this application enables the adaptive management of multiple motion axes with different types of encoders by connecting several TMC4361 motion control chips using only one processing core (STM32H743) and one hardware bus (SPI, high-speed serial bus). This allows for flexible encoder configuration as needed to optimize costs, achieving multiple technical effects such as high system architecture integration, unified control interface, improved collaborative efficiency, and simple and reliable absolute positioning of circular motion. The hardware foundation of the entire system in this application can be: a single main controller (e.g., STM32H743) connected to multiple axis-level motion control chips (TMC4361) via a shared SPI communication bus. Each TMC4361 chip independently connects to either an incremental encoder (orthogonal encoder) or an absolute encoder (SSI protocol) based on the requirements of its corresponding axis. The core software layer is a multi-axis polling mechanism running on a microcontroller. This application uses a high-speed serial bus to sequentially poll the motion control chip corresponding to each axis within a preset control cycle, obtaining encoder data for each axis from the respective motion control chip. The encoder data can be pre-configured information, such as a pre-stored axis configuration table. This information is stored in an XML file, configured in the control card's storage chip, and saved upon power-off. The stored information may include the encoder type, motion mode, motor zero point, motor limits, and single-turn resolution for each axis.

[0031] For example, the main controller initiates a loop every 2ms within each control cycle, sequentially accessing all connected axes (TMC4361 chip) via the SPI bus. When accessing each axis, the encoder data configured for that axis is read via SPI. The encoder data can be the internal counting state of an incremental encoder or the raw position value of an absolute encoder (SSI). This application, based on a centralized scheduling method using cyclic polling, provides synchronized control cycles and consistent data update timing (2ms cycle) for all axes, laying a solid foundation for precise synchronized motion (axis interpolation operation) among multiple axes.

[0032] Step S20: Determine the encoder type for each axis based on the encoder data for each axis.

[0033] It should be noted that the encoder type used by the current axis is determined based on the encoder data corresponding to each axis, so that the preset control strategy can be dynamically invoked according to the determination result, thereby realizing the distribution of control flow.

[0034] Understandably, the encoder type is determined by comprehensively analyzing the encoder data corresponding to each axis. The encoder type includes two types: incremental encoders and absolute encoders. The encoder type is determined by the encoder data pre-configured for each axis.

[0035] In one possible implementation, this application allows for the independent selection of the most suitable encoder type for each motion axis (based on accuracy, speed, and cost requirements), eliminating the need to use high-cost absolute encoders on all axes and the need to add extra hardware modules for compatibility with different types.

[0036] Step S30: Select a target control strategy from the preset control strategies based on the encoder type corresponding to each axis, and perform closed-loop control on each axis according to the target control strategy.

[0037] It should be noted that the adaptive control diversion mechanism based on encoder type in this application is as follows: after obtaining data of each axis through polling or other means, the corresponding control strategy is dynamically called according to its encoder type, thereby realizing differentiated closed-loop control of each axis.

[0038] Understandably, the preset control strategy includes a high-speed closed-loop control strategy and an absolute value closed-loop control strategy. Based on the two encoder types, incremental encoder and absolute encoder, corresponding to each axis, a target control strategy is selected from the high-speed closed-loop control strategy and the absolute value closed-loop control strategy, and differentiated closed-loop control is performed on each axis according to the target control strategy.

[0039] This embodiment uses a high-speed serial bus to sequentially poll the motion control chip corresponding to each axis within a preset control cycle, and obtains the encoder data corresponding to each axis fed back by the motion control chip. Based on the encoder data, the encoder type for each axis is determined. A target control strategy is selected from preset control strategies based on the encoder type, and closed-loop control is performed on each axis according to the target control strategy. Compared to traditional motion control schemes with a single encoder type, which cannot meet the control requirements of multiple scenarios, this embodiment selects corresponding control strategies by encoder type. This allows for different control strategies to be selected for different encoder types for each axis, and differentiated closed-loop control is achieved based on different control strategies, thereby meeting the control requirements of multiple scenarios.

[0040] Based on the above Figure 1 The first embodiment shown illustrates a second embodiment of the emotion recognition method proposed in this application; refer to... Figure 3 , Figure 3 This is a flowchart illustrating Embodiment Two of the emotion recognition method of this application. Based on Embodiment One of this application, the content in Embodiment Two that is the same as or similar to that in Embodiment One can be referred to the above description, and will not be repeated hereafter.

[0041] In this embodiment, the preset control strategy includes a high-speed closed-loop control strategy and an absolute value closed-loop control strategy, and step S30 further includes: Step S301: If the encoder type is an incremental encoder, then select a high-speed closed-loop control strategy as the target control strategy, and perform dynamic following closed-loop control on each axis according to the high-speed closed-loop control strategy.

[0042] It should be noted that if the encoder type is an incremental encoder, then the high-speed closed-loop control strategy is selected as the target control strategy, and dynamic following closed-loop control is performed on each axis according to the high-speed closed-loop control strategy.

[0043] Understandably, if it's an incremental encoder, it enters a standard closed-loop process, dynamically following each axis according to a high-speed closed-loop control strategy. Based on the TMC4361 chip's internal hardware PID controller, target pulse position commands are sent to it via SPI, allowing the chip to autonomously complete high-speed, high-response dynamic following closed-loop control. The host computer is primarily responsible for monitoring the status.

[0044] Step S302: If the encoder type is an absolute encoder, then select the absolute closed-loop control strategy as the target control strategy, and perform static positioning closed-loop control on each axis according to the absolute closed-loop control strategy.

[0045] It should be noted that if the encoder type is an absolute encoder, then the absolute closed-loop control strategy is selected as the target control strategy, and static positioning closed-loop control is performed on each axis according to the absolute closed-loop control strategy.

[0046] In one possible implementation, step S302 further includes: if the encoder type is an absolute encoder, then selecting an absolute closed-loop control strategy as the target control strategy, determining the target motion mode according to the configuration parameters of the motion control chip, and performing static positioning closed-loop control on each axis according to the target motion mode and the absolute closed-loop control strategy.

[0047] It should be understood that if the encoder type is an absolute encoder, then the absolute closed-loop control strategy is selected as the target control strategy, the target motion mode is determined according to the configuration parameters of the motion control chip, and static positioning closed-loop control is performed on each axis according to the target motion mode and the absolute closed-loop control strategy.

[0048] For example, if it is an absolute encoder, the position information fed back by the encoder is first obtained, and the target motion mode corresponding to the axis is determined according to the pre-stored configuration parameters of the motion control chip. Static positioning closed-loop control is then performed according to the target motion mode.

[0049] In one possible implementation, the target motion mode includes a linear motion mode and a circular motion mode. The step of performing static positioning closed-loop control on each axis according to the target motion mode and the absolute value closed-loop control strategy further includes: in the linear motion mode, determining the linear actual position according to the preset motor zero-point information included in the configuration parameters and the position fed back by the encoder, and performing static positioning closed-loop control on each axis according to the linear actual position; in the circular motion mode, performing a modulo operation on the position fed back by the encoder and the encoder single-turn resolution to obtain a single-turn angle value within a preset range; and performing static positioning closed-loop control on each axis according to the single-turn angle value.

[0050] It should be noted that in linear motion mode, the actual position is determined based on the preset motor zero point information included in the configuration parameters and the position fed back by the encoder, and static positioning closed-loop control is performed on each axis based on the actual position; in circular motion mode, a modulus calculation is performed based on the position fed back by the encoder and the encoder's single-turn resolution to obtain the single-turn angle value within the preset range; static positioning closed-loop control is performed on each axis based on the single-turn angle value.

[0051] Understandably, in linear motion mode, the preset motor zero point of the axis is determined based on the preset motor zero point information included in the configuration parameters. The actual linear position in the coordinate system is then determined by subtracting the motor zero point from the encoder feedback position. Static positioning closed-loop control is then performed on each axis based on the actual linear position. For example: Actual linear position = Feedback position - Preset motor zero point.

[0052] It should be understood that in circular motion mode, the position fed back by the encoder and the encoder's single-turn resolution are used to perform a modulo operation to obtain the single-turn angle value within a preset range, such as obtaining the pulse value corresponding to the single-turn absolute angle value within the range of 0° to 360°. Static positioning closed-loop control is then performed on each axis based on the pulse value corresponding to the single-turn angle value. This application, through modulo operation, completely solves the data processing problem of absolute encoders in multi-turn positioning during circular motion, achieving fast, accurate, and reliable closed-loop control of the absolute position of the rotating shaft within a single turn, avoiding accumulated errors and homing operations.

[0053] In one possible implementation, the step of determining the linear actual position based on the preset motor zero-point information and the position feedback from the encoder in the linear motion mode, and performing static positioning closed-loop control on each axis based on the linear actual position, includes: determining the linear actual position based on the preset motor zero-point information and the position feedback from the encoder in the linear motion mode; comparing the linear actual position with the target position sent by the host computer to obtain first position deviation information; and performing static positioning closed-loop control on each axis based on the first position deviation information.

[0054] It should be noted that, when performing secondary positioning closed-loop control, this application combines the actual position obtained by the above calculations, such as the linear actual position obtained by linear motion calculation or the circular actual position obtained by circular motion calculation, such as the single-circle angle, with the target position issued by the host computer to determine the position deviation information, and then performs closed-loop control on each axis based on the position deviation information.

[0055] Understandably, in linear motion mode, the actual linear position is determined based on the preset motor zero-point information included in the configuration parameters and the position fed back by the encoder. The actual linear position is compared with the target position issued by the host computer to obtain the first position deviation information. Subsequently, the host computer, or by configuring the parameters of the TMC4361, performs a static positioning closed-loop control based on the first position deviation information to correct the result, drive the motor to eliminate the deviation, and achieve precise absolute positioning. After completing the control calculation and command issuance for the current axis, the loop pointer moves to the next axis, and step S30 is repeated. When all axes have been processed within one control cycle, the program waits or enters the next control cycle and restarts the loop polling, thereby achieving periodic synchronous updates and collaborative work of multiple axes.

[0056] In one possible implementation, the step of performing static positioning closed-loop control on each axis based on the single-turn angle value includes: determining the actual circumferential position based on the pulse value corresponding to the single-turn angle value; comparing the actual circumferential position with the target position sent by the host computer to obtain second position deviation information; and performing static positioning closed-loop control on each axis based on the second position deviation information.

[0057] It should be noted that in circular motion mode, after obtaining the pulse value corresponding to the angle value of a single circle, the actual position of the circle is determined based on the pulse value corresponding to the angle value of a single circle. For example: actual position of the circle = (feedback position % Circle + Circle) % Circle, where Circle is the resolution of a single circle.

[0058] Understandably, by comparing the actual circumferential position with the target position issued by the host computer, a second position deviation information is obtained. Subsequently, the host computer, or by configuring the parameters of the TMC4361, performs a static positioning closed-loop control based on the second position deviation information to correct the result, drive the motor to eliminate the deviation, and achieve precise absolute positioning. After completing the control calculation and command issuance for the current axis, the loop pointer moves to the next axis, and step S30 is repeated. When all axes have been processed within one control cycle, the program waits or enters the next control cycle and restarts the loop polling, thereby achieving periodic synchronous updates and collaborative work of multiple axes.

[0059] For example, to further illustrate the polling access strategy determination process in this application, refer to... Figure 4The diagram illustrating the multi-axis polling strategy determination shows that all connected axes are accessed sequentially via the SPI bus through cyclic polling. When accessing each axis, the encoder data configured for that axis is read via SPI to determine the encoder type. Based on the determination result, one of two preset control strategies is dynamically invoked to distribute the control flow. If it is an incremental encoder, a high-speed closed-loop control strategy is determined, entering a standard closed-loop process, and dynamic following closed-loop control is used for error correction. If it is an absolute encoder, an absolute closed-loop control strategy is determined, and the corresponding motion mode is identified. For linear motion, the actual position is calculated by subtracting the current encoder feedback position from the preset origin (i.e., the preset motor zero point). For circular motion, the actual position is calculated through modulus calculation, and static positioning closed-loop control is performed via software to achieve error correction. This process continues until all axes have been polled. Once all axes have been processed within a control cycle, the program waits or enters the next control cycle and restarts the cyclic polling, thus achieving periodic synchronous updates and collaborative work among multiple axes.

[0060] This embodiment uses a high-speed serial bus to sequentially poll the motion control chip corresponding to each axis within a preset control cycle, and obtains the encoder data corresponding to each axis fed back by the motion control chip. Based on the encoder data, the encoder type for each axis is determined. The preset control strategy includes a high-speed closed-loop control strategy and an absolute closed-loop control strategy. If the encoder type is an incremental encoder, the high-speed closed-loop control strategy is selected as the target control strategy, and dynamic following closed-loop control is performed on each axis according to the high-speed closed-loop control strategy. If the encoder type is an absolute encoder, the absolute closed-loop control strategy is selected as the target control strategy, and static positioning closed-loop control is performed on each axis according to the absolute closed-loop control strategy. Compared to the problem that traditional single-encoder type motion control schemes cannot meet the control requirements of multiple scenarios, this embodiment selects corresponding control strategies by encoder type, realizing different control strategies for different encoder types corresponding to each axis, and achieving differentiated closed-loop control based on different control strategies, thereby meeting the control requirements of multiple scenarios.

[0061] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the multi-axis motion control method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0062] This application also provides a multi-axis motion control device; please refer to [reference needed]. Figure 5 The multi-axis motion control device includes: The data acquisition module 10 is used to sequentially poll the motion control chip corresponding to each axis within a preset control cycle via a high-speed serial bus, and to acquire the encoder data corresponding to each axis fed back by the motion control chip corresponding to each axis. Type determination module 20 is used to determine the encoder type corresponding to each axis based on the encoder data corresponding to each axis; The strategy control module 30 is used to select a target control strategy from the preset control strategies based on the encoder type corresponding to each axis, and to perform closed-loop control on each axis according to the target control strategy.

[0063] Furthermore, the preset control strategy includes a high-speed closed-loop control strategy and an absolute value closed-loop control strategy. The strategy control module 30 is also used to select the high-speed closed-loop control strategy as the target control strategy if the encoder type is an incremental encoder, and to perform dynamic following closed-loop control on each axis according to the high-speed closed-loop control strategy; if the encoder type is an absolute encoder, to select the absolute value closed-loop control strategy as the target control strategy, and to perform static positioning closed-loop control on each axis according to the absolute value closed-loop control strategy.

[0064] Furthermore, the strategy control module 30 is also used to select an absolute closed-loop control strategy as the target control strategy if the encoder type is an absolute encoder, determine the target motion mode according to the configuration parameters of the motion control chip, and perform static positioning closed-loop control on each axis according to the target motion mode and the absolute closed-loop control strategy.

[0065] Furthermore, the target motion mode includes a linear motion mode and a circular motion mode. The strategy control module 30 is also used to determine the linear actual position based on the preset motor zero point information and the position fed back by the encoder in the linear motion mode, and to perform static positioning closed-loop control on each axis based on the linear actual position; in the circular motion mode, it performs a modulo operation on the position fed back by the encoder and the encoder single-turn resolution to obtain a single-turn angle value within a preset range; and performs static positioning closed-loop control on each axis based on the single-turn angle value.

[0066] Furthermore, the strategy control module 30 is also used to determine the actual linear position in linear motion mode based on the preset motor zero point information and the position fed back by the encoder included in the configuration parameters; compare the actual linear position with the target position sent by the host computer to obtain the first position deviation information; and perform static positioning closed-loop control on each axis based on the first position deviation information.

[0067] Furthermore, the strategy control module 30 is also used to determine the actual position of the circumference based on the pulse value corresponding to the single-circle angle value; compare the actual position of the circumference with the target position sent by the host computer to obtain second position deviation information; and perform static positioning closed-loop control on each axis based on the second position deviation information.

[0068] The multi-axis motion control device provided in this application, employing the multi-axis motion control method described in the above embodiments, can solve the technical problem that traditional single-encoder type motion control schemes cannot meet the control requirements of multiple scenarios. Compared with the prior art, the beneficial effects of the multi-axis motion control device provided in this application are the same as those of the multi-axis motion control method described in the above embodiments, and other technical features in the multi-axis motion control device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0069] This application provides a multi-axis motion control device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the multi-axis motion control method in the above embodiment 1.

[0070] The following is for reference. Figure 6 The diagram illustrates a structural schematic of a multi-axis motion control device suitable for implementing embodiments of this application. The multi-axis motion control device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The multi-axis motion control device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0071] like Figure 6As shown, the multi-axis motion control device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the multi-axis motion control device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the multi-axis motion control device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show multi-axis motion control devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0072] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0073] The multi-axis motion control device provided in this application, employing the multi-axis motion control method described in the above embodiments, can solve the technical problem that traditional single-encoder type motion control schemes cannot meet the control needs of multiple scenarios. Compared with the prior art, the beneficial effects of the multi-axis motion control device provided in this application are the same as those of the multi-axis motion control method provided in the above embodiments, and other technical features of this multi-axis motion control device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0074] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0075] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0076] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the multi-axis motion control method described in the above embodiments.

[0077] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0078] The aforementioned computer-readable storage medium may be included in the multi-axis motion control device; or it may exist independently and not assembled into the multi-axis motion control device.

[0079] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the multi-axis motion control device, the multi-axis motion control device: sequentially polls and accesses the motion control chip corresponding to each axis within a preset control cycle via a high-speed serial bus, and obtains the encoder data corresponding to each axis fed back by the motion control chip corresponding to each axis; determines the encoder type corresponding to each axis based on the encoder data corresponding to each axis; selects a target control strategy from the preset control strategies based on the encoder type corresponding to each axis, and performs closed-loop control on each axis according to the target control strategy.

[0080] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0081] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0082] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0083] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described multi-axis motion control method. This solves the technical problem that traditional single-encoder type motion control schemes cannot meet the control requirements of multiple scenarios. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the multi-axis motion control method provided in the above embodiments, and will not be elaborated upon here.

[0084] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the multi-axis motion control method described above.

[0085] The computer program product provided in this application can solve the technical problem that traditional single-encoder type motion control schemes cannot meet the control needs of multiple scenarios. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the multi-axis motion control method provided in the above embodiments, and will not be repeated here.

[0086] The above description is only a part of the embodiments of this application and does not limit the scope of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included within the protection scope of this application.

Claims

1. A multi-axis motion control method, characterized in that, The multi-axis motion control method includes: The motion control chip corresponding to each axis is accessed sequentially via a high-speed serial bus within a preset control cycle, and the encoder data corresponding to each axis is obtained from the motion control chip of each axis. Determine the encoder type for each axis based on the encoder data for each axis; Based on the encoder type corresponding to each axis, a target control strategy is selected from the preset control strategies, and closed-loop control is performed on each axis according to the target control strategy. The preset control strategy includes a high-speed closed-loop control strategy and an absolute value closed-loop control strategy. The step of selecting a target control strategy from the preset control strategies based on the encoder type corresponding to each axis, and performing closed-loop control on each axis according to the target control strategy, includes: If the encoder type is an incremental encoder, then a high-speed closed-loop control strategy is selected as the target control strategy, and dynamic following closed-loop control is performed on each axis according to the high-speed closed-loop control strategy. If the encoder type is an absolute encoder, then the absolute closed-loop control strategy is selected as the target control strategy, and the target motion mode is determined according to the configuration parameters of the motion control chip. Static positioning closed-loop control is performed on each axis according to the target motion pattern and the absolute value closed-loop control strategy.

2. The multi-axis motion control method as described in claim 1, characterized in that, The target motion mode includes linear motion mode and circular motion mode. The step of performing static positioning closed-loop control on each axis according to the target motion mode and the absolute value closed-loop control strategy further includes: In linear motion mode, the actual linear position is determined based on the preset motor zero point information and the position fed back by the encoder contained in the configuration parameters, and static positioning closed-loop control is performed on each axis based on the actual linear position. In circular motion mode, the position fed back by the encoder and the single-turn resolution of the encoder are used to perform a modulo operation to obtain the single-turn angle value within a preset range; Static positioning closed-loop control is performed on each axis based on the single-turn angle value.

3. The multi-axis motion control method as described in claim 2, characterized in that, In linear motion mode, the step of determining the actual linear position based on the preset motor zero-point information and encoder feedback position included in the configuration parameters, and performing static positioning closed-loop control on each axis based on the actual linear position, includes: In linear motion mode, the actual linear position is determined based on the preset motor zero-point information included in the configuration parameters and the position fed back by the encoder. The linear actual position is compared with the target position sent by the host computer to obtain the first position deviation information; Static positioning closed-loop control is performed on each axis based on the first position deviation information.

4. The multi-axis motion control method as described in claim 3, characterized in that, The step of performing static positioning closed-loop control on each axis based on the single-turn angle value includes: The actual position of the circumference is determined based on the pulse value corresponding to the single-circle angle value. The actual position of the circumference is compared with the target position sent by the host computer to obtain the second position deviation information; Static positioning closed-loop control is performed on each axis based on the second position deviation information.

5. A multi-axis motion control device, characterized in that, The multi-axis motion control device includes: The data acquisition module is used to sequentially poll the motion control chip corresponding to each axis within a preset control cycle via a high-speed serial bus, and to acquire the encoder data corresponding to each axis fed back by the motion control chip corresponding to each axis. The type determination module is used to determine the encoder type for each axis based on the encoder data for each axis. The strategy control module is used to select a target control strategy from the preset control strategies based on the encoder type corresponding to each axis, and to perform closed-loop control on each axis according to the target control strategy. The preset control strategy includes a high-speed closed-loop control strategy and an absolute value closed-loop control strategy. The step of selecting a target control strategy from the preset control strategies based on the encoder type corresponding to each axis, and performing closed-loop control on each axis according to the target control strategy, includes: If the encoder type is an incremental encoder, then a high-speed closed-loop control strategy is selected as the target control strategy, and dynamic following closed-loop control is performed on each axis according to the high-speed closed-loop control strategy. If the encoder type is an absolute encoder, then the absolute closed-loop control strategy is selected as the target control strategy, and the target motion mode is determined according to the configuration parameters of the motion control chip. Static positioning closed-loop control is performed on each axis according to the target motion pattern and the absolute value closed-loop control strategy.

6. A multi-axis motion control device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the multi-axis motion control method as described in any one of claims 1 to 4.

7. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the multi-axis motion control method as described in any one of claims 1 to 4.

8. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the multi-axis motion control method as described in any one of claims 1 to 4.