A multi-axis control method, system, device and medium for an electronic cam.
By assigning an independent programming table to each motion axis and combining it with a cam control algorithm, the phase difference and synchronization error are dynamically corrected, solving the synchronization error and resource conflict problems in multi-axis control of existing electronic cam systems, and realizing efficient and accurate multi-axis motion control.
Patent Information
- Application Number
- CN202511034549.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-07-25
Smart Images

Figure CN120686730B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic cam technology, and in particular to a multi-axis control method, system, device and medium for electronic cams. Background Technology
[0002] In CNC systems, multi-axis control is a core technology for realizing complex machining and automated production lines. Electronic cam systems, as an advanced control method, process the spindle trajectory data through a multi-tasking mechanism and dynamically adjust the pulse signals of the slave axes to achieve coordinated motion of multiple axes, significantly improving machining flexibility and real-time performance. However, despite the numerous advantages that electronic cam systems have demonstrated in multi-axis control, some technical problems still need to be addressed in their practical applications.
[0003] Traditional CNC systems often use line-by-line parsing and execution of G-code to handle multi-axis commands. This approach results in significant code redundancy, low parsing efficiency, and insufficient real-time performance, making it difficult to meet the demands of high-precision and high-speed machining. Especially in scenarios involving multi-axis coordinated motion, the movements of each axis must be strictly synchronized to ensure the accuracy and quality of the machined parts. Furthermore, traditional methods often require a global rewrite of the G-code when dynamic adjustments to motion parameters or trajectories are needed, which is cumbersome and significantly reduces system flexibility.
[0004] While electronic cam systems have improved this problem to some extent through multitasking mechanisms, they still face challenges in practical applications. On the one hand, the generation and management of buffer tables are complex, consuming significant system resources and affecting the overall operating efficiency of the system. On the other hand, when dynamically adjusting the slave axis pulse signal, synchronization errors or phase differences may lead to unstable motion, thereby affecting machining accuracy and surface quality.
[0005] Furthermore, existing electronic cam systems typically handle multi-axis motion commands by sharing data tables and communication bandwidth. While this approach is adequate for smaller workloads, it becomes prone to task conflicts when multiple axes simultaneously execute complex tasks, leading to data delays or communication jitter. This delay or jitter is particularly unacceptable in high-speed, high-precision machining processes, severely impacting machining efficiency and product quality. Summary of the Invention
[0006] The purpose of this invention is to provide a multi-axis control method, system, device, and medium for electronic cams. By assigning an independent programming table to each motion axis and generating cam curves in conjunction with a cam control algorithm, flexible control and precise synchronization of multi-axis motion are achieved, thereby improving processing efficiency and accuracy, and solving at least one of the aforementioned problems in the prior art.
[0007] In a first aspect, the present invention provides a multi-axis control method for an electronic cam, the method specifically comprising:
[0008] Each motion axis is assigned an independent programming table based on a preset motion task. The programming table includes a sequence of motion instructions and time parameters corresponding to each motion axis.
[0009] By parsing the sequence of motion instructions in the programming table of each motion axis and combining it with a preset cam control algorithm, a cam curve corresponding to each motion axis is generated. The cam curve includes position parameters, velocity parameters and acceleration parameters.
[0010] Based on the real-time feedback of shaft motion status data, the cam curve is processed into a dimensionless form through the electronic clutch module to dynamically correct the phase difference and synchronization error between each shaft and obtain the corrected cam curve.
[0011] Based on the modified cam curve, each motion axis is driven to independently execute the action instruction sequence in its programming table, and the pulse signals of each axis are synchronized in real time through the electronic cam module to achieve multi-axis coordinated motion.
[0012] Secondly, the present invention provides a multi-axis control system for an electronic cam, the system specifically comprising:
[0013] The first multi-axis control module is used to assign an independent programming table to each motion axis based on a preset motion task. The programming table includes a sequence of motion instructions and time parameters corresponding to each motion axis.
[0014] The second multi-axis control module is used to generate a cam curve corresponding to each motion axis by parsing the sequence of motion instructions in the programming table of each motion axis and combining it with a preset cam control algorithm. The cam curve includes position parameters, velocity parameters and acceleration parameters.
[0015] The third multi-axis control module is used to perform dimensionless processing on the cam curve through the electronic clutch module based on the real-time feedback of axis motion status data, dynamically correct the phase difference and synchronization error between each axis, and obtain the corrected cam curve.
[0016] The fourth multi-axis control module is used to drive each motion axis to independently execute the action instruction sequence in its programming table based on the modified cam curve, and to synchronize the pulse signals of each axis in real time through the electronic cam module to realize multi-axis coordinated motion.
[0017] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, and a computer program stored in the memory, wherein when the computer program is executed on the processor, it implements the multi-axis control method of an electronic cam as described in any of the above methods.
[0018] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multi-axis control method for an electronic cam as described in any of the above methods.
[0019] Compared with the prior art, the present invention has at least one of the following technical effects:
[0020] 1. This invention achieves flexible control and precise synchronization of multi-axis motion by assigning an independent programming table to each motion axis and generating cam curves in conjunction with a cam control algorithm, thereby improving processing efficiency and accuracy.
[0021] 2. This invention avoids the tedious operation of globally rewriting G-code by assigning an independent programming table to each motion axis, thereby improving the system's flexibility and real-time performance.
[0022] 3. The programming table of this invention has a multi-layer structure, which effectively manages motion instructions, time parameters and conflict detection, ensuring the accurate decomposition and execution of motion tasks, while avoiding resource conflicts between motion axes.
[0023] 4. The formula for calculating the relative duration of the present invention takes into account kinematic constraints, making the time allocation of the action command more reasonable and ensuring the smoothness and continuity of the motion.
[0024] 5. This invention generates the cam curve from the shaft through nonlinear mapping and discretizes it into a pulse sequence and stores it in a buffer table, thereby realizing the dynamic generation and real-time updating of the cam curve and enhancing the adaptability of the system.
[0025] 6. By combining an electronic clutch module and dimensionless processing technology, this invention can correct the phase difference and synchronization error between axes in real time, thereby improving the coordination and stability of multi-axis motion.
[0026] 7. By introducing dimensionless parameters, this invention makes the correction of the cam curve more accurate and efficient, and enhances the system's response to external disturbances and command changes.
[0027] 8. This invention achieves high-precision collaborative control of multi-axis motion by synchronizing pulse signals of each axis in real time and adjusting the pulse frequency according to the actual position error, thereby improving the quality and consistency of the machined parts. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a flowchart illustrating a multi-axis control method for an electronic cam provided in an embodiment of the present invention;
[0030] Figure 2 This is a schematic diagram of the structure of a multi-axis control system for an electronic cam provided in an embodiment of the present invention;
[0031] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0032] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0033] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0034] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0035] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0036] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0037] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0038] In the embodiments of this application, Figure 1 A flowchart illustrating the multi-axis control method for an electronic cam disclosed in the first embodiment of the present invention is shown, and is described in detail below:
[0039] S101, based on a preset motion task, an independent programming table is assigned to each motion axis. The programming table includes a sequence of motion instructions and time parameters corresponding to each motion axis.
[0040] In this embodiment, by assigning an independent programming table to each motion axis, the movement and timing of each axis can be precisely controlled, avoiding unnecessary waiting and conflicts, thereby improving the efficiency of the entire production line. The timing parameters in the programming table enable the movements of each axis to be closely coordinated, reducing idle time and increasing effective processing time.
[0041] Independent programming tables allow for fine-grained control of the movement of each axis, including speed, acceleration, and position, thereby improving machining accuracy. Coordinated operation between axes is achieved through interpolation and conditional statements in the programming tables, ensuring precise positioning of the workpiece during movement and rotation.
[0042] Each axis has an independent programming table, facilitating the debugging and maintenance of individual axes without affecting the normal operation of other axes. When adding a new motion axis or modifying the motion of an existing axis, only the corresponding programming table needs to be modified, without requiring a large-scale adjustment to the entire control system. The programming tables allow for flexible definition of the motion and timing parameters of each axis to adapt to different production tasks and processing requirements. The independent programming table structure makes the system more modular, facilitating troubleshooting and repair, and improving system reliability.
[0043] S102, by parsing the sequence of motion instructions in the programming table of each motion axis and combining it with a preset cam control algorithm, a cam curve corresponding to each motion axis is generated. The cam curve includes position parameters, velocity parameters and acceleration parameters.
[0044] In this embodiment, by generating cam curves, the position, speed and acceleration of each axis can be precisely controlled throughout the entire motion process, which helps to ensure that the mechanical system moves according to the preset motion law and improves the accuracy and stability of the motion.
[0045] Cam profiles can optimize the motion trajectory of mechanical systems, reducing unnecessary waiting and idling time, thus improving production efficiency and lowering production costs. By modifying the sequence of motion instructions in the programming table, the motion characteristics of the mechanical system can be easily adjusted. This makes the system more flexible and adaptable to different production needs and processing tasks.
[0046] Cam profiles can serve as a reference for the motion state of mechanical systems. During fault diagnosis and repair, comparing the actual motion profile with a preset cam profile can quickly pinpoint the problem. This helps shorten repair time and reduce repair costs.
[0047] S103, based on the real-time feedback of shaft motion status data, the cam curve is processed into a dimensionless form through the electronic clutch module, and the phase difference and synchronization error between each shaft are dynamically corrected to obtain the corrected cam curve.
[0048] In this embodiment, an encoder or sensor is installed on each axis to monitor the axis's position, velocity, and acceleration in real time. The data acquired by the sensors is transmitted to a computer or control system in real time via a data acquisition card or controller. The electronic clutch module receives the real-time feedback data on the axis's motion status and processes and corrects the data according to a preset algorithm. The position, velocity, and acceleration parameters in the cam curve are dimensionless for better comparison and correction. For example, the position parameters can be normalized to the range of 0 to 1, and the velocity and acceleration parameters can also be dimensionless accordingly.
[0049] By comparing the actual motion phase between each axis with the preset phase, the phase difference is calculated. The electronic clutch module then adjusts the phase of the cam profile to gradually reduce this phase difference. Similarly, by comparing the actual motion speed between each axis with the preset speed, the synchronization error is calculated. The electronic clutch module then adjusts the speed of the cam profile to further reduce this synchronization error. After dimensionless processing and dynamic correction, a new cam profile is generated that better reflects the actual motion state, ensuring coordinated motion and synchronization between the axes.
[0050] In this embodiment, real-time feedback and dynamic correction significantly reduce phase differences and synchronization errors between axes, improving the motion accuracy of the entire motion control system. The corrected cam curve better matches the actual motion state, reducing impact and vibration of the mechanical system and enhancing system stability. Because the corrected cam curve ensures coordinated motion and synchronization between axes, waiting and idling times during production are reduced, improving production efficiency. The use of an electronic clutch module and dimensionless processing technology makes the system more modular, facilitating maintenance and upgrades. When adding new axes or modifying the motion patterns of existing axes, only the corresponding programming table and correction algorithm need to be adjusted.
[0051] S104, based on the modified cam curve, drive each motion axis to independently execute the action instruction sequence in its programming table, and synchronize the pulse signals of each axis in real time through the electronic cam module to realize multi-axis coordinated motion.
[0052] In this embodiment, the corrected cam curve is loaded into the memory of the control system for each axis to reference when executing motion commands. Each axis independently reads the position, velocity, and acceleration information from the corrected cam curve according to the motion commands in its programming table and executes the corresponding motion. The electronic cam module monitors the pulse signals of each axis in real time, compares the differences between them, and synchronizes these signals by adjusting the motion parameters of each axis. During execution, the sensors of each axis provide real-time feedback of its motion status data, which is used to further correct the cam curve and adjust the motion of each axis to ensure the accuracy and stability of the coordinated motion.
[0053] In this embodiment, through the real-time synchronization function of the electronic cam module, each axis can move according to a preset cooperative motion law, achieving precise multi-axis cooperative motion. The use of corrected cam curves and the real-time synchronization function of the electronic cam module can significantly improve the motion accuracy and stability of each axis, reducing errors and jitter during motion. Since each axis independently executes the action instructions in its programming table and can be synchronized in real time through the electronic cam module, the system is more flexible and can adapt to different machining tasks and cooperative motion requirements. The use of the electronic cam module simplifies the design and maintenance process of the multi-axis cooperative motion system. Through modular design, axes can be easily added or deleted, and the motion laws of each axis can be modified.
[0054] In some embodiments, step S101 above, which involves assigning an independent programming table to each motion axis based on a preset motion task, specifically includes:
[0055] The programming table is configured with an action instruction layer, a time parameter layer, and a conflict detection layer. The action instruction layer is used to store a sequence of action instructions including target position, motion mode, and synchronization trigger flag. The motion mode includes linear interpolation motion, circular interpolation motion, and point-to-point motion. The time parameter layer is used to assign time reference parameters to each action instruction. The time reference parameters include absolute start time and relative duration. The conflict detection layer is used to record the resource occupancy flags of each motion axis during the motion process.
[0056] Obtain a preset motion task, decompose the preset motion task into multiple sub-actions, and decompose each sub-action into axis-level motion instructions;
[0057] If any sub-action involves multi-axis coordinated motion, then the synchronization trigger flag corresponding to the sub-action is inserted into the programming table of the corresponding motion axis;
[0058] Calculate the time allocation of each motion command based on kinematic constraints, and determine the relative duration of each motion command;
[0059] At the conflict detection layer, a unique identifier is allocated to the shared resources. Based on the unique identifier, it is determined whether there is a conflict between the action commands corresponding to any two motion axes. If a conflict occurs, the triggering time of the action command of one of the motion axes is delayed.
[0060] In this embodiment, a multi-axis CNC machine tool system is assumed to have three motion axes (axis X, axis Y, and axis Z) that need to execute a complex preset motion task. This task involves multiple sub-actions, including single-axis independent motion and multi-axis cooperative motion. To complete this task efficiently and accurately, an independent programming table is assigned to each motion axis, and a motion instruction layer, a time parameter layer, and a conflict detection layer are set up. Specifically, the axis X programming table stores motion instruction sequences such as "move to position 100, linear interpolation motion, synchronization trigger flag A". The axis Y programming table stores motion instruction sequences such as "move to position 200, circular interpolation motion, synchronization trigger flag B". The axis Z programming table stores motion instruction sequences such as "move to position 300, point-to-point motion".
[0061] Assign an absolute start time and a relative duration to each motion command. For example, the "move to position 100" command for axis X may start at time t=0 and last for 2 seconds. Record the resource occupancy flags of each motion axis during the motion process. For example, when axis X executes "move to position 100", its corresponding resource occupancy flag is set to 1.
[0062] Obtain a preset motion task, such as "process a rectangular contour with side lengths of 100mm and 200mm respectively". Decompose this task into multiple sub-actions, such as "move axis X to position 100, axis Y to position 0", "axis X maintains position 100, axis Y moves to position 200", "axis X moves to position 0, axis Y maintains position 200", and "axis X moves to position -100, axis Y moves to position 0". Further decompose each sub-action into axis-level motion instructions, such as "linearly interpolate axis X to position 100", and "linearly interpolate axis Y to position 0". If any sub-action involves multi-axis coordinated motion, such as "axis X and axis Y move simultaneously to a specified position", then insert the corresponding synchronization trigger identifier (such as A, B) into the programming table of the corresponding motion axis.
[0063] The time allocation for each motion command is calculated based on kinematic constraints (such as velocity and acceleration limits), determining the relative duration of each motion command. At the conflict detection layer, a unique identifier (such as a resource lock) is assigned to shared resources. This unique identifier is used to determine whether a conflict exists between the motion commands corresponding to any two motion axes. If a conflict occurs (e.g., two axes simultaneously need to occupy the same resource), the triggering time of the motion command for one of the motion axes is delayed to ensure smooth cooperative motion.
[0064] In this embodiment, by assigning an independent programming table to each motion axis and setting up motion command layers, timing parameter layers, and conflict detection layers, programming efficiency can be significantly improved. Programmers can more intuitively define motion commands and timing parameters for each axis, while easily handling conflict issues in multi-axis cooperative motion.
[0065] Because the programming table structure is clear and easy to modify, the system is more flexible, reducing programming and debugging time and improving production efficiency. When it is necessary to change the motion task or adjust the motion parameters, only the corresponding programming table needs to be modified, without redesigning or reprogramming the entire system. Furthermore, by optimizing time allocation and conflict detection mechanisms, waiting time and idle time can be further reduced, improving overall production efficiency.
[0066] By inserting synchronization trigger markers and performing conflict detection, the accuracy and stability of multi-axis coordinated motion can be ensured. Each axis can move according to a preset coordinated motion law, reducing machining errors caused by synchronization errors.
[0067] Furthermore, the relative duration satisfies
[0068]
[0069] in, Indicates relative duration. This indicates the target position of the motion axis in the k-th motion command. This indicates the current position of the motion axis in the k-th motion command. Indicates the maximum permissible speed of the motion axis. This indicates the maximum permissible acceleration of the motion axis.
[0070] In this embodiment, the target position is the position that the motion axis needs to reach when executing the k-th motion command. It determines the distance the motion axis needs to move, thus affecting the relative duration.
[0071] The current position is the starting position of the motion axis when executing the k-th motion command. Together with the target position, it determines the total distance the motion axis needs to move.
[0072] The maximum permissible speed is the maximum speed that a motion axis is allowed to reach during movement. It limits the speed at which the motion axis moves, thus affecting the relative duration. Under the speed limit, the motion axis requires a longer time to complete a larger movement distance.
[0073] Maximum permissible acceleration is the maximum acceleration that a moving shaft is allowed to reach during motion. It affects the process of the moving shaft accelerating from rest to its maximum speed, and decelerating back to rest when necessary. A larger acceleration can shorten the time of the acceleration and deceleration phases, but may also lead to greater mechanical stress and vibration.
[0074] In this embodiment, by taking into account the target position, current position, maximum permissible speed and acceleration, the time required for the motion axis to execute each motion command can be accurately calculated, which helps to achieve more precise motion control, especially in scenarios that require multi-axis coordinated motion.
[0075] By adjusting the maximum permissible speed and acceleration, a balance can be found between motion time and mechanical stress. Higher speeds and accelerations can shorten motion time and improve production efficiency, but may also increase mechanical wear and vibration. By setting these parameters appropriately, motion performance can be optimized and equipment lifespan extended.
[0076] Because the relative duration is calculated based on actual motion conditions and constraints, the system is more flexible. When motion conditions (such as load, coefficient of friction, etc.) change, these changes can be adapted by adjusting the maximum permissible speed and acceleration without redesigning or reprogramming the entire system.
[0077] By limiting the maximum permissible speed and acceleration, it can be ensured that the motion axis does not exceed its physical limits during movement, thereby avoiding mechanical damage or safety accidents.
[0078] In some embodiments, step S102 above, which involves parsing the motion instruction sequence in the programming table of each motion axis and combining it with a preset cam control algorithm to generate a cam curve corresponding to each motion axis, specifically includes:
[0079] Extract the motion parameters of each motion command from the programming table of any motion axis and construct a discrete trajectory point sequence;
[0080] The principal axis is determined from multiple motion axes. Using the principal axis as the time reference, the discrete trajectory point sequence corresponding to the principal axis is fitted into a continuous function to obtain the principal axis reference curve.
[0081] Based on the main spindle reference curve and the discrete trajectory point sequence corresponding to other motion axes, the slave axis cam curve is generated through nonlinear mapping.
[0082] Each slave cam curve is discretized into a pulse sequence and stored in a buffer table;
[0083] When an external disturbance or instruction change is detected, the buffer table is updated by determining the position deviation to be compensated, the correction rate, and the correction trigger timestamp.
[0084] In this embodiment, it is assumed that there is a multi-axis CNC machine tool system containing three motion axes (axis X, axis Y, and axis Z) that needs to perform a complex machining task. In order to precisely control the movement of each axis, the motion instruction sequence in the programming table of each motion axis is analyzed, and combined with a preset cam control algorithm, a cam curve corresponding to each motion axis is generated and dynamically adjusted.
[0085] First, extract the motion parameters for each action command in the programming table for axis X, such as target position, motion mode (linear interpolation, circular interpolation, point-to-point motion, etc.), and time reference parameters (absolute start time, relative duration). Based on these parameters, calculate the position of axis X at each time point and construct its discrete trajectory point sequence. Repeat the above steps for axes Y and Z to obtain their respective discrete trajectory point sequences.
[0086] Then, a master axis is selected from axes X, Y, and Z; let's assume axis X is chosen. Using the time reference of the master axis (axis X), its corresponding discrete trajectory point sequence is fitted as a continuous function, such as using polynomial fitting or spline curve fitting, to obtain the master axis reference curve. Based on the master axis reference curve and the discrete trajectory point sequences corresponding to axes Y and Z, cam curves for slave axes (axes Y and Z) are generated through nonlinear mapping (such as time-based proportional mapping, position-based function mapping, etc.). This nonlinear mapping ensures that the motion of the slave axes is coordinated with the motion of the master axis, meeting the requirements of the machining task. The cam curve of each slave axis (axis Y and Z) is discretized into a series of pulse sequences. Each pulse sequence represents the position or speed command of the slave axis at a specific time point. These pulse sequences are stored in a buffer table for subsequent reading and execution by the motion control module.
[0087] Finally, when external disturbances (such as load changes, mechanical vibrations, etc.) or command changes (such as modifications to machining tasks) are detected, the position deviation that needs to be compensated is determined through sensors or feedback mechanisms. Based on the position deviation, the correction rate (i.e., the speed at which the motion speed is adjusted to correct the deviation as quickly as possible) and the correction trigger timestamp (i.e., the time point at which the correction action begins) are calculated. The buffer table is updated, and the corrected pulse sequence is inserted into the corresponding time point to ensure that the slave axis can move according to the new command.
[0088] In this embodiment, by parsing the action command sequence in the programming table and combining it with a cam control algorithm, the cam curves of each axis can be accurately generated, achieving high-precision motion control. When external disturbances or command changes are detected, correction parameters can be calculated and the buffer table updated in real time, enabling dynamic adjustment of motion and improving the robustness and adaptability of the system. By generating the cam curves of the slave axes with the spindle as the time reference, coordinated motion between multiple axes can be ensured, meeting the requirements of complex machining tasks.
[0089] In some embodiments, in step S103 above, the step of performing dimensionless processing on the cam curve through the electronic clutch module based on the real-time feedback shaft motion state data, dynamically correcting the phase difference and synchronization error between each shaft, and obtaining the corrected cam curve specifically includes:
[0090] Real-time acquisition of the actual position, velocity, and deviation between the actual and theoretical positions of each motion axis;
[0091] If the deviation of any motion axis is greater than the preset deviation threshold, the synchronization link between the motion axis and the main axis is cut off by the electronic clutch module, and the dimensionless parameters based on the position of the main axis are determined by dimensionless mapping.
[0092] Based on the dimensionless parameters, the follower cam curve of the motion axis is reconstructed to obtain the corrected cam curve.
[0093] In this embodiment, a multi-axis mechanical system for precision machining is assumed, comprising a master axis (e.g., axis X) and multiple slave axes (e.g., axes Y and Z). To ensure precise synchronization and coordinated movement between the axes, a cam curve correction method based on real-time feedback and an electronic clutch module is employed.
[0094] First, sensors are used to collect real-time position and velocity data for each motion axis (X, Y, and Z axes). The deviation between the actual position and the theoretical position (i.e., the expected position on the cam curve) of each motion axis is calculated.
[0095] Then, a preset deviation threshold is set to determine whether the motion axis deviates too far from its theoretical position. The deviation position of each motion axis is monitored in real time. If the deviation position of any motion axis exceeds the preset deviation threshold, the synchronization link between that motion axis and the main spindle (axis X) is disconnected via the electronic clutch module. Disconnecting the synchronization link is to prevent motion axes with excessive deviation from affecting the normal movement of other axes, ensuring the stability and safety of the system.
[0096] When the synchronization link of a certain motion axis (such as axis Y) is broken, the dimensionless parameters of that motion axis are determined through dimensionless mapping, using the position of the master axis (axis X) as a reference. Dimensionless mapping is a method that converts actual physical quantities (such as position and velocity) into relative or proportional quantities, facilitating comparison and adjustment between different motion axes. Based on the dimensionless parameters, the slave cam curve of that motion axis (axis Y) is reconstructed to obtain the corrected cam curve. The corrected cam curve takes into account the current motion state and deviation, aiming to bring the motion axis back to synchronization with the master axis as quickly as possible.
[0097] In practical applications, electronic clutch modules can be implemented through software or hardware, enabling rapid response to deviation judgment results and the disconnection or restoration of the synchronization link. Dimensionless mapping can be designed according to specific motion tasks and system requirements, such as using linear mapping, logarithmic mapping, or custom nonlinear mapping. The reconstruction of the corrected cam curve can be dynamically adjusted based on real-time feedback data, ensuring synchronized and coordinated movement between axes.
[0098] In this embodiment, real-time feedback and dynamic correction significantly improve the synchronization accuracy between axes and reduce synchronization errors. When a deviation occurs on a certain motion axis, cutting off the synchronization link and reconstructing the cam curve can prevent the deviation from spreading to other axes, thus enhancing system stability. Dimensionless processing makes the system more adaptable to different motion tasks and system changes, improving its flexibility and adaptability.
[0099] Furthermore, the dimensionless parameter satisfies
[0100]
[0101]
[0102] in, This represents the dimensionless proportional parameter used to characterize the process of spindle motion. Indicates the current time spindle position Indicates the start time of the correction. spindle position Indicates the current motion segment The endpoint of the main axis position, Indicates the initial position of the spindle. Indicates the time axis The instantaneous angular velocity.
[0103] In this embodiment, the dimensionless scaling parameter is a relative quantity used to represent the progress ratio of the spindle in the current motion segment. It quantifies the progress of the spindle's motion by comparing the current spindle position with the corrected start and end positions.
[0104] The current position of the principal axis is its actual position at that moment. It reflects the real-time state of the principal axis motion and is the basis for calculating the dimensionless proportional parameter.
[0105] The spindle position at the start of the correction is the position of the spindle when the correction begins. It defines the starting point of the correction process and is used to calculate the distance the spindle moves from the correction starting point to the current position.
[0106] The final position of the principal axis in the current motion segment is the target position of the principal axis in the current motion segment. Together with the corrected starting position, it determines the total distance the principal axis needs to move.
[0107] The initial position of the spindle is its position at the start of the motion. It may be used to calculate the total displacement of the spindle throughout the entire motion or for other initialization calculations.
[0108] spindle in time The instantaneous angular velocity reflects the velocity characteristics of the spindle motion and is used to more precisely control or adjust the calculation of dimensionless proportional parameters.
[0109] In this embodiment, the dimensionless parameter provides a unified metric for comparing and evaluating the progress of the spindle in different motion segments. This makes it easier for the system to process and analyze data from different motion segments, improving the system's versatility and flexibility.
[0110] By calculating dimensionless proportional parameters in real time, the system can more accurately control the motion process of the spindle, which is especially important for multi-axis systems that require precise synchronization and coordinated motion.
[0111] The calculation of dimensionless parameters relies on real-time data, so the system can be dynamically adjusted according to the actual motion state of the spindle. This enables the system to adapt to external disturbances or command changes and maintain the stability and accuracy of motion.
[0112] Using dimensionless parameters simplifies complex motion control algorithms. By converting physical quantities into relative quantities, the system can more easily implement complex motion control and coordination strategies.
[0113] The use of dimensionless parameters makes the system more robust to initial conditions and velocity changes in the spindle motion. Even if the motion characteristics of the spindle change, the system can still maintain the stability and accuracy of the motion by adjusting the dimensionless parameters.
[0114] In some embodiments, step S104 above, which involves driving each motion axis to independently execute the action instruction sequence in its programming table based on the corrected cam curve, and synchronizing the pulse signals of each axis in real time through the electronic cam module to achieve multi-axis coordinated motion, specifically includes:
[0115] By performing first-order and second-order derivatives on the modified cam curve, the angular velocity timing parameters and acceleration timing parameters of the corresponding motion axis are obtained.
[0116] The pulse frequency of the corresponding motion axis is calculated based on the angular velocity timing parameters and the acceleration timing parameters.
[0117] Based on the pulse sequence of the main spindle, a synchronization signal is broadcast to other motion axes through the electronic cam module to adjust the pulse output time of other motion axes;
[0118] During pulse execution, the actual position of each motion axis is monitored in real time. The pulse frequency of each motion axis is adjusted according to the error between the actual position and the theoretical position. Multi-axis motion coordination is achieved based on the adjusted pulse frequency.
[0119] In this embodiment, the first derivative of the modified cam curve (for each motion axis) is taken to obtain the angular velocity timing parameters of each axis. These parameters describe the rotational speed of each axis at different time points. The second derivative of the modified cam curve is taken to obtain the acceleration timing parameters of each axis. These parameters describe the acceleration changes of each axis at different time points.
[0120] Based on the angular velocity and acceleration timing parameters, the pulse frequency of each axis is calculated. The pulse frequency determines the number of pulses emitted by each axis per unit time, thereby controlling the motion speed of each axis. Specifically, the pulse frequency satisfies... ,in, Let represent the pulse frequency of the x-th motion axis at time t. This represents the angular velocity of the x-th axis of motion at time t. Let x represent the acceleration of the x-th axis of motion at time t. The shaft offset corresponding to a single pulse is determined by the mechanical transmission ratio and encoder resolution. This represents the acceleration compensation coefficient.
[0121] Using the pulse sequence of the main spindle (axis X) as a reference, a synchronization signal is broadcast to the other motion axes (axis Y and axis Z) via an electronic cam module. The pulse output timing of the other motion axes is adjusted to ensure they remain synchronized with the main spindle's pulse sequence. The broadcasting of the synchronization signal and the adjustment of the pulse output timing can be based on timestamps or event-triggered mechanisms. During pulse execution, the actual position of each motion axis is monitored in real time. Based on the error between the actual and theoretical positions of each motion axis, their respective pulse frequencies are adjusted. The adjusted pulse frequencies meet the following requirements: ,in, This indicates the adjusted pulse frequency. Indicates proportional gain. This represents the cumulative error between the actual position and the theoretical position of the motion axis.
[0122] In this embodiment, the coordination accuracy between axes can be significantly improved by calculating the pulse frequency based on the corrected cam curve and broadcasting the synchronization signal. Real-time monitoring and adjustment of the pulse frequency further reduces motion deviations caused by external disturbances or system errors. This method can adapt to different machining tasks and motion trajectories, requiring only updates to the corrected cam curve. The flexibility of the electronic cam module allows the system to be easily expanded or modified with synchronization strategies. Precise coordinated motion reduces waiting time and error handling time during machining, improving production efficiency. The real-time monitoring and adjustment mechanism ensures the continuity and stability of motion, reducing production interruptions caused by malfunctions or downtime. Through precise motion control and coordination mechanisms, wear and failure rates of the mechanical system are reduced. The modularity and scalability of the system make maintenance and upgrades easier and more economical.
[0123] Reference Figure 2 An embodiment of the present invention provides a multi-axis control system 2 for an electronic cam, the system 2 specifically comprising:
[0124] The first multi-axis control module 201 is used to assign an independent programming table to each motion axis based on a preset motion task. The programming table includes a sequence of motion instructions and time parameters corresponding to each motion axis.
[0125] The second multi-axis control module 202 is used to generate a cam curve corresponding to each motion axis by parsing the action instruction sequence in the programming table of each motion axis and combining it with a preset cam control algorithm. The cam curve includes position parameters, velocity parameters and acceleration parameters.
[0126] The third multi-axis control module 203 is used to perform dimensionless processing on the cam curve through the electronic clutch module based on the real-time feedback of axis motion status data, dynamically correct the phase difference and synchronization error between each axis, and obtain the corrected cam curve.
[0127] The fourth multi-axis control module 204 is used to drive each motion axis to independently execute the action instruction sequence in its programming table based on the modified cam curve, and to synchronize the pulse signals of each axis in real time through the electronic cam module to realize multi-axis coordinated motion.
[0128] It is understandable that, such as Figure 1 The content of the multi-axis control method embodiment of the electronic cam shown is applicable to the multi-axis control system embodiment of this electronic cam. The specific functions implemented by the multi-axis control system embodiment of this electronic cam are the same as those shown in the figure. Figure 1 The multi-axis control method for the electronic cam shown is the same as that implemented in this embodiment, and the beneficial effects achieved are the same as those described above. Figure 1 The beneficial effects achieved by the multi-axis control method embodiment of the electronic cam shown are also the same.
[0129] It should be noted that the information interaction and execution process between the above systems are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.
[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0131] Reference Figure 3The present invention also provides a computer device 3, including: a memory 302 and a processor 301, and a computer program 303 stored in the memory 302. When the computer program 303 is executed on the processor 301, it implements the multi-axis control method of the electronic cam as described in any of the above methods.
[0132] The computer device 3 may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that... Figure 3 The computer device 3 is merely an example and does not constitute a limitation on the computer device 3. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0133] The processor 301 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0134] In some embodiments, the memory 302 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 302 may be an external storage device of the computer device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 3. Furthermore, the memory 302 may include both internal and external storage units of the computer device 3. The memory 302 is used to store the operating system, applications, boot loader, data, and other programs, such as the program code of the computer program. The memory 302 can also be used to temporarily store data that has been output or will be output.
[0135] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the multi-axis control method for an electronic cam as described in any of the above methods.
[0136] In this embodiment, if the integrated control unit is implemented as a software functional unit and sold or used as an independent product for machine tool control, it can be stored in a computer-readable storage medium specifically designed for machine tools. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by instructing the relevant hardware of the machine tool through a specific computer program. This computer program can be stored in a machine tool-specific computer-readable storage medium. When executed by the machine tool's processor, this computer program can implement the application steps of the various method embodiments in machine tool control. The computer program includes computer program code for machine tool control, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: a recording medium capable of carrying the computer program code for machine tool control to any entity or device in the machine tool equipment, a machine tool computer memory, a read-only memory (ROM), a random access memory (RAM), and other media suitable for machine tool software distribution, such as a dedicated machine tool control card, a machine tool data storage card, etc.
[0137] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0138] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0139] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0140] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
Claims
1. A method of multi-axis control of an electronic cam, characterized by, The method specifically comprises: assigning an independent programming table to each motion axis based on a preset motion task, the programming table comprising a motion instruction sequence and a time parameter corresponding to each motion axis; triggering the motion instruction sequence in the programming table of each motion axis through an absolute time axis of an electronic cam, combining a preset cam control algorithm, and generating a cam curve corresponding to each motion axis, the cam curve comprising a position parameter, a speed parameter, and an acceleration parameter; performing non-dimensional processing on the cam curve through an electronic clutch module according to real-time feedback of axis motion state data, dynamically correcting a phase difference and a synchronization error between axes, and obtaining a corrected cam curve; driving each motion axis to independently execute the motion instruction sequence in the programming table thereof based on the corrected cam curve, and realizing multi-axis coordinated motion by synchronizing axis pulse signals in real time through an electronic cam module; wherein the assigning of the independent programming table to each motion axis based on the preset motion task specifically comprises: setting an action instruction layer, a time parameter layer, and a conflict detection layer for the programming table, the action instruction layer being used to store a motion instruction sequence comprising a target position, a motion mode, and a synchronization trigger identifier, the motion mode comprising linear interpolation motion, circular interpolation motion, and point motion, the time parameter layer being used to assign a time reference parameter to each motion instruction, the time reference parameter comprising an absolute start time and a relative duration, and the conflict detection layer being used to record a resource occupation flag of each motion axis in a motion process; obtaining a preset motion task, decomposing the preset motion task into a plurality of sub-motions, and decomposing each sub-motion into an axis-level motion instruction; if any sub-motion involves multi-axis coordinated motion, inserting a synchronization trigger identifier corresponding to the sub-motion into the programming table of the corresponding motion axis; calculating a time distribution of each motion instruction according to kinematic constraints, and determining a relative duration corresponding to each motion instruction; sharing a unique identifier for resource allocation in the conflict detection layer, and determining whether a conflict occurs between motion instructions corresponding to any two motion axes according to the unique identifier, and if a conflict occurs, delaying a trigger time of the motion instruction of one of the motion axes.
2. The method of claim 1, wherein, the relative duration satisfies wherein, denotes a relative duration, denotes a target position of the motion axis for the kth motion command, denotes a current position of the motion axis for the kth motion command, denotes a maximum allowed velocity of the motion axis, denotes a maximum allowed acceleration of the motion axis.
3. The method of claim 1, wherein, the triggering of the motion instruction sequence in the programming table of each motion axis through the absolute time axis of the electronic cam, the combination of the preset cam control algorithm, and the generation of the cam curve corresponding to each motion axis specifically comprises: setting the absolute time axis of the electronic cam, so that the absolute time axis is synchronized with a control system of a numerical control machine tool; triggering a motion parameter of each motion instruction in the programming table of each motion axis according to a current time on the absolute time axis, monitoring a position and a time of a tool on each motion axis, and constructing a discrete trajectory point sequence; determining a main shaft from the plurality of motion axes, taking the main shaft as a time reference, fitting a discrete trajectory point sequence corresponding to the main shaft into a continuous function, and obtaining a main shaft reference curve; generating a slave cam curve of each slave axis through nonlinear mapping based on the main shaft reference curve and discrete trajectory point sequences corresponding to other motion axes; discretizing each slave cam curve into a pulse sequence and storing the pulse sequence in a buffer table; When an external disturbance or instruction change is detected, the buffer table is updated by determining the position deviation to be compensated, the correction rate and the correction trigger timestamp.
4. The method of claim 3, wherein, The shaft motion state data according to real-time feedback is subjected to non-dimensionalization processing by the electronic clutch module to dynamically correct the phase difference and synchronization error between the shafts and obtain a corrected cam curve, specifically including: Real-time collection of actual positions, speeds of each motion shaft, and deviation positions between actual positions and theoretical positions; If the deviation position of any motion shaft is greater than a preset deviation threshold, the synchronization link between the motion shaft and the main shaft is cut off by the electronic clutch module, and a non-dimensional parameter based on the main shaft position is determined by non-dimensionalization mapping; Based on the non-dimensional parameter, the slave cam curve of the motion shaft is reconstructed to obtain a corrected cam curve.
5. The method of claim 4, wherein, The non-dimensional parameter based on the main shaft position is determined by non-dimensionalization mapping, specifically including: The actual angular position of the main shaft at the current time is obtained by an encoder, and the starting position and target end position of the main shaft of the current motion segment are recorded; Based on the actual angular position of the main shaft at the current time and the starting position and target end position of the main shaft of the current motion segment, the absolute time axis is mapped into a non-dimensional parameter.
6. The method of claim 5, wherein, Based on the corrected cam curve, each motion shaft independently executes the action instruction sequence in its programming table, and the electronic cam module synchronizes the pulse signals of each shaft in real time to realize multi-axis coordinated motion, specifically including: First-order and second-order derivatives of the corrected cam curve are obtained to obtain angular velocity time sequence parameters and acceleration time sequence parameters of the corresponding motion shaft; The pulse frequency of the corresponding motion shaft is calculated based on the angular velocity time sequence parameters and the acceleration time sequence parameters; Based on the pulse sequence of the main shaft, a synchronization signal is broadcast to other motion shafts by the electronic cam module to adjust the pulse output time of other motion shafts; During pulse execution, the actual positions of each motion shaft are monitored in real time, the pulse frequency of each motion shaft is adjusted according to the error between the actual position and the theoretical position, and multi-axis motion coordination is realized according to the adjusted pulse frequency.
7. A multi-axis control system for an electronic cam, characterized by, The system specifically includes: A first multi-axis control module for assigning an independent programming table to each motion shaft based on a preset motion task, the programming table including an action instruction sequence and time parameters corresponding to each motion shaft; A second multi-axis control module for triggering the action instruction sequence in the programming table of each motion shaft through the absolute time axis of the electronic cam, and generating a cam curve corresponding to each motion shaft based on a preset cam control algorithm, the cam curve including position parameters, speed parameters and acceleration parameters; A third multi-axis control module for non-dimensionalization processing of the cam curve by the electronic clutch module based on real-time feedback of shaft motion state data to dynamically correct the phase difference and synchronization error between the shafts and obtain a corrected cam curve; A fourth multi-axis control module for driving each motion shaft to independently execute the action instruction sequence in its programming table based on the corrected cam curve, and synchronizing the pulse signals of each shaft in real time by the electronic cam module to realize multi-axis coordinated motion. The preset motion task is used to assign an independent programming table to each motion axis, and specifically includes: An action instruction layer, a time parameter layer, and a conflict detection layer are set for the programming table, the action instruction layer is used to store an action instruction sequence including a target position, a motion mode, and a synchronization trigger identifier, the motion mode includes linear interpolation motion, circular interpolation motion, and point motion, the time parameter layer is used to assign a time reference parameter to each action instruction, the time reference parameter includes an absolute start time and a relative duration, and the conflict detection layer is used to record a resource occupation flag of each motion axis in a motion process; A preset motion task is obtained, the preset motion task is decomposed into multiple sub-actions, and each sub-action is decomposed into an axis-level action instruction; If any sub-action involves multi-axis cooperative motion, a synchronization trigger identifier corresponding to the sub-action is inserted into a programming table of a corresponding motion axis; A time distribution of each action instruction is calculated according to kinematic constraints, and a relative duration corresponding to each action instruction is determined; A unique identifier is assigned to a shared resource in the conflict detection layer, whether a conflict occurs between action instructions corresponding to any two motion axes is determined according to the unique identifier, and if a conflict occurs, a trigger time of an action instruction of one of the motion axes is delayed.
8. A computer device, comprising: Comprise: A memory and a processor, and a computer program stored in the memory, when the computer program is executed on the processor, the multi-axis control method of the electronic cam is realized.
9. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and the computer program is run by a processor to realize the multi-axis control method of the electronic cam.
Citation Information
Patent Citations
Electronic cam control method for multi-spindle processing
CN108415375A