Electronic cam control method, system and equipment and readable storage medium

By inserting transition key points into the electronic cam technology, smoothing the transition to the modified key points, the problem of slave axis position step caused by real-time adjustment of the main and slave axis position of the cam is solved, and the efficiency of continuous processing is improved.

CN119960375APending Publication Date: 2025-05-09SHENZHEN INVT ELECTRIC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510161041.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

In electronic cam technology, when adjusting the coupling position of the main and slave shaft of the cam in real time, directly modifying the key point information will lead to changes in the cam curve equation, which will in turn cause step changes in the slave shaft position and reduce the machining efficiency in continuous processing scenarios.

Method used

By responding to the modification of the end point of the current running segment of the initial cam table, the cam curve equation of the current running segment is determined, and the transition key point is determined based on the curve equation. Insert the transition key between the starting point of the current running segment and the modified key point, get a new cam table and run for smooth transition.

Benefits of technology

It avoids large-scale position adjustment of the slave shaft in a short time, prevents position step and mechanical impact, improves the smoothness and continuity of the slave shaft movement, and thus improves the processing efficiency in continuous processing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960375A_ABST
    Figure CN119960375A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic cam control method, system and device and a readable storage medium, and the method comprises the steps: responding to the modification of an end point key point of a current operation section of an initial cam table, and determining a cam curve equation of the current operation section; determining transition key points according to the cam curve equation; and updating the end point key point of the current operation section of the initial cam table to the modified key point, and inserting the transition key point between the starting point key point of the current operation section and the modified key point to obtain a new cam table and operate the new cam table. According to the invention, large-amplitude position adjustment of the slave shaft in a short time can be avoided, so that position step and mechanical impact are avoided, the smoothness and continuity of motion of the slave shaft are improved, and the processing efficiency in a continuous processing scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial automation, and in particular to an electronic cam control method, system, device and readable storage medium. Background Art

[0002] In electronic cam technology, a coordinate system is usually established with the master axis position as the X-axis and the slave axis position as the Y-axis, and the cam curve equation is fitted through the key point information input by the user. However, during continuous processing, if the coupling position of the cam master and slave axes needs to be adjusted in real time according to the sensor signal, and the key point to be modified is the current target point of the cam slave axis, directly modifying the key point information will cause the cam curve equation to change. This change may cause the slave axis to be mechanically adjusted according to the new cam curve equation, which in turn causes a step change in the slave axis position, reducing the processing efficiency in continuous processing scenarios.

[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the invention

[0004] The purpose of the present invention is to provide an electronic cam control method, system, device and readable storage medium, which can avoid large-scale position adjustment of the slave axis in a short time, thereby avoiding position steps and mechanical shocks, improving the smoothness and continuity of the slave axis movement, and further improving the processing efficiency in continuous processing scenarios.

[0005] In order to solve the above technical problems, the present invention provides an electronic cam control method, comprising:

[0006] In response to modifying the endpoint key point of the current running segment of the initial cam table, determining a cam curve equation of the current running segment;

[0007] Determine the transition key point according to the cam curve equation;

[0008] The end point key point of the current running segment of the initial CAM table is updated to the modified key point, and the transition key point is inserted between the start point key point of the current running segment and the modified key point to obtain a new CAM table and run it.

[0009] Optionally, determining the transition key point according to the cam curve equation includes:

[0010] Determine a minimum transition distance and a current spindle phase of a spindle of an electronic cam system;

[0011] A transition key point is determined according to the cam curve equation, the minimum transition distance and the current main shaft phase.

[0012] Optionally, determining the modified key point includes:

[0013] In response to the current operation segment being a return segment of the initial cam table, determining a total return segment displacement of a master shaft and a slave shaft of the electronic cam system;

[0014] Determine the main axis modified displacement of the main axis and the slave axis modified displacement of the slave axis according to the total displacement of the return section;

[0015] The modified key point is determined based on the primary axis modified displacement and the secondary axis modified displacement.

[0016] Optionally, determining the modified key point based on the main axis modified displacement and the slave axis modified displacement includes:

[0017] Determining the principal axis phase of the modified key point according to the principal axis modification displacement and the principal axis phase of the starting point key point;

[0018] Determining the slave-axis phase of the modified key point according to the slave-axis modified displacement and the slave-axis phase of the starting point key point;

[0019] Determining the slave axis speed of the modified key point according to the master-slave axis synchronization speed;

[0020] The slave axis acceleration of the key point is 0.

[0021] Optionally, also include:

[0022] Whenever a preset trigger condition is met, the probe latch position of the main axis of the electronic cam system is written and stored in the probe queue;

[0023] Determining the total return displacement of the master and slave axes of the electronic cam system includes:

[0024] When the probe queue is not empty, taking out the first probe latch position from the probe queue;

[0025] Calculating a position difference between a current probe latch position and a first probe latch position;

[0026] The position difference is determined as the total displacement of the return section.

[0027] Optionally, also include:

[0028] After the new cam table is completed, the cyclic cam table is run, and the slave axis speed of the first key point of the cyclic cam table is the same as the slave axis speed of the last key point of the new cam table.

[0029] Optionally, also include:

[0030] In response to the modified key point not being the end point key point of the current running segment of the initial CAM table, the initial CAM table is updated according to the modified key point.

[0031] In order to solve the above technical problems, the present invention also provides an electronic cam control system, comprising:

[0032] A first determination module, configured to determine a cam curve equation of a current running segment in response to modifying an end point key point of a current running segment of an initial cam table;

[0033] A second determination module, used to determine a transition key point according to the cam curve equation;

[0034] The cam table updating module is used to update the end point key point of the current running segment of the initial cam table to the modified key point, and insert the transition key point between the start point key point of the current running segment and the modified key point to obtain a new cam table and run it.

[0035] In order to solve the above technical problems, the present invention further provides an electronic device, comprising:

[0036] Memory for storing computer programs;

[0037] A processor is used to implement the steps of the electronic cam control method as described in any one of the above when executing the computer program.

[0038] To solve the above technical problems, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the electronic cam control method as described in any one of the above are implemented.

[0039] The present invention provides an electronic cam control method. When it is necessary to modify the end point key point of the current running segment of the cam table, a transition key point is first determined using the cam curve equation of the current running segment, and the transition key point is inserted between the starting point key point of the current running segment and the modified key point. When the slave axis moves from the initial key point of the current running segment to the transition key point, there is no position step, and a smooth transition can be achieved. When moving from the transition key point to the modified key point, the new cam curve equation established based on the transition key point and the modified key point moves, ensuring that the slave axis smoothly transitions from the transition key point to the modified key point. This segmented movement method avoids large-scale position adjustment of the slave axis in a short period of time, thereby avoiding position steps and mechanical shocks, improving the smoothness and continuity of the slave axis movement, and further improving the processing efficiency in continuous processing scenarios.

[0040] The present invention also provides an electronic cam control system, an electronic device and a computer-readable storage medium, which have the same beneficial effects as the above-mentioned electronic cam control method. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A flow chart of steps of an electronic cam control method provided by the present invention;

[0043] Figure 2 A schematic diagram of a cam curve provided by the present invention;

[0044] Figure 3 A schematic diagram of an electronic cam system provided by the present invention;

[0045] Figure 4 A flow chart of steps of another electronic cam control method provided by the present invention;

[0046] Figure 5 A schematic diagram of the structure of an electronic cam control system provided by the present invention;

[0047] Figure 6 A schematic diagram of the structure of an electronic device provided by the present invention;

[0048] Figure 7 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0049] The core of the present invention is to provide an electronic cam control method, system, device and readable storage medium, which can avoid large-scale position adjustment of the slave axis in a short time, thereby avoiding position steps and mechanical shocks, improving the smoothness and continuity of the slave axis movement, and further improving the processing efficiency in continuous processing scenarios.

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] First, please refer to Figure 1 The present invention provides an electronic cam control method, comprising:

[0052] S101: In response to modifying the end point key point of the current running segment of the initial cam table, determining a cam curve equation of the current running segment;

[0053] The electronic cam control method provided in this embodiment is applied to an electronic cam system, which includes a main shaft, a slave shaft and a control unit. The main shaft is a reference shaft in the electronic cam system, and its motion law (such as speed, acceleration) determines the motion of the slave shaft. The slave shaft is an axis that operates according to the cam curve equation, wherein the cam curve equation is used to describe the positional relationship between the main shaft and the slave shaft. In the cam curve equation, the phase y of the slave shaft is a function of the phase x of the main shaft, y=f(x), and the control unit is configured to receive an input signal, calculate and output the corresponding control instruction of the slave shaft (including but not limited to the slave shaft phase, slave shaft speed and slave shaft acceleration) according to the cam curve equation and the corresponding control algorithm to drive the slave shaft to move. The input signal includes but is not limited to the phase (position) of the main shaft. As an optional embodiment, the type of the cam curve equation can be a straight line, a cubic curve, a quintic curve, etc. The type of the cam curve equation can be determined according to the curve type selection instruction input by the user, or can be selected independently according to the actual working conditions. Of course, in addition to selecting the above-mentioned curve types, other curve types can also be selected, and this embodiment is not specifically limited here.

[0054] It can be understood that the cam table can be composed of multiple key points, each of which defines parameter information such as the main axis phase x, the slave axis phase y, the slave axis velocity v and the slave axis acceleration a. For example, a key point P in the cam table is:

[0055] ;

[0056] Multiple key points that make up the cam table can be input by the user, which is highly flexible and easy to implement specific motion laws. They can also be dynamically calculated, that is, calculated based on the configured cam curve equation, speed relationship, and acceleration relationship. Of course, the key points that make up the cam table can also be determined by combining user input and automatic calculation. For example, the user inputs some key points according to specific needs. These key points are used to define the motion trajectory of the slave axis during the movement of the main axis in the processing control scenario, such as the starting point, end point and important intermediate points. Then, based on the key points input by the user, a specific motion law (determined by the determined cam curve equation, speed relationship and acceleration relationship) or an optimization algorithm is used to calculate other key points to ensure the smoothness and dynamic performance of the motion. It can be set according to actual engineering needs, and this embodiment is not specifically limited here.

[0057] According to the curve type selected by the user, select the corresponding construction equation to fit the cam curve equation. Taking the quintic curve as an example, the phase of the master and slave axes satisfies the following equation:

[0058] (1);

[0059] By taking the first-order derivative of equation (1), we can obtain the expression of the slave axis velocity v with respect to the master axis phase x:

[0060] (2);

[0061] By taking the second-order derivative of equation (1), we can obtain the expression of the slave axis acceleration a with respect to the master axis phase x:

[0062] (3);

[0063] Determine the main axis phase x of the input starting point in the initial cam table s , slave axis phase y s , slave axis speed v s , slave axis acceleration a s , i.e. the information of the first key point of the initial cam table, determines the spindle phase x of the input end point of the initial cam table e , slave axis phase y e , slave axis speed v e , slave axis acceleration a e , that is, the information of the last key point of the initial cam table. Substituting the information of the above key points into the above equations (1), (2), and (3), the coefficients of the quintic cam curve equation can be obtained. Let , , the relationship between the coefficients of the quintic cam curve equation is as follows:

[0064] (4);

[0065] Substituting the values ​​of the coefficients of the solved quintic curve (i.e., c0, c1, c2, c3, c4, c5) into equations (1), (2), and (3), we can obtain the fitted cam curve equation corresponding to the initial cam table and its velocity and acceleration expressions.

[0066] It can be understood that in this embodiment, the quintic curve is selected to construct the cam curve equation and perform trajectory planning of the slave axis, which can ensure that the position, speed and acceleration of the slave axis are continuous at all times, and its acceleration and deceleration control is smoother, and the load on the motor is also lower, which is suitable for a variety of continuous processing control scenarios, such as printing and packaging, woodworking and other application scenarios. In addition, the quintic curve has higher complexity and more control points, which makes it easier for users to adjust key points according to actual working conditions to achieve more complex and precise motion laws, and can better simulate some complex motion trajectories to meet the diverse motion needs in different industrial scenarios.

[0067] In actual working conditions, the initial cam table can be divided into multiple running sections, including but not limited to waiting section, acceleration section, synchronization section, deceleration section and return section. Figure 2 See Figure 3 , the user sets the synchronization segment length S according to the actual working conditions sync , master-slave synchronous speed n, slave axis travel L1, distance from sensor position to slave axis starting point L2, then we can get:

[0068] Spindle synchronous segment displacement M sync :

[0069] ;

[0070] The displacement S of the acceleration section of the slave axis acc The displacement S of the deceleration section with the slave axis dec :

[0071] ;

[0072] The acceleration section displacement of the spindle M acc Displacement M of the deceleration section with the main axis dec :

[0073] In order to ensure that the acceleration and deceleration stages of the slave axis do not exceed speed or reverse, the displacement of the acceleration and deceleration stages of the master axis is usually set equal to twice the displacement of the acceleration and deceleration stages of the slave axis.

[0074] Spindle waiting segment displacement M wait The judgment conditions are as follows:

[0075] When L2-M acc >0, the spindle waiting segment displacement is: M wait =L2-M acc ;

[0076] When L2-M acc =0, the spindle waiting segment displacement is: M wait =0;

[0077] When L2-M acc When <0, the spindle waiting segment displacement is: Mwait =0;

[0078] At this time, the acceleration section displacement and the deceleration section displacement of the spindle are:

[0079] M acc =M dec =L2;

[0080] The return displacement of the spindle M return Displacement S of the return section from the slave axis return for:

[0081] S return =-(S acc +S dec +S sync );

[0082] M return = -2 × S return ;

[0083] Accordingly, the five key points of the initial cam table are as follows:

[0084] ;

[0085] ;

[0086] ;

[0087] ;

[0088] ;

[0089] ;

[0090] Among them, P0 to P1 is the waiting section, P1 to P2 is the acceleration section, P2 to P3 is the synchronization section, P3 to P4 is the deceleration section, and P4 to P5 is the return section. It can be understood that if the current running section is the waiting section, then the starting key point of the current running section is P0 and the end key point is P1, if the current running section is the acceleration section, then the starting key point of the current running section is P1 and the end key point is P2, if the current running section is the synchronization section, then the starting key point of the current running section is P2 and the end key point is P3, if the current running section is the deceleration section, then the starting key point of the current running section is P3 and the end key point is P4, if the current running section is the return section, then the starting key point of the current running section is P4 and the end key point is P5.

[0091] In some working conditions, in order to achieve certain specific requirements, it is necessary to adjust the parameters of the end point key point of a certain running segment in the initial cam table. If the end point key point to be adjusted is the end point key point of the current running segment, directly modifying the initial cam table will cause the cam curve equation to change. When the cam curve equation is changed, the position setting value of the slave axis will be immediately adjusted according to the new cam curve equation. If there is a large difference between the new key point and the current actual position of the slave axis, it will cause the slave axis to have a position step. Assuming that the slave axis is currently in position A, according to the original cam curve equation, it should move smoothly to position B, but due to the modification of the key point, the new cam curve equation requires it to jump to position C immediately, which causes a position step. The position step and the possible accompanying speed and acceleration mutations will cause the load of the servo motor to increase instantly, exceeding its normal working range. In order to protect the motor and equipment, the servo motor control system will detect this abnormal situation and trigger an alarm, causing the equipment to stop running. For example, the current of the motor will increase sharply due to sudden position changes. When the set current threshold is exceeded, a servo alarm will be generated.

[0092] If the new cam curve equation causes the speed setting value of the slave axis to suddenly increase significantly, and the servo motor control system cannot effectively and timely control this speed change, the slave axis may operate at a speed far higher than the normal working speed, causing a runaway phenomenon, which will not only damage the processed products but may also cause serious safety accidents, such as causing mechanical parts to derail and damaging other parts of the equipment.

[0093] Based on this, when the present embodiment detects that the end point key point of the current running segment of the initial cam table of the electronic cam system is modified, the initial cam table is not directly updated based on the modified key point, but the cam curve equation of the current running segment is first determined so as to construct the transition key point based on the cam curve equation. It can be understood that, assuming that it is detected that the end point key point of the return segment of the initial cam table is currently modified, and the current running segment is a waiting segment, there is no need to determine the cam curve equation of the current running segment, and the modified key point will not affect the slave axis motion of the current running segment (i.e., the waiting segment), and the initial cam table can be directly updated based on the modified key point.

[0094] As an optional embodiment, it also includes:

[0095] Get the real-time phase of the main axis of the electronic cam system;

[0096] The current running segment of the initial cam table is determined according to the range of the real-time phase of the main axis.

[0097] Specifically, after determining each key point, each operation segment has its own corresponding spindle phase range. According to the spindle phase range where the real-time phase of the spindle is located, the current operation segment of the initial cam table can be determined. Assuming that the end point key point of the return segment is modified, if the current real-time phase of the spindle is in the spindle phase range corresponding to the synchronization segment, it means that the electronic cam system is currently running in the synchronization segment, and the end point key point of the current operation segment is not modified. At this time, the initial cam table is directly updated based on the modified key point and the cam table is refreshed; if the current real-time phase of the spindle is in the spindle phase range corresponding to the return segment, it means that the electronic cam system is currently running in the return segment, and the modified key point is the end point key point of the current operation segment. At this time, the cam curve equation of the return segment needs to be determined first, so as to avoid position steps and sudden changes in speed and acceleration by introducing transition key points later. It can be understood that determining the current operation segment of the initial cam table by the real-time phase of the spindle avoids complex timing analysis and multi-condition judgment, and greatly simplifies the control logic.

[0098] Of course, in addition to using the real-time phase of the main shaft to determine the current operating segment of the initial cam table, it is also possible to determine the operating segment corresponding to the current time point through the system clock based on the timing relationship between the preset time axis and the operating segment, or to monitor the position of the slave shaft in real time through an encoder or sensor, and determine the current operating segment in combination with the preset position range of the cam table. The selection can be based on actual engineering needs, and this embodiment is not specifically limited here.

[0099] As an optional embodiment, the real-time position of the main shaft of the electronic cam system may be acquired through an encoder or a sensor, and the real-time phase of the main shaft may be calculated according to the real-time position and a preset offset parameter.

[0100] As an optional embodiment, determining the cam curve equation of the current operation segment includes: determining a relationship between coefficients in the cam curve equation according to all key points in a cam table of the electronic cam system;

[0101] The cam curve equation of the current running segment is obtained according to the starting key point and the ending key point of the current running segment and the relationship between various coefficients.

[0102] Specifically, assuming that the current running segment is the return segment, the starting key point of the current running segment is P4, and the ending key point is P5. Substitute the information of P4 and P5 (main axis phase, slave axis phase, slave axis speed, slave axis acceleration) into the relationship between the coefficients in the cam curve equation, that is, substitute into equation (4). It can be understood that at this time , , get the values ​​of the coefficients of the cam curve equation of the current operation segment, substitute the values ​​of the coefficients into equations (1), (2), and (3), and you can get the relationship between the slave phase, slave speed, and slave acceleration with respect to the master phase in the current operation segment:

[0103] , (5).

[0104] S102: determining a transition key point according to a cam curve equation;

[0105] In this embodiment, the transition key point representation is used to describe the key points with transition properties in the motion trajectory of the slave axis in the processing control scenario. The transition key point not only defines the motion trajectory of the slave axis during the motion of the main axis, but also has the characteristic of smoothly transitioning from one motion state to another.

[0106] According to the cam curve equation of the current running segment, a transition key point P' is determined. The transition key point P' is at a certain middle position of the current running segment. Since the transition key point P' is a key point constructed based on the original cam curve equation, the phase, speed and acceleration of the transition key point are close to the actual state of the current slave axis, thereby ensuring that the slave axis can transition smoothly. For example, the midpoint x of the main axis phase between key point P4 and key point P5 can be selected. t , then x t Substituting into formula (5), we can get y t 、v t and a t ,Right now:

[0107] ;

[0108] Of course, the transition key point P' can also select other positions to ensure that the slave axis has sufficient conditions to adjust the relevant parameters, ensure the continuity of the slave axis's phase, speed and acceleration at the transition key point, and the system can respond quickly and adjust to a new motion state to avoid mechanical shock or servo motor alarm. It can be adjusted according to actual needs and system characteristics, and this embodiment is not specifically limited here.

[0109] S103: updating the end point key point of the current running segment of the initial cam table to the modified key point, and inserting the transition key point between the start point key point of the current running segment and the modified key point, obtaining a new cam table and running it.

[0110] In this embodiment, the initial cam table is updated according to the transition key point and the modified key point, P5 is replaced by the modified key point P5', P' is inserted between P4 and P5', and a new cam table is obtained. The new cam table has one more transition key point than the number of points planned in the initial cam table. The transition key point can make the slave axis smoothly transition to the modified key point, and the slave axis will not cause a sudden change in position due to the change of the end point key point of the current running segment. The new cam table is as follows:

[0111] ;

[0112] ;

[0113] ;

[0114] ;

[0115] ;

[0116] ;

[0117] ;

[0118] It can be understood that after running the new cam table (i.e. refreshing the cam table), the slave axis first moves from P4 to P' and then from P' to P5', decomposing the movement of the slave axis from a large position step into two smaller smooth segments, thereby avoiding mutations.

[0119] Specifically, from P4 to P', since the slave phase, slave acceleration and slave speed of P' are calculated based on the cam curve equation of the current running segment, the transition from P4 to P' is smooth, and the phase, speed and acceleration are continuous at P'; from P' to P5', P' is taken as the starting key point and P5' is taken as the end key point and substituted into formula (4) to obtain the new values ​​of each coefficient, and then the new values ​​of each coefficient are substituted into formula (1) to obtain the new cam curve equation. Since the new cam curve equation is recalculated based on the parameters of P' and P5', the transition from P' to P5' is also smooth, and the phase, speed and acceleration are continuous at P' and P5'.

[0120] In a continuous processing scenario, when it is necessary to adjust the position of the cam master-slave axis coupling in real time according to the sensor signal, and the modified key point is the end point key point of the current running segment, the solution of this embodiment is adopted to introduce the transition key point. By planning the movement of the slave axis in segments, it is ensured that the movement of the slave axis maintains a smooth transition at the transition key point to avoid sudden changes in position, speed and acceleration, thereby improving the dynamic response capability and stability of the system and improving the processing efficiency in the continuous processing scenario.

[0121] It can be seen that in this embodiment, when it is necessary to modify the end point key point of the current running segment of the cam table, a transition key point is first determined using the cam curve equation of the current running segment, and the transition key point is inserted between the starting point key point of the current running segment and the modified key point. When the slave axis moves from the initial key point of the current running segment to the transition key point, there is no position step, and a smooth transition can be achieved. When moving from the transition key point to the modified key point, the new cam curve equation established based on the transition key point and the modified key point moves to ensure that the slave axis smoothly transitions from the transition key point to the modified key point. This segmented movement method avoids large position adjustments of the slave axis in a short period of time, thereby avoiding position steps and mechanical shocks, improving the smoothness and continuity of the slave axis movement, and thereby improving the processing efficiency in continuous processing scenarios.

[0122] Based on the above embodiments:

[0123] In an exemplary embodiment, determining the transition key point according to the cam curve equation includes:

[0124] Determine a minimum transition distance and a current spindle phase of a spindle of an electronic cam system;

[0125] The transition key point is determined according to the cam curve equation, the minimum transition distance and the current main axis phase.

[0126] In this embodiment, the current spindle phase M of the spindle is first determined. phase And the minimum transition distance L buffer , according to the current spindle phase M phase And the minimum transition distance L buffer Determine the principal axis phase x of the transition key point t , x t =M phase +L buffer , x t Substituting into equation (5), we can get the slave axis phase y at the transition key point: t , Slave axis speed v t and the slave axis acceleration a t Among them, in the continuous processing scenario, the minimum transition distance refers to the minimum distance that must be maintained between two adjacent motion segments in order to achieve a smooth transition. This distance is used to ensure that when transitioning from one motion state to another, a sudden change in speed or acceleration can be avoided while meeting the processing accuracy requirements.

[0127] It can be understood that by setting a minimum transition distance L buffer, which can ensure that the slave axis has enough transition time to adjust its motion parameters (phase, speed and acceleration) to achieve a smooth transition. Considering that in some working conditions, the transition distance is too short and the slave axis may not be able to adjust to the new motion state in a short time, resulting in a sudden change in position, speed or acceleration, by setting L buffer , ensuring that the position of the transition key point is far enough away from the current spindle position, can avoid mechanical shock caused by sudden changes in position, speed or acceleration, so as to improve the stability and reliability of the system and ensure the smoothness of movement.

[0128] As an optional embodiment, determining the minimum transition distance includes:

[0129] Determine the minimum transition distance corresponding to the current run.

[0130] Specifically, different L can be set in different operation sections or different motion states. buffer The minimum transition distance can be set to meet different control requirements, so as to flexibly adapt to different application scenarios and achieve smooth transition. Of course, the minimum transition distance can also be a fixed value, so as to simplify the control logic and improve the efficiency of obtaining the transition key points.

[0131] As another optional embodiment, determining the minimum transition distance includes:

[0132] Determine the maximum speed of the slave axis;

[0133] The minimum transition distance is obtained based on the maximum speed and a preset number of current bus cycle lengths.

[0134] Specifically, the minimum transition distance can be obtained by multiplying the maximum speed of the slave axis by the duration of 3 to 4 bus cycles. By considering the maximum speed of the slave axis, it can be ensured that in the most extreme case, the slave axis has enough time to adjust its motion parameters (position, speed and acceleration) to achieve a smooth transition. By dynamically adjusting the transition distance, the dynamic response capability of the electronic cam system is improved. Of course, the preset number can be adjusted according to the actual working conditions. For example, different multiples can be set in different operating segments or different motion states to adapt to different control requirements.

[0135] In an exemplary embodiment, determining the modified key points includes:

[0136] In response to the current running segment being the return segment of the initial cam table, determining the return segment total displacement of the master axis and the slave axis of the electronic cam system;

[0137] Determine the main axis modified displacement of the main axis and the slave axis modified displacement of the slave axis according to the total displacement of the return section;

[0138] The modified key points are determined based on the primary axis modification displacement and the secondary axis modification displacement.

[0139] In this embodiment, in the continuous processing scenario, each time the processing is completed, the slave axis needs to return to the starting point before the next processing is carried out, which reduces the processing efficiency. To avoid the need for the slave axis to frequently return to the starting point in the continuous processing scenario, this frequent return to the starting point operation not only increases unnecessary movement time, but also reduces the overall processing efficiency. In order to improve the efficiency of continuous processing, this embodiment adjusts the position of the cam master-slave axis coupling in real time according to the triggering of the sensor signal. Specifically, the key point of the end point of the return section is dynamically modified so that the slave axis can directly enter the next processing after the processing is completed without returning to the starting point, thereby realizing continuous processing.

[0140] Specifically, in order to achieve processing efficiency in a continuous processing scenario, this embodiment determines the total displacement of the return section of the main axis and the slave axis in the return section, so as to understand the distance that the main axis and the slave axis need to move after each processing is completed, so that they can return to the starting position of the next processing. Specifically, the total displacement of the return section can be calculated by direct measurement, model calculation, numerical integration, or machine vision system, etc., which can be selected according to actual engineering needs. This embodiment does not make specific restrictions here. The key point of the end point of the return section is dynamically adjusted according to the total displacement of the return section, that is, the modified key point is determined, so that after completing one processing, it does not need to return completely to the starting point, but directly enters the position of the next processing.

[0141] As an optional embodiment, the adjustment of the parameters of the endpoint key point can be based on user settings or can be automatically adjusted. return =dS return ', where d is the total displacement of the return section, M return 'Modify the displacement of the main axis, S return ' is the slave axis modification displacement. The slave axis modification displacement can be opened as a parameter for users to set. The main axis modification displacement can be calculated according to the above relationship. The corresponding relationship between the main axis modification displacement and the slave axis modification displacement can also be directly set, such as M return ':S return '=2:1, and then determine the modified displacement of the main axis and the modified displacement of the slave axis based on this corresponding relationship and the total displacement of the return segment. After calculating the modified displacement of the main axis and the modified displacement of the slave axis, the new main axis phase and the new slave axis phase can be determined, thereby determining the new end point key point of the return segment.

[0142] In an exemplary embodiment, determining the modified key point based on the primary axis modified displacement and the secondary axis modified displacement includes:

[0143] According to the spindle modification displacement and the spindle phase of the starting point key point, the spindle phase of the modified key point is determined;

[0144] According to the slave axis modified displacement and the slave axis phase of the starting point key point, the slave axis phase of the modified key point is determined;

[0145] Determine the slave axis speed of the modified key point according to the master-slave axis synchronization speed;

[0146] The acceleration of the slave axis of the key point is 0.

[0147] In this embodiment, the current running segment is still taken as the return segment as an example, and the modified spindle phase x5' of the key point is the spindle phase x4 of the starting point key point P4 of the current running segment and the spindle modified displacement M return ', that is, x5'=x4+M return ', the modified slave axis phase y5' of the key point is the slave axis phase y4 of the key point P4 at the start of the current running segment and the slave axis modified displacement S return ', that is, y5'=y4+S return ', the speed of the modified key point needs to be equal to the master-slave axis synchronization speed n, to ensure that there is no need to enter the acceleration phase when switching to the cyclic cam table, then the new cam table point P5' is as follows:

[0148] .

[0149] In an exemplary embodiment, it further includes:

[0150] Whenever the preset trigger condition is met, the probe latch position of the main axis of the electronic cam system is written and stored in the probe queue;

[0151] Determining the total return displacement of the master and slave axes of the electronic cam system includes:

[0152] When the probe queue is not empty, take out the first probe latch position from the probe queue;

[0153] Calculate the position difference between the current probe latch position and the first probe latch position;

[0154] The position difference is determined as the total displacement of the return segment.

[0155] In this embodiment, the sensor signal is connected to the servo probe to detect the position signal of the cam in real time. The position of the probe sensor is as follows: Figure 3As shown. Specifically, the PLC receives signals from the servo probe through the communication interface. The signals include but are not limited to the position information of the cam, the status of the probe, etc. There is a queue inside the PLC for storing the latched spindle position. Each time a new position signal is received, the signal is stored in the queue, that is, the latched position of the spindle probe is stored in a probe queue. The probe queue is managed according to the first-in-first-out principle. Since the queue can cache multiple probe position signals, even if multiple signals arrive at the same time in a short period of time, the PLC can process them one by one without signal loss. This mechanism is suitable for high-speed cam systems and can ensure that each probe signal is accurately recorded and processed.

[0156] When a new probe signal is connected, if the probe queue is empty, set the cam completion flag and wait for the next probe signal. If the probe queue is not empty, according to the current probe latch position P probe Subtract the last probe latch position P last_probe , that is, the distance d between two consecutive probe signals can be calculated. This distance can be regarded as the total return displacement of the main axis and the slave axis, that is, the main axis modification displacement M return ' and modify the displacement S from the axis return By accurately measuring the distance between continuous probe signals, the total displacement of the return section of the main axis and the slave axis can be determined more accurately, thereby improving the positioning accuracy of the entire system. In a high-speed cam system, multiple probe signals can be processed in real time to ensure that the signal is not lost, which is suitable for high-speed continuous processing scenarios.

[0157] The preset trigger condition may specifically be that the main axis or the slave axis reaches a predetermined position to indicate the completion of a processing action or to prepare for the start of the next processing action.

[0158] In an exemplary embodiment, it further includes:

[0159] When the new cam table is finished, run the cyclic cam table. The slave axis speed at the first key point of the cyclic cam table is the same as the slave axis speed at the last key point of the new cam table.

[0160] In this embodiment, considering that in a continuous processing scenario, the movement of the slave axis needs to maintain a precise synchronization relationship with the main axis, after running the entire cam table, the slave axis needs to accurately return to the initial position at the end of the return segment in order to enter the next processing cycle. Therefore, this embodiment sets a cyclic cam table, the starting point of which coincides with the end point of the previous cam table, and is composed of a synchronization segment, a deceleration segment, and a return segment. The calculation method is consistent with the calculation method of the single-cycle cam table. By running the cyclic cam table, it can be ensured that the slave axis can smoothly transition to the synchronization segment of the next cycle at the end of each cycle, avoiding processing errors or equipment failures caused by sudden motion changes.

[0161] In summary, refer to Figure 4 As shown, Figure 4 The present invention provides a flow chart of the steps of another electronic cam control method. After the electronic cam system is started, the probe signal is detected, the single-cycle cam table (i.e., the initial cam table in this embodiment) is run, the cam running flag is set, and it is determined whether the probe queue is empty. If so, the cam completion flag is set. If not, the probe latch value is obtained, and the distance between the two front and rear probe latch positions is calculated. It is determined whether the modified key point is the end point of the current running segment. If not, the cam key point is directly modified, the cam completion flag is detected, and the cyclic cam table is run. If so, the transition key point is calculated, the transition key point and the end point key point are modified, the cam completion flag is detected, and the cyclic cam table is run. After the cam is completed, the step of determining whether the probe queue is empty is entered.

[0162] Assume that the side hole drilling requirements of a woodworking machinery factory are as follows: processing speed: 28m / min; processing accuracy: ±0.2mm; processing a variety of boards and a variety of hole types;

[0163] The processing principle of this machine is: the front station will make a positioning hole at the position that needs to be processed, and then the laser sensor of the machine will monitor the positioning hole and give the signal to the servo driver probe signal input to lock the spindle position, and the rear-end tracking servo motor will process according to the probe latch position. In the related technical solution, the slave axis needs to return to the origin before the next probe signal after each processing, which often requires a minimum hole spacing. If the interval between two consecutive vacancies is smaller than this interval, the second hole will be missed, resulting in a board that needs to be processed twice.

[0164] When this solution is applied to a woodworking measurement and control hole drilling machine, the slave axis does not need to return to the origin immediately after each processing is completed. While ensuring that the slave axis position is within its working range, continuous processing can be performed to improve processing efficiency.

[0165] Second, please refer to Figure 5 The present invention also provides an electronic cam control system, comprising:

[0166] A first determination module 11, for determining a cam curve equation of a current running segment in response to modifying an end point key point of a current running segment of an initial cam table;

[0167] A second determination module 12, for determining a transition key point according to a cam curve equation;

[0168] The cam table updating module 13 is used to update the end point key point of the current running segment of the initial cam table to the modified key point, and insert the transition key point between the start point key point of the current running segment and the modified key point to obtain a new cam table and run it.

[0169] It can be seen that in this embodiment, when it is necessary to modify the end point key point of the current running segment of the cam table, a transition key point is first determined using the cam curve equation of the current running segment, and the transition key point is inserted between the starting point key point of the current running segment and the modified key point. When the slave axis moves from the initial key point of the current running segment to the transition key point, there is no position step, and a smooth transition can be achieved. When moving from the transition key point to the modified key point, the new cam curve equation established based on the transition key point and the modified key point moves to ensure that the slave axis smoothly transitions from the transition key point to the modified key point. This segmented movement method avoids large position adjustments of the slave axis in a short period of time, thereby avoiding position steps and mechanical shocks, improving the smoothness and continuity of the slave axis movement, and thereby improving the processing efficiency in continuous processing scenarios.

[0170] In an exemplary embodiment, determining the transition key point according to the cam curve equation includes:

[0171] Determine a minimum transition distance and a current spindle phase of a spindle of an electronic cam system;

[0172] The transition key point is determined according to the cam curve equation, the minimum transition distance and the current main axis phase.

[0173] In an exemplary embodiment, it further includes:

[0174] A third determination module is used to determine the total displacement of the return section of the master shaft and the slave shaft of the electronic cam system in response to the current operation section being the return section of the initial cam table;

[0175] A fourth determination module is used to determine the main axis modification displacement of the main axis and the slave axis modification displacement of the slave axis according to the total displacement of the return segment;

[0176] The fifth determination module is used to determine the modified key point based on the main axis modification displacement and the slave axis modification displacement.

[0177] In an exemplary embodiment, determining the modified key point based on the primary axis modified displacement and the secondary axis modified displacement includes:

[0178] According to the spindle modification displacement and the spindle phase of the starting point key point, the spindle phase of the modified key point is determined;

[0179] According to the slave axis modified displacement and the slave axis phase of the starting point key point, the slave axis phase of the modified key point is determined;

[0180] Determine the slave axis speed of the modified key point according to the master-slave axis synchronization speed;

[0181] The acceleration of the slave axis of the key point is 0.

[0182] In an exemplary embodiment, it further includes:

[0183] A latch module, used for writing and storing the probe latch position of the main axis of the electronic cam system into the probe queue whenever a preset trigger condition is met;

[0184] Determining the total return displacement of the master and slave axes of the electronic cam system includes:

[0185] When the probe queue is not empty, take out the first probe latch position from the probe queue;

[0186] Calculate the position difference between the current probe latch position and the first probe latch position;

[0187] The position difference is determined as the total displacement of the return segment.

[0188] In an exemplary embodiment, it further includes:

[0189] The control module is used to run the cyclic cam table after the new cam table is completed, and the slave axis speed of the first key point of the cyclic cam table is the same as the slave axis speed of the last key point of the new cam table.

[0190] In an exemplary embodiment, the CAM table updating module 13 is further configured to update the initial CAM table according to the modified key point in response to the modified key point not being the end point key point of the current running segment of the initial CAM table.

[0191] For three aspects, please refer to Figure 6 The present invention also provides an electronic device, comprising:

[0192] A memory 21, used for storing computer programs;

[0193] The processor 22 is used to implement the steps of the electronic cam control method described in any one of the above embodiments when executing the computer program.

[0194] The electronic device also includes:

[0195] The input interface 23 is connected to the processor 22 via the communication bus 26, and is used to obtain the computer programs, parameters and instructions imported from the outside, and save them in the memory 21 under the control of the processor 22. The input interface can be connected to an input device to receive parameters or instructions manually input by the user. The input device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the terminal housing.

[0196] The display unit 24 is connected to the processor 22 via the communication bus 26 and is used to display the data sent by the processor 22. The display unit can be a liquid crystal display or an electronic ink display.

[0197] The network port 25 is connected to the processor 22 via the communication bus 26, and is used to communicate with various external terminal devices. The communication technology used in the communication connection can be a wired communication technology or a wireless communication technology, such as mobile high-definition link technology, universal serial bus, high-definition multimedia interface, wireless fidelity technology, Bluetooth communication technology, low-power Bluetooth communication technology, communication technology based on IEEE802.11s, etc.

[0198] For an introduction to an electronic device provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.

[0199] The electronic equipment provided by the present invention has the same beneficial effects as the above-mentioned electronic cam control method.

[0200] Fourth, please refer to Figure 7 The present invention further provides a computer-readable storage medium 30, on which a computer program 31 is stored. When the computer program 31 is executed by a processor, the steps of the electronic cam control method described in any one of the above embodiments are implemented.

[0201] The computer-readable storage medium 30 may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0202] For an introduction to a computer-readable storage medium provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.

[0203] A computer-readable storage medium provided by the present invention has the same beneficial effects as the above-mentioned electronic cam control method.

[0204] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the electronic cam control method described in any one of the embodiments above.

[0205] For an introduction to a computer program product provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.

[0206] A computer program product provided by the present invention has the same beneficial effects as the above-mentioned electronic cam control method.

[0207] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0208] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An electronic cam control method, characterized in that: include: In response to modifying the endpoint key point of the current running segment of the initial cam table, determining a cam curve equation of the current running segment; Determine the transition key point according to the cam curve equation; The end point key point of the current running segment of the initial CAM table is updated to the modified key point, and the transition key point is inserted between the start point key point of the current running segment and the modified key point to obtain a new CAM table and run it.

2. The electronic cam control method according to claim 1, characterized in that: Determining the transition key point according to the cam curve equation includes: Determine a minimum transition distance and a current spindle phase of a spindle of an electronic cam system; A transition key point is determined according to the cam curve equation, the minimum transition distance and the current main shaft phase.

3. The electronic cam control method according to claim 1, characterized in that: The key points to determine the modifications include: In response to the current operation segment being a return segment of the initial cam table, determining a total return segment displacement of a master shaft and a slave shaft of the electronic cam system; Determine the main axis modified displacement of the main axis and the slave axis modified displacement of the slave axis according to the total displacement of the return section; The modified key point is determined based on the primary axis modified displacement and the secondary axis modified displacement.

4. The electronic cam control method according to claim 3, characterized in that: Determining the modified key point based on the main axis modified displacement and the slave axis modified displacement includes: Determining the principal axis phase of the modified key point according to the principal axis modification displacement and the principal axis phase of the starting point key point; Determining the slave-axis phase of the modified key point according to the slave-axis modified displacement and the slave-axis phase of the starting point key point; Determining the slave axis speed of the modified key point according to the master-slave axis synchronization speed; The slave axis acceleration of the key point is 0.

5. The electronic cam control method according to claim 3, characterized in that: Also includes: Whenever a preset trigger condition is met, the probe latch position of the main axis of the electronic cam system is written and stored in the probe queue; Determining the total return displacement of the master and slave axes of the electronic cam system includes: When the probe queue is not empty, taking out the first probe latch position from the probe queue; Calculating a position difference between a current probe latch position and a first probe latch position; The position difference is determined as the total displacement of the return section.

6. The electronic cam control method according to claim 5, characterized in that: Also includes: After the new cam table is completed, the cyclic cam table is run, and the slave axis speed of the first key point of the cyclic cam table is the same as the slave axis speed of the last key point of the new cam table.

7. The electronic cam control method according to any one of claims 1 to 6, characterized in that: Also includes: In response to the modified key point being not the end point key point of the current running segment of the initial CAM table, the initial CAM table is updated according to the modified key point.

8. An electronic cam control system, characterized in that: include: A first determination module, configured to determine a cam curve equation of a current running segment in response to modifying an end point key point of a current running segment of an initial cam table; A second determination module, used to determine a transition key point according to the cam curve equation; The cam table updating module is used to update the end point key point of the current running segment of the initial cam table to the modified key point, and insert the transition key point between the start point key point of the current running segment and the modified key point to obtain a new cam table and run it.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the electronic cam control method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the electronic cam control method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Electronic cam control method, system and device and storage medium

    CN121028667A