Electronic Cam Synchronization Compensation Method and Related Equipment Based on Distributed I / O

By collecting and processing the status data of the master and slave axes through a distributed I/O network, and dynamically adjusting the cam table, the problem of large synchronization error between the master and slave axes in the electronic cam system is solved, and higher precision multi-axis synchronous control is achieved.

CN122131690APending Publication Date: 2026-06-02SHENZHEN HUAMAO AOTE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN HUAMAO AOTE TECH CO LTD
Filing Date
2026-02-06
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing electronic cam systems rely on feedback from the spindle encoder, which makes it difficult to accurately perceive the actual motion state of the slave shaft's execution end, resulting in a large synchronization error between the master and slave shafts.

Method used

The system collects status data from the main shaft, slave shaft, and slave shaft execution end via a distributed I/O network, calculates the slave shaft drive train error, performs predictive calculations and compensation, dynamically adjusts the cam table, and reconstructs the data based on material status data to correct the slave shaft compensation command.

Benefits of technology

It significantly reduces the synchronization error between the master and slave axes, and improves the accuracy and stability of multi-axis synchronous motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122131690A_ABST
    Figure CN122131690A_ABST
Patent Text Reader

Abstract

This invention provides an electronic cam synchronization compensation method and related equipment based on distributed I / O. The method includes: collecting state data of the master shaft, slave shaft, and slave shaft execution end via a distributed I / O network; calculating the slave shaft drive chain error; performing predictive calculations based on the state data; compensating for the theoretical slave shaft position obtained from the cam table based on the slave shaft drive chain error; obtaining a slave shaft compensation command; collecting material state data via the distributed I / O network; dynamically adjusting the cam table based on the material state data; obtaining a reconstructed cam table; calculating the multi-slave shaft coupling compensation amount based on the reconstructed cam table; and synchronously issuing the slave shaft compensation command after correcting it. This invention incorporates drive chain error, material state changes, and multi-slave shaft coupling relationships into the electronic cam compensation control through multi-point sensing via a distributed I / O network, significantly reducing the master-slave shaft synchronization error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to an electronic cam synchronization compensation method and related equipment based on distributed I / O. Background Technology

[0002] Electronic cam technology is an important method for achieving multi-axis synchronous motion control in industrial automation. By establishing a position mapping relationship (cam table) between the master and slave axes in the controller, the controller queries the cam table based on the real-time position of the master axis, calculates the target position that the slave axis should reach, and issues control commands to drive the slave axis to move. Electronic cams are widely used in packaging machinery, printing equipment, textile machinery, and other scenarios requiring high-precision multi-axis synchronization.

[0003] However, traditional electronic cam systems rely solely on feedback signals from the master spindle encoder as lookup inputs, with the slave axis control commands being statically generated from a preset cam table. In actual operation, transmission chain losses such as gear backlash, coupling torsion, and guide rail friction exist between the slave axis motor and the actuator end, causing a deviation between the actual position of the slave axis actuator end and the position of the slave axis motor. The controller, relying solely on feedback from the slave axis motor, cannot accurately reflect the true motion state of the slave axis actuator end, thus resulting in master-slave axis synchronization errors. Summary of the Invention

[0004] The main objective of this invention is to solve the technical problem that existing electronic cam systems rely solely on feedback from the main shaft encoder, making it difficult for the controller to accurately perceive the actual motion state of the slave shaft's execution end, resulting in a large synchronization error between the main and slave shafts. This invention provides an electronic cam synchronization compensation method based on distributed I / O, the method comprising: The status data of the main shaft, slave shaft, and slave shaft execution end corresponding to the electronic cam are collected through a distributed I / O network, and the slave shaft drive chain error is calculated based on the status data. Based on the state data, a prediction calculation is performed. Based on the prediction result, the theoretical position of the driven shaft is queried in the cam table. The theoretical position of the driven shaft is compensated according to the error of the driven shaft transmission chain to obtain the driven shaft compensation command. Material status data is collected through a distributed I / O network, the spindle position deviation is calculated based on the material status data, and the cam table is dynamically adjusted based on the spindle position deviation to obtain a reconstructed cam table. Data from multiple slave axes is collected via a distributed I / O network. The coupling compensation amount of the multiple slave axes is calculated based on the reconstructed cam table. The slave axis compensation command is then corrected and sent out synchronously.

[0005] The present invention also provides an electronic cam synchronization compensation device based on distributed I / O, the electronic cam synchronization compensation device based on distributed I / O comprising: The status acquisition module is used to acquire status data of the main shaft, slave shaft, and slave shaft execution end corresponding to the electronic cam through a distributed IO network, and calculate the slave shaft drive chain error based on the status data; The prediction and compensation module is used to perform prediction calculations based on the state data, query the theoretical position of the driven shaft in the cam table based on the prediction results, and compensate the theoretical position of the driven shaft according to the error of the driven shaft transmission chain to obtain the driven shaft compensation command. The curve reconstruction module is used to collect material status data through a distributed IO network, calculate the spindle position deviation based on the material status data, and dynamically adjust the cam table based on the spindle position deviation to obtain a reconstructed cam table. The coupling compensation module is used to collect multi-axis execution data through a distributed IO network, calculate the multi-axis coupling compensation amount according to the reconstructed cam table, and synchronously issue the modified slave axis compensation command.

[0006] The present invention also provides an electronic cam synchronization compensation device based on distributed I / O, comprising: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; the at least one processor invokes the instructions in the memory to cause the electronic cam synchronization compensation device based on distributed I / O to perform the steps of the above-described electronic cam synchronization compensation method based on distributed I / O.

[0007] The present invention also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the steps of the above-described electronic cam synchronization compensation method based on distributed I / O.

[0008] The aforementioned electronic cam synchronization compensation method and related equipment based on distributed I / O collects state data of the master shaft, slave shaft, and slave shaft execution end via a distributed I / O network to calculate the slave shaft transmission chain error. Based on the state data, predictive calculations are performed, and the theoretical slave shaft position obtained from the cam table is compensated according to the slave shaft transmission chain error to obtain the slave shaft compensation command. Material state data is collected via the distributed I / O network, and the cam table is dynamically adjusted based on the material state data to obtain a reconstructed cam table. The multi-slave shaft coupling compensation amount is calculated based on the reconstructed cam table, and the slave shaft compensation command is corrected and synchronously issued. This invention incorporates transmission chain error, material state changes, and multi-slave shaft coupling relationships into the electronic cam compensation control through multi-point sensing via a distributed I / O network, significantly reducing the master-slave shaft synchronization error.

[0009] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0010] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0011] Figure 1 This is a schematic diagram of the first embodiment of the electronic cam synchronization compensation method based on distributed I / O in this invention. Figure 2 This is a schematic diagram of the second embodiment of the electronic cam synchronization compensation method based on distributed I / O in this invention. Figure 3 This is a schematic diagram of one embodiment of the electronic cam synchronization compensation device based on distributed I / O in this invention. Figure 4 This is a schematic diagram of an embodiment of the electronic cam synchronization compensation device based on distributed I / O in this invention. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] The terms "comprising" and "having," and any variations thereof, used in the embodiments of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0014] To facilitate understanding of this embodiment, a detailed description of an electronic cam synchronization compensation method based on distributed I / O disclosed in this embodiment of the invention will be provided first. For example... Figure 1 As shown, this method includes the following steps: 101. Collect the status data of the main shaft, slave shaft, and slave shaft execution end corresponding to the electronic cam through a distributed IO network, and calculate the slave shaft drive chain error based on the status data; In this embodiment, the step of collecting the status data of the main shaft, slave shaft, and slave shaft execution end corresponding to the electronic cam through a distributed I / O network, and calculating the slave shaft drive train error based on the status data, includes: deploying I / O modules at the main shaft end, slave shaft motor end, and slave shaft execution end, respectively, with each I / O module connected to the controller via a fieldbus; using a distributed clock mechanism to synchronize the clocks of each I / O module, and collecting the main shaft status data, slave shaft motor status data, and slave shaft execution end status data at the same timestamp; and calculating the slave shaft drive train error based on the difference between the slave shaft motor status data and the slave shaft execution end status data at the same timestamp.

[0015] Specifically, I / O modules are deployed at the spindle end, the driven shaft motor end, and the driven shaft actuator end, respectively, and each I / O module is connected to the controller via a fieldbus. In traditional electronic cam systems, the controller typically only obtains encoder feedback from the driven shaft motor end through a servo driver, and the actual motion state of the actuator end is not directly sensed. This embodiment adds an I / O module to the driven shaft actuator end, directly introducing the position information of the actuator end into the control loop, enabling the controller to sense the complete drive train of the driven shaft.

[0016] It should be noted that a transmission structure exists between the driven shaft motor end and the actuator end. During actual operation, factors such as gear backlash, coupling torsion, and guide rail friction can cause positional deviations between the driven shaft motor end and the actuator end. The magnitude and direction of these deviations vary with the motion state. For example, during acceleration, the elastic deformation of the transmission structure will cause the actuator end to lag behind the motor end; during constant speed, the deviation caused by backlash is relatively stable; during deceleration, inertia may cause the actuator end to overtake the motor end. Relying solely on feedback from the motor end is insufficient to distinguish the deviation characteristics of these different stages, while directly acquiring state data at the actuator end can reflect the true motion of the transmission chain.

[0017] Based on this, a distributed clock mechanism is adopted to synchronize the clocks of each I / O module. Fieldbus communication has a certain periodic delay. If each I / O module collects data at different times, the data sent to the controller will not correspond to the state at the same moment of motion, and directly using this data for calculation will introduce time mismatch errors. The distributed clock mechanism synchronizes the local clocks of each I / O module to the controller clock during the bus initialization phase, enabling each module to trigger data acquisition based on a consistent time base. This ensures that the spindle status data, slave motor status data, and slave actuator end-point status data correspond to the same timestamp.

[0018] Understandably, at the same timestamp, the difference between the driven-axis motor status data and the driven-axis execution end status data can directly reflect the positional deviation in the transmission chain caused by mechanical factors at the current moment, i.e., the driven-axis transmission chain error. This error does not depend on modeling or empirical calibration of the transmission structure parameters, but is directly calculated based on measured data, and its value can naturally change with the actual working conditions.

[0019] 102. Perform prediction calculations based on the state data, query the theoretical position of the driven shaft in the cam table based on the prediction results, and compensate the theoretical position of the driven shaft according to the driven shaft transmission chain error to obtain the driven shaft compensation command; In this embodiment, the step of performing prediction calculations based on the state data and querying the theoretical position of the slave axis in the cam table based on the prediction results includes: arranging the spindle state data in chronological order and maintaining a fixed window size according to a preset historical sequence of spindle states and the spindle state data collected in the current control cycle to obtain a rolling data window; performing least squares fitting on the data points within the rolling data window to obtain polynomial coefficients describing the trend of spindle state changes; determining the prediction time based on the polynomial coefficients and the communication delay time of the distributed IO network; substituting the prediction time into the polynomial and extrapolating to obtain the predicted position of the spindle; and using the predicted position of the spindle as input to perform lookup interpolation in the cam table to obtain the theoretical position of the slave axis.

[0020] Specifically, after acquiring the current spindle status data in each control cycle, the controller adds it to the existing historical sequence in chronological order, while removing the oldest data point outside the window, thus maintaining a fixed-size scrolling data window. This scrolling method ensures that the data within the window always reflects the spindle's recent motion state. When the spindle's motion trend changes, the window data can be updated accordingly, avoiding the introduction of outdated historical information that could affect subsequent calculations.

[0021] It should be noted that in a distributed I / O network, there is a communication delay between data acquisition from the I / O module and the controller. The spindle status data obtained by the controller in a certain control cycle actually corresponds to an earlier point in time. If the slave axis command is obtained directly from the cam table using this data, the slave axis response will lag behind the actual position of the spindle, and the synchronization error between the master and slave axes will accumulate due to this lag. This embodiment obtains polynomial coefficients describing the trend of spindle status changes by performing least squares polynomial fitting on the data points within the scrolling window. Then, it uses this polynomial to extrapolate forward to predict the position the spindle will reach at the end of the communication delay.

[0022] Understandably, the order of the polynomial fitting should match the current motion complexity of the main axis. When the main axis is moving at a constant speed, a low-order polynomial can accurately describe its trend; when the main axis is undergoing acceleration or deceleration, a higher-order polynomial is needed to capture the nonlinear changes in position over time. The polynomial coefficients obtained from the fitting comprehensively reflect the motion characteristics of the main axis within the window, such as position, velocity, and acceleration. By substituting the predicted time corresponding to the communication delay into the polynomial, the predicted position of the main axis at that time can be obtained.

[0023] Based on this, the predicted position of the master shaft is used as input to perform lookup interpolation on the cam table to obtain the corresponding theoretical position of the slave shaft. Since the data points in the cam table are stored discretely, the predicted position of the master shaft will generally not fall exactly on the existing data points during actual lookup. Therefore, it is necessary to perform interpolation calculation based on the relationship between adjacent data points to obtain a continuous and smooth theoretical position of the slave shaft.

[0024] In conjunction with the above embodiments, during the compensation of the theoretical position of the driven shaft based on the driven shaft transmission chain error, the driven shaft movement process is divided into motion stages corresponding to the cam table. The mean value of the driven shaft transmission chain error in each stage is calculated, and the mean value of the error in each stage is inverted as the reverse compensation amount for that stage. At the transition between adjacent motion stages, the reverse compensation amount is interpolated and smoothed to avoid abrupt changes in the compensation amount at the stage boundary. The reverse compensation amounts corresponding to each stage are superimposed on the theoretical position of the driven shaft to obtain the driven shaft compensation command.

[0025] In this embodiment, the step of compensating the theoretical position of the driven shaft based on the driven shaft transmission chain error to obtain the driven shaft compensation command includes: statistically analyzing the driven shaft transmission chain error according to the acceleration segment, constant speed segment, and deceleration segment based on the electronic cam operation stage, and calculating the average transmission chain error of each stage; calculating the corresponding reverse compensation amount for each stage based on the average transmission chain error of each stage; and superimposing the reverse compensation amount of each stage with the theoretical position of the driven shaft to obtain the driven shaft compensation command.

[0026] Specifically, within a complete operating cycle, the motion of the driven shaft of an electronic cam typically undergoes three stages: acceleration, constant speed, and deceleration. The transmission chain characteristics differ significantly between these stages. During acceleration, as the driven shaft motor accelerates, the elastic deformation and backlash compensation of the transmission structure are not yet fully keeping up, resulting in the actual position of the actuator lagging behind the motor end. During constant speed, the transmission structure is in a relatively stable motion state, and the effects of backlash and elastic deformation tend to be constant, leading to a relatively stable error characteristic. During deceleration, the actuator overtakes due to inertia as the motor decelerates, resulting in a significantly different error performance compared to the acceleration stage. Because the transmission chain characteristics differ considerably between these stages, this embodiment statistically analyzes the driven shaft transmission chain error separately for each cam operating stage, rather than taking an overall average for the entire cycle.

[0027] It should be noted that the cam table itself defines the target trajectory of the driven shaft in each motion stage, and the range of the master shaft position implicitly reflects the current motion stage. Based on the master shaft position used for lookup, the controller can determine whether the driven shaft is currently in an acceleration, constant speed, or deceleration phase, thus assigning the collected transmission chain error to the corresponding stage for statistical analysis. Within the same stage, due to the relatively stable mechanical characteristics of the transmission chain, the transmission chain error collected over multiple control cycles will fluctuate around a certain value. Averaging these data can filter out random deviations caused by random disturbances within a single cycle, yielding an average error value that reflects the systematic deviation characteristics of the transmission chain in that stage. It is important to note that between different operating cycles, due to slight changes in load conditions or environmental factors, the average error value for each stage may drift to some extent. Therefore, the statistical process should be continuous, and the average error value should be updated continuously as new data is added.

[0028] Based on this, the corresponding reverse compensation amount is calculated according to the average error of the transmission chain at each stage. The direction of the reverse compensation amount is opposite to the average error of that stage, and its magnitude is consistent with the average error. It is superimposed on the theoretical position of the driven shaft, and the compensated command can guide the execution end to more accurately track the target position specified by the cam table. Since there are differences in the reverse compensation amount between adjacent motion stages, if the compensation amount is switched directly at the stage transition, it will cause a step change in the driven shaft command at that point, and the actual movement of the driven shaft will result in a sudden change in position. In this embodiment, the reverse compensation amount is interpolated and smoothed in the stage transition region. In the transition region, the compensation amount changes continuously from the value of one stage to the value of the adjacent stage, and the compensation amount can smoothly transition at the stage boundary, so that the driven shaft command remains continuously changing.

[0029] Understandably, the reverse compensation amount at each stage will automatically adjust as the mean error changes. When the actual operating conditions cause a shift in the transmission chain error characteristics, the error statistics of the corresponding stage will change accordingly, and the reverse compensation amount will also be updated. The entire compensation process does not depend on the fixed calibration of the transmission structure parameters.

[0030] 103. Collect material status data through a distributed IO network, calculate the spindle position deviation based on the material status data, and dynamically adjust the cam table based on the spindle position deviation to obtain a reconstructed cam table; In this embodiment, the step of collecting material status data through a distributed I / O network and calculating the spindle position deviation based on the material status data includes: collecting material trigger signals and corresponding trigger times at material leading edge detection points and early warning detection points on the material transport path through the distributed I / O network; calculating the actual material speed based on the difference between the preset distance between the two detection points and the trigger time; calculating the time required for the material to reach the target position based on the actual material speed and the preset distance between the material early warning detection point and the target position; predicting the spindle position when the material reaches the target position based on the required time and the current spindle status data; and comparing the predicted spindle position with the spindle position corresponding to the preset target position in the cam table to obtain the spindle position deviation.

[0031] Specifically, in actual production, the timing of the material reaching the target processing position and the timing of the spindle rotating to the corresponding cam position need to be coordinated. The spindle position corresponding to the preset target position in the cam table is calibrated under the premise that the material is stably conveyed in an ideal state. However, during the material transmission process, it is affected by various factors such as the feeding device, the shape of the material itself, and the operating state of the conveyor belt. The actual time of arrival at the target position is often not completely consistent with the preset time. This deviation will accumulate gradually during continuous high-speed operation, affecting the accurate operation of the driven shaft on the material.

[0032] Two detection points are deployed along the material transport path. Each point generates a trigger signal and records the corresponding time as material passes through it. Since the distance between the two detection points is fixed and known, the measured velocity of the material on that path can be calculated based on the difference in trigger times as the material passes through the two detection points sequentially. Compared to continuous tracking relying on a single sensor, the dual-point triggering method reflects the average motion state of the material between the two points, making it more adaptable to variations in material shape and minor fluctuations in the conveyor belt.

[0033] Based on this, the time required for the material to reach the target position from the warning detection point can be calculated according to the measured material speed and the preset distance between the warning detection point and the target position. Combining the currently collected spindle status data, including the current spindle position and movement trend, the spindle position when the material reaches the target position can be predicted. Comparing this predicted spindle position with the preset spindle position corresponding to the target position in the cam table, the deviation between the two is the spindle position deviation. This deviation reflects that, under the current material transmission state, without adjustment, the slave shaft will perform operations on the material when the spindle deviates from the preset position. The magnitude and direction of the spindle position deviation change with the material transmission state. When the material transmission speed is too fast, the material will arrive at the target position earlier than the preset time, and the deviation manifests as the material being ahead; when the material transmission speed is too slow, the opposite is true.

[0034] During the dynamic adjustment of the cam table based on the spindle position deviation, the cam table is composed of several key points and interpolation curves between them. The spindle position coordinates of these key points determine the target position of the slave axis at the corresponding spindle position. When a spindle position deviation exists, if no adjustment is made to the cam table, the slave axis will perform operations before the material reaches or has already passed the target position, resulting in a shift in the processing sequence. In this embodiment, the key points in the cam table associated with the target position are translated along the spindle position coordinate direction according to the spindle position deviation, so that the spindle position corresponding to the slave axis performing the key action is consistent with the actual position of the spindle when the material reaches the target position.

[0035] In addition to the key points directly associated with the target position, the cam table also includes other key points during the transitions of the driven shaft through acceleration, constant speed, and deceleration. These key points are interpolated using curves to ensure the continuity and smoothness of the driven shaft's motion. After translating the key points associated with the target position, high-order polynomial interpolation is performed again on the affected key points to generate new curve segments. This ensures that the reconstructed cam table remains smooth and continuous between key points, preventing abrupt changes in the speed or acceleration of the driven shaft. The overall structure of the reconstructed cam table remains consistent with the original cam table; the motion pattern of the driven shaft during acceleration, constant speed, and deceleration within one operating cycle remains unchanged. Only the master shaft position coordinates of the key points shift with changes in the master shaft position deviation. Since the master shaft position deviation is recalculated in each material cycle, the reconstructed cam table is updated accordingly in each cycle. Furthermore, a signal indicating the actual arrival of the material can be acquired at the target position. The master shaft position corresponding to this signal is compared with the preset target master shaft position in the reconstructed cam table. The deviation can be used to correct the estimation of the measured material speed, improving the prediction accuracy for the next cycle.

[0036] 104. Collect multi-axis execution data through a distributed IO network, calculate the multi-axis coupling compensation amount based on the reconstructed cam table, and synchronously issue the modified slave axis compensation command.

[0037] In this embodiment, the step of collecting multi-slave axis execution data through a distributed I / O network, calculating multi-slave axis coupling compensation based on the reconstructed cam table, and synchronously issuing the slave axis compensation command after correction includes: collecting state data of the execution end of each slave axis through the distributed I / O network, calculating the synchronization error of each slave axis according to the reconstructed cam table; constructing a multi-slave axis coupling compensation matrix based on the time delay correlation between the synchronization errors of each slave axis; calculating the coupling compensation amount of each slave axis according to the multi-slave axis coupling compensation matrix, and synchronously issuing the compensation command after correcting the compensation command of each slave axis with the coupling compensation amount.

[0038] Specifically, in scenarios where a main spindle drives multiple slave axes, each slave axis performs different processing operations such as cutting, sealing, and pushing. The slave axes are sequentially related through material transfer. When a deviation occurs in the execution of one slave axis, this deviation is transmitted to the next slave axis via material transfer, affecting the processing sequence of subsequent slave axes. Compensating independently based solely on the transmission chain errors of each slave axis cannot eliminate the coupling effect of material transfer between slave axes.

[0039] This embodiment collects the state data of each slave axis execution end through a distributed I / O network. Based on the target position corresponding to each slave axis in the reconstructed cam table, the current synchronization error of each slave axis is calculated. By analyzing the time delay correlation between the synchronization errors of each slave axis, it is possible to identify which slave axes have strong coupling relationships, and construct a multi-slave axis coupling compensation matrix accordingly. Based on the coupling compensation matrix, the synchronization errors of the executed slave axes are mapped to the compensation instructions of the slave axes to be executed according to the coupling relationship. After superimposing the coupling compensation amount on the compensation instructions of each slave axis, the controller synchronously sends them to each slave axis.

[0040] In this embodiment, state data of the master shaft, slave shaft, and slave shaft execution end are collected through a distributed I / O network to calculate the slave shaft drive chain error. Predictive calculations are performed based on the state data, and the theoretical slave shaft position obtained from the cam table is compensated according to the slave shaft drive chain error to obtain a slave shaft compensation command. Material state data is collected through the distributed I / O network, and the cam table is dynamically adjusted based on the material state data to obtain a reconstructed cam table. The multi-slave shaft coupling compensation amount is calculated based on the reconstructed cam table, and the slave shaft compensation command is corrected and synchronously issued. This invention incorporates drive chain error, material state changes, and multi-slave shaft coupling relationships into electronic cam compensation control through multi-point sensing via a distributed I / O network, significantly reducing the master-slave shaft synchronization error.

[0041] Please see Figure 2 Another embodiment of the electronic cam synchronization compensation method based on distributed I / O in this application includes: 201. Collect the status data of the main shaft, slave shaft, and slave shaft execution end corresponding to the electronic cam through a distributed IO network, and calculate the slave shaft drive chain error based on the status data; 202. Perform prediction calculations based on the state data, look up the theoretical position of the driven shaft in the cam table based on the prediction results, and compensate for the theoretical position of the driven shaft according to the driven shaft transmission chain error to obtain the driven shaft compensation command; 203. Collect material status data through a distributed IO network, calculate the spindle position deviation based on the material status data, and dynamically adjust the cam table based on the spindle position deviation to obtain a reconstructed cam table; In this embodiment, steps 201-203 are similar to steps 101-103 in the first embodiment, and will not be described again here.

[0042] 204. Collect the execution end position data of each slave axis through a distributed IO network, calculate the ideal position of each slave axis based on the reconstructed cam table and the current master axis position, compare the execution end position data of each slave axis with the corresponding ideal position, and obtain the synchronization error of each slave axis. In this embodiment, in the case where the main shaft drives multiple slave shafts, each slave shaft should be in a determined ideal position according to the reconfigured cam table under the same main shaft position. Due to the different transmission chain conditions and load states of each slave shaft, and the coupling relationship formed by material transfer between the slave shafts, the actual position of the execution end of each slave shaft often deviates from the ideal position, and the magnitude and trend of the deviation of each slave shaft are also different.

[0043] This embodiment simultaneously collects position data from the execution ends of each slave axis through a distributed I / O network, ensuring that the position information of all slave axes corresponds to the same timestamp. Based on the current master axis position, a lookup and interpolation are performed on the reconstructed cam table to obtain the ideal position of each slave axis under that master axis position. The reconstructed cam table already includes dynamic adjustments based on material conditions, and the obtained ideal position reflects the actual target that each slave axis should reach under the current operating conditions.

[0044] The measured position of each slave axis's execution end is compared with its corresponding ideal position; the difference is the synchronization error of each slave axis. This synchronization error comprehensively reflects the drive chain deviation of the slave axis itself and the coupling effect from other slave axes. If a specific time delay relationship exists between the synchronization errors of different slave axes, it indicates that there is a coupling effect between the slave axes through material transfer. The synchronization error of each slave axis continuously changes with the operating state, and the controller re-collects the execution end data and updates the synchronization error in each control cycle.

[0045] 205. Based on the timing data of the synchronization errors of each slave axis, calculate the cross-correlation coefficient between the synchronization errors of each slave axis, and establish a multi-axis coupling compensation matrix based on the cross-correlation coefficient; In this embodiment, the step of calculating the cross-correlation coefficient between the synchronization errors of each slave axis based on the timing data of the synchronization errors of each slave axis, and establishing a multi-axis coupling compensation matrix based on the cross-correlation coefficient includes: for each pair of timing data of the synchronization errors of each slave axis, traversing different time delay values ​​within a preset time delay range, calculating the correlation coefficient between the timing data of the corresponding two slave axis errors at each time delay value, and obtaining a sequence of correlation coefficients corresponding to each time delay; taking the maximum value of the sequence of correlation coefficients corresponding to each time delay to obtain the maximum cross-correlation coefficient between each pair of slave axes and the corresponding optimal time delay; writing the maximum cross-correlation coefficient exceeding the preset correlation threshold as the coupling coefficient in the corresponding position, and setting the coefficients not exceeding the correlation threshold to zero, thereby obtaining the multi-axis coupling compensation matrix.

[0046] Specifically, in a scenario where a main shaft drives multiple slave shafts, the slave shafts are sequentially related through material transfer. When a deviation occurs on one slave shaft, this deviation is transmitted to subsequent slave shafts along with the material movement, manifesting in the synchronization error of those subsequent shafts. Since it takes time for material to be transferred from one slave shaft to another, this coupling effect does not occur simultaneously in the error time series; rather, there is a time delay corresponding to the material transfer time. This delayed coupling relationship is difficult to identify simply by observing the instantaneous values ​​of the synchronization errors of each slave shaft; correlation analysis of the error time series data is necessary.

[0047] This embodiment performs cross-correlation analysis on pairwise synchronization error timing data of each slave axis. The core idea of ​​cross-correlation analysis is to slide the error timing data of one slave axis along the time axis and calculate the correlation coefficient between the two timing data at each sliding position. Under the same time delay value, the correlation coefficient between the error timing data of the two slave axes reflects the degree of consistency of their changing trends under that delay condition. If there is indeed a coupling relationship between the two slave axes through material transfer, the correlation coefficient will be significantly higher than other delay values ​​at delay values ​​corresponding to the actual material transfer time, while the correlation coefficient will be more random at delay values ​​that do not match the actual transfer time. By traversing different delay values ​​within a preset time delay range and calculating the correlation coefficients respectively, a sequence of correlation coefficients that varies with the delay value is obtained.

[0048] The maximum value of the correlation coefficient sequence is taken to obtain the maximum cross-correlation coefficient and the corresponding optimal time delay between the two slave axes. The magnitude of the maximum cross-correlation coefficient reflects the strength of the coupling relationship between the two slave axes, while the optimal time delay corresponds to the actual time taken for material to be transferred from one slave axis to another. In actual production, not all slave axes have significant coupling relationships. Some slave axes, due to physical non-adjacency or disconnected material transfer paths, do not exhibit obvious delay correlation characteristics between their error time series, resulting in a lower maximum cross-correlation coefficient. For such slave axis pairs, even if the delay value corresponding to the maximum cross-correlation coefficient happens to be close to the material transfer time of some materials, it cannot be used to determine the existence of a coupling relationship. Therefore, a correlation threshold needs to be introduced for screening.

[0049] The maximum cross-correlation coefficients between each pair of slave axes are filtered based on a preset correlation threshold. Pairs exceeding the threshold indicate significant coupling between the two slave axes, and this maximum cross-correlation coefficient is written as the coupling coefficient in the corresponding position in the matrix. Pairs of slave axes not exceeding the threshold are considered to have no significant coupling, and their corresponding positions are set to zero. In the resulting multi-axis coupling compensation matrix, the distribution of non-zero elements reflects the coupling structure between the slave axes, and the magnitude of the corresponding coupling coefficients reflects the degree of coupling influence. This matrix is ​​periodically recalculated and updated based on the latest error time-series data during operation. When changes in production conditions alter the coupling relationships between slave axes, the distribution of coupling coefficients and non-zero elements in the matrix is ​​also adjusted accordingly.

[0050] 206. Calculate the coupling compensation amount of each slave axis based on the multi-axis coupling compensation matrix and the synchronization error of each slave axis.

[0051] In this embodiment, for a given slave axis, the non-zero elements in the row corresponding to that slave axis in the coupling compensation matrix represent other slave axes with which it has a significant coupling relationship and their corresponding coupling coefficients. Each non-zero coupling coefficient corresponds to an optimal time delay, which reflects the time required for the deviation of the coupled slave axis to reach the current slave axis through material transport. Therefore, when calculating the coupling impact, the synchronization error of the coupled slave axis at the current moment cannot be used directly. Instead, the synchronization error of the slave axis at the moment corresponding to the optimal time delay needs to be taken, and multiplied by the coupling coefficient to obtain the impact of the coupled slave axis on the current slave axis. After summing the impacts of each coupled slave axis, the total coupling compensation amount that the current slave axis needs to correct for the coupling effect is obtained. Since some positions in the coupling compensation matrix are zero, there is no significant coupling between the corresponding slave axis pairs, and the synchronization errors of these slave axes are not included in the total coupling compensation amount.

[0052] In this embodiment, state data of the master shaft, slave shaft, and slave shaft execution end are collected through a distributed I / O network to calculate the slave shaft drive chain error. Predictive calculations are performed based on the state data, and the theoretical slave shaft position obtained from the cam table is compensated according to the slave shaft drive chain error to obtain a slave shaft compensation command. Material state data is collected through the distributed I / O network, and the cam table is dynamically adjusted based on the material state data to obtain a reconstructed cam table. The multi-slave shaft coupling compensation amount is calculated based on the reconstructed cam table, and the slave shaft compensation command is corrected and synchronously issued. This invention incorporates drive chain error, material state changes, and multi-slave shaft coupling relationships into electronic cam compensation control through multi-point sensing via a distributed I / O network, significantly reducing the master-slave shaft synchronization error.

[0053] The above describes the electronic cam synchronization compensation method based on distributed I / O in the embodiments of the present invention. The following describes the electronic cam synchronization compensation device based on distributed I / O in the embodiments of the present invention. Please refer to [link to related documentation] for details on this distributed I / O electronic cam synchronization compensation device. Figure 3 One embodiment of the electronic cam synchronization compensation device based on distributed I / O in this invention includes: The status acquisition module 301 is used to acquire status data of the main shaft, slave shaft and slave shaft execution end corresponding to the electronic cam through a distributed IO network, and calculate the slave shaft drive chain error based on the status data; The prediction and compensation module 302 is used to perform prediction calculations based on the state data, query the theoretical position of the driven shaft in the cam table based on the prediction results, and compensate the theoretical position of the driven shaft according to the error of the driven shaft transmission chain to obtain the driven shaft compensation command. The curve reconstruction module 303 is used to collect material status data through a distributed IO network, calculate the spindle position deviation based on the material status data, and dynamically adjust the cam table based on the spindle position deviation to obtain a reconstructed cam table. The coupling compensation module 304 is used to collect multi-axis execution data through a distributed IO network, calculate the multi-axis coupling compensation amount according to the reconstructed cam table, and synchronously issue the modified slave axis compensation command.

[0054] In this embodiment of the invention, the electronic cam synchronization compensation device based on distributed I / O operates the aforementioned electronic cam synchronization compensation method based on distributed I / O. The device collects state data of the master shaft, slave shaft, and slave shaft execution end via a distributed I / O network, calculates the slave shaft transmission chain error, performs predictive calculations based on the state data, and compensates for the theoretical slave shaft position obtained from the cam table based on the slave shaft transmission chain error, thus obtaining a slave shaft compensation command. It also collects material state data via the distributed I / O network, dynamically adjusts the cam table based on the material state data, and obtains a reconstructed cam table. Finally, it calculates the multi-slave shaft coupling compensation amount based on the reconstructed cam table, corrects the slave shaft compensation command, and synchronously issues it. This invention, through multi-point sensing via a distributed I / O network, incorporates transmission chain error, material state changes, and multi-slave shaft coupling relationships into the electronic cam compensation control, significantly reducing the master-slave shaft synchronization error.

[0055] above Figure 3 The electronic cam synchronization compensation device based on distributed I / O in this embodiment of the invention will be described in detail from the perspective of unitized functional entities. The electronic cam synchronization compensation device based on distributed I / O in this embodiment of the invention will be described in detail from the perspective of hardware processing.

[0056] Figure 4 This is a schematic diagram of the structure of an electronic cam synchronization compensation device based on distributed I / O provided in an embodiment of the present invention. The electronic cam synchronization compensation device 400 based on distributed I / O can vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 410 (e.g., one or more processors) and a memory 420, and one or more storage media 430 (e.g., one or more mass storage devices) storing application programs 433 or data 432. The memory 420 and storage media 430 can be temporary or persistent storage. The program stored in the storage media 430 may include one or more units (not shown in the diagram), each unit may include a series of instruction operations on the electronic cam synchronization compensation device 400 based on distributed I / O. Furthermore, the processor 410 may be configured to communicate with the storage media 430 and execute the series of instruction operations in the storage media 430 on the electronic cam synchronization compensation device 400 based on distributed I / O to implement the steps of the aforementioned electronic cam synchronization compensation method based on distributed I / O.

[0057] The electronic cam synchronization compensation device 400 based on distributed I / O may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input / output interfaces 460, and / or one or more operating systems 431, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 4 The illustrated structure of the electronic cam synchronization compensation device based on distributed I / O does not constitute a limitation on the electronic cam synchronization compensation device based on distributed I / O provided by the present invention. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0058] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the electronic cam synchronization compensation method based on distributed I / O.

[0059] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0060] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0061] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for electronic cam synchronization compensation based on distributed I / O, characterized in that, The electronic cam synchronization compensation method includes: The status data of the main shaft, slave shaft, and slave shaft execution end corresponding to the electronic cam are collected through a distributed I / O network, and the slave shaft drive chain error is calculated based on the status data. Based on the state data, a prediction calculation is performed. Based on the prediction result, the theoretical position of the driven shaft is queried in the cam table. The theoretical position of the driven shaft is compensated according to the error of the driven shaft transmission chain to obtain the driven shaft compensation command. Material status data is collected through a distributed I / O network, the spindle position deviation is calculated based on the material status data, and the cam table is dynamically adjusted based on the spindle position deviation to obtain a reconstructed cam table. Data from multiple slave axes is collected via a distributed I / O network. The coupling compensation amount of the multiple slave axes is calculated based on the reconstructed cam table. The slave axis compensation command is then corrected and sent out synchronously.

2. The electronic cam synchronization compensation method according to claim 1, characterized in that, The process of acquiring state data of the main shaft, slave shaft, and slave shaft execution end corresponding to the electronic cam through a distributed I / O network, and calculating the slave shaft drive train error based on the state data, includes: I / O modules are deployed at the spindle end, the slave motor end, and the slave actuator end, and each I / O module is connected to the controller via a fieldbus. A distributed clock mechanism is used to synchronize the clocks of each IO module, and the spindle status data, slave motor status data, and slave execution end status data are collected at the same timestamp. The slave shaft drive train error is calculated based on the difference between the slave shaft motor status data and the slave shaft execution end status data at the same timestamp.

3. The electronic cam synchronization compensation method according to claim 1, characterized in that, The step of performing prediction calculations based on the state data and querying the theoretical position of the follower shaft in the cam table based on the prediction results includes: Based on the preset spindle status history sequence and the spindle status data collected in the current control cycle, the data is arranged in chronological order and a fixed window size is maintained to obtain a rolling data window; The data points within the scrolling data window are fitted using the least squares method to obtain polynomial coefficients describing the trend of the main shaft state change. The prediction time is determined based on the polynomial coefficients and the communication delay time of the distributed I / O network. The prediction time is then substituted into the polynomial, and the predicted position of the main axis is calculated by extrapolation. The predicted position of the main shaft is used as input to perform lookup interpolation in the cam table to obtain the theoretical position of the slave shaft.

4. The electronic cam synchronization compensation method according to claim 1, characterized in that, The step of compensating the theoretical position of the driven shaft based on the driven shaft transmission chain error to obtain the driven shaft compensation command includes: Based on the operation stages of the electronic cam, the transmission chain error of the driven shaft is statistically analyzed according to the acceleration stage, the constant speed stage, and the deceleration stage, and the average transmission chain error of each stage is calculated. Based on the average error of the transmission chain at each stage, calculate the corresponding reverse compensation amount for each stage; The reverse compensation amount of each stage is superimposed with the theoretical position of the slave axis to obtain the slave axis compensation command.

5. The electronic cam synchronization compensation method according to claim 1, characterized in that, The step of collecting material status data through a distributed I / O network and calculating the spindle position deviation based on the material status data includes: The material trigger signal and the corresponding trigger time are collected at the material leading edge detection point and the early warning detection point on the material transport path through a distributed IO network. The actual material speed is calculated based on the preset distance between the two detection points and the difference between the trigger times. Based on the measured material speed and the preset distance between the material warning detection point and the target position, the time required for the material to reach the target position is calculated, and based on the required time and the current spindle status data, the spindle position when the material reaches the target position is predicted. The predicted spindle position is compared with the spindle position corresponding to the preset target position in the cam table to obtain the spindle position deviation.

6. The electronic cam synchronization compensation method according to claim 1, characterized in that, The step of collecting multi-axis execution data through a distributed I / O network and calculating the multi-axis coupling compensation amount based on the reconstructed cam table includes: The execution end position data of each slave axis is collected through a distributed IO network. The ideal position of each slave axis is calculated based on the reconstructed cam table and the current master axis position. The execution end position data of each slave axis is compared with the corresponding ideal position to obtain the synchronization error of each slave axis. Based on the timing data of the synchronization errors of each slave axis, calculate the cross-correlation coefficient between the synchronization errors of each slave axis, and establish a multi-axis coupling compensation matrix based on the cross-correlation coefficient. Based on the multi-axis coupling compensation matrix and the synchronization error of each slave axis, the coupling compensation amount of each slave axis is calculated.

7. The electronic cam synchronization compensation method according to claim 6, characterized in that, The step of calculating the cross-correlation coefficient between the synchronization errors of each slave axis based on the timing data of the synchronization errors of each slave axis, and establishing a multi-axis coupling compensation matrix based on the cross-correlation coefficient includes: For each pair of slave axis synchronization error timing data, iterate through different time delay values ​​within the preset time delay range, calculate the correlation coefficient between the corresponding two slave axis error timings at each time delay value, and obtain the correlation coefficient sequence corresponding to each time delay; The maximum value of the correlation coefficient sequence corresponding to each time delay is taken to obtain the maximum cross-correlation coefficient between each pair of slave axes and the corresponding optimal time delay. The maximum cross-correlation coefficient exceeding the preset correlation threshold is written as the coupling coefficient in the corresponding position, and the coefficients that do not exceed the correlation threshold are set to zero to obtain the multi-axis coupling compensation matrix.

8. An electronic cam synchronization compensation device based on distributed I / O, characterized in that, The electronic cam synchronization compensation device based on distributed I / O includes: The status acquisition module is used to acquire status data of the main shaft, slave shaft, and slave shaft execution end corresponding to the electronic cam through a distributed IO network, and calculate the slave shaft drive chain error based on the status data; The prediction and compensation module is used to perform prediction calculations based on the state data, query the theoretical position of the driven shaft in the cam table based on the prediction results, and compensate the theoretical position of the driven shaft according to the error of the driven shaft transmission chain to obtain the driven shaft compensation command. The curve reconstruction module is used to collect material status data through a distributed IO network, calculate the spindle position deviation based on the material status data, and dynamically adjust the cam table based on the spindle position deviation to obtain a reconstructed cam table. The coupling compensation module is used to collect multi-axis execution data through a distributed IO network, calculate the multi-axis coupling compensation amount according to the reconstructed cam table, and synchronously issue the modified slave axis compensation command.

9. An electronic cam synchronization compensation device based on distributed I / O, characterized in that, The electronic cam synchronization compensation device based on distributed I / O includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor invokes the instructions in the memory to cause the distributed I / O-based electronic cam synchronization compensation device to perform the steps of the distributed I / O-based electronic cam synchronization compensation method as described in any one of claims 1-7.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the steps of the electronic cam synchronization compensation method based on distributed I / O as described in any one of claims 1-7.