A control program of a cold roll forming machine chasing system and a virtual debugging method thereof

By establishing a virtual model of the cold bending forming machine's tracking shearing system and designing an electronic cam partition mapping system, the problems of long debugging cycles and low precision in traditional cold bending forming machines were solved. This enabled the optimization of control logic in a virtual environment, improving shearing accuracy and equipment stability, and reducing reliance on and costs for on-site debugging.

CN121143176BActive Publication Date: 2026-02-24CANGZHOU ZHONGTUO COLD FORMING EQUIP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511631635.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-24
Estimated Expiration
2045-11-10

AI Technical Summary

Technical Problem

Traditional cold bending forming machines have long debugging cycles and high costs for their shearing mechanisms. The shearing trigger is inaccurate and the return motion is unstable. They rely on manual experience and have poor flexibility.

Method used

A virtual model of the shearing system of the cold bending forming machine was established, a PLC control program was written, an electronic cam partition mapping design was adopted, and the control logic was optimized through virtual simulation and real-time communication to achieve precise control of synchronous and return motion.

Benefits of technology

Performing control logic verification and parameter optimization in a virtual environment reduces reliance on on-site debugging, improves shearing accuracy and operational reliability, shortens the debugging cycle, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121143176B_ABST
    Figure CN121143176B_ABST
Patent Text Reader

Abstract

The present application relates to the field of virtual debugging, and specifically discloses a control program of a cold bending machine chasing shearing system and a virtual debugging method thereof, comprising: S1, establishing a virtual model containing a feeding mechanism, a shearing mechanism, a servo driver and a photoelectric sensor in an NX MCD environment, the model outputting accumulated feeding length and sensor signals, and receiving cutter position setting; S2, writing a chasing shearing program for an S7-1200 PLC in TIA Portal; S3, establishing two-way communication between the NX MCD and the PLC through OPC, mapping the accumulated feeding length and the sensor signals as PLC inputs, and mapping the cutter position setting output by the PLC as the servo input of the NX MCD; and S4, synchronously simulating both, and optimizing the control logic and parameters based on model feedback, with the goal of minimizing fixed-length error and motion instability. The present application solves the problems of long traditional on-site debugging cycle, high cost, inaccurate shearing triggering and unstable return, and improves shearing precision and operation reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of virtual debugging technology, specifically to a control program and virtual debugging method for a cold bending forming machine's shearing system. Background Technology

[0002] Cold bending forming machines are typical continuous production equipment. Their shearing mechanisms need to move synchronously with the main machine during high-speed material feeding to ensure the accuracy of fixed-length cutting. Traditional shearing methods mostly rely on mechanical cams or fixed logic control, which have high structural rigidity and poor flexibility. When the production cycle or product specifications change, the mechanism or program needs to be adjusted frequently, resulting in long debugging cycles and low efficiency.

[0003] With the development of electronic cams and virtual simulation technology, replacing mechanical cams with servo drives and software algorithms has become a trend. Electronic cams can flexibly define motion curves, improving the adjustability and adaptability of the system. However, in practical applications, problems still exist such as the difficulty in accurately determining the shear trigger timing, unstable return motion, and reliance on manual experience for debugging. Therefore, there is an urgent need for a debugging method that combines virtual modeling and control optimization to verify and optimize the control logic in advance in a simulation environment, reducing the difficulty of on-site debugging. Summary of the Invention

[0004] To address the aforementioned problems in the prior art, this invention provides a control program and virtual debugging method for a cold bending forming machine's tracking shearing system. This effectively solves the problems of long on-site debugging cycles, high costs, inaccurate shearing triggering, and unstable return in traditional methods, thereby reducing on-site debugging costs and cycles, and improving shearing accuracy and operational reliability.

[0005] To achieve the above objectives, this invention proposes a control program and its virtual debugging method for a cold bending forming machine's tracking shearing system, comprising:

[0006] S1. Establish a virtual model of the cold bending forming machine's tracking and shearing system. A virtual model of the cold bending forming machine's tracking and shearing system is established in the NXMCD environment using a virtual modeling module. The virtual model includes a feeding mechanism, a shearing mechanism, a servo driver, and photoelectric sensors. The virtual model outputs the cumulative feeding length. With sensor signals and receive the cutter position setting. ;

[0007] S2. Write the PLC tracking and shearing system control program. Using the control program development module in TIA Portal, write the tracking and shearing control program for the S7-1200 PLC. Divide the cam into a synchronization zone and a return zone. The synchronization zone uses a linear mapping, and the return zone uses a fifth-order polynomial mapping. The written tracking and shearing control program includes electronic cam function blocks and establishes a master-slave mapping relationship.

[0008] ;

[0009] In the formula, For the cutter to start from the target position on the axis, The cumulative feed length is the spindle position;

[0010] S3. Establish a real-time communication channel. Through the communication connection module, establish a bidirectional communication channel between the NX MCD and the PLC based on OPC. and Mapping to PLC input variables, and converting PLC outputs to PLC input variables. Mapped to servo control inputs of the NX MCD;

[0011] S4. Co-simulation and virtual debugging: Through the debugging and optimization module, NX MCD and PLC simulation are run synchronously, so that the PLC program controls the virtual model and verifies and optimizes the control logic, parameters and performance based on the feedback of the virtual model. The optimization goal is to minimize the fixed length error and motion instability at the same time.

[0012] Preferably, in S1, the cumulative feeding length The feed length increment is calculated from the encoder pulse count under discrete sampling period. The specific process is as follows: based on the encoder pulse count, encoder pulse count per revolution and feed roller circumference collected in each sampling period, calculate the feed length increment for each period, and accumulate the feed length increments for all periods to obtain the cumulative feed length.

[0013] Preferably, in S2, the electronic cam is adjusted according to the feeding length. The segment is defined as a synchronization area and a return area, wherein the synchronization area is... The cutter's target position from the axis is:

[0014] ;

[0015] In the formula, As the starting point of the synchronization zone, The end point of the synchronization zone, This is the origin position of the cutter;

[0016] The return area is The cutter's target position from the axis is:

[0017] ;

[0018] In the formula, As the starting point of the return zone, The return zone is the final destination. The coefficients are those of a fifth-degree polynomial; where The second-order continuity is ensured by determining the boundary conditions of displacement, velocity, and acceleration at the start and end points of the return zone.

[0019] Preferably, the coefficients of the fifth-order polynomial in the return region are determined by satisfying six boundary conditions, and the coefficients are obtained by constructing a system of linear equations by substituting the above boundary conditions into the polynomial equation. The six boundary conditions are:

[0020] At the start of the return zone Place, ;

[0021] At the end of the return zone Place, .

[0022] Preferably, when solving the coefficients of the fifth-order polynomial in the return region, the independent variable is normalized. The specific process is as follows: the physical interval of the feeding length is mapped to the standard interval, and a fifth-order polynomial with respect to the normalized independent variable is constructed; a system of linear equations is constructed based on the normalized polynomial and the boundary conditions, and the normalized coefficients are obtained by solving the system; then, the coefficients of the fifth-order polynomial under the original physical interval are determined by inverse variable mapping.

[0023] Preferably, in S2, the step of writing a tracking and shearing control program for the S7-1200 PLC in TIA Portal requires that the triggering of the cam, which is divided into a synchronization zone and a return zone, simultaneously meet two conditions: first, the cumulative feeding length reaches or exceeds the preset trigger position setting value; second, the photoelectric sensor detects that the material is in place and outputs a valid signal. Furthermore, a de-jittering time is set in the triggering determination, requiring that the duration of the valid sensor signal exceeds the de-jittering time before the triggering is finally executed.

[0024] Preferably, in S4, the process of verifying and optimizing the control logic, parameters, and performance based on virtual model feedback is as follows:

[0025] Constructing a comprehensive objective function The process involves minimizing the comprehensive objective function through a debugging and optimization module. This achieves iterative optimization of the control parameters, and the objective function is:

[0026] ;

[0027] In the formula, and This is a weighting coefficient used to balance the two performance indicators of shear length accuracy and motion smoothness. For cutting length, The target length.

[0028] Preferably, in S4, the collaborative simulation and virtual debugging includes boundary testing and fault testing, wherein the boundary testing is for gradually improving the feeding accuracy. Simulations were run at different speed levels, and the results of constant-length shearing were recorded. The peak acceleration performance index of the servo mechanism; the fault test simulates sensor signal abnormality or encoder pulse loss fault in NX MCD to verify whether the safety logic and fault handling program in the PLC control program are executed correctly.

[0029] Preferably, the specific work of the virtual modeling module is as follows: defining the physical structure and motion pairs of the feeding mechanism, shearing mechanism, servo driver and photoelectric sensor in the NX MCD environment, configuring the signal interaction interface between each component, and the virtual model has the function of real-time output of cumulative feeding length signal and sensor status signal, receiving external cutter position control command, and matching the dynamic response logic of the actual equipment.

[0030] Preferably, the specific working logic of the communication connection module is as follows: a bidirectional data exchange channel is established between the NX MCD virtual environment and the PLC controller using the OPC UA protocol, defining the format and cycle of data interaction; the cumulative feeding length signal and sensor signal output by the virtual model are mapped to the input variables of the PLC, and the cutter shaft target position signal calculated by the PLC according to the control program is mapped to the position control input of the servo driver in the NX MCD, thereby realizing closed-loop data interaction.

[0031] Therefore, this invention proposes a control program and virtual debugging method for a cold bending forming machine's follow-up shearing system, the beneficial effects of which are as follows:

[0032] (1) By constructing a collaborative simulation environment of virtual model and control program, control logic verification and parameter optimization can be completed before physical equipment is put into production, avoiding the limitations of relying on physical equipment in traditional on-site debugging, reducing downtime losses caused by repeated trial and error, significantly shortening the debugging cycle and reducing manpower and material costs.

[0033] (2) The electronic cam adopts a partitioned mapping design. The synchronization zone ensures the precise synchronization of the cutter and the feeding motion through linear mapping, thereby improving the fixed-length shearing accuracy. The return zone adopts a fifth-order polynomial curve to achieve second-order continuity of displacement, velocity and acceleration, which greatly reduces mechanical impact and vibration, reduces wear of transmission components, and extends the service life of the equipment.

[0034] (3) Virtual debugging can be used to flexibly simulate different feeding speeds, material specifications and other working conditions, and quickly verify the adaptability of the control strategy; at the same time, it supports fault scenario testing such as sensor abnormality and pulse loss, which makes it easy to improve the safety logic and abnormal handling mechanism in advance, improve the stability and reliability of the system in actual production, and enhance the flexible production capability of the equipment.

[0035] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0036] Figure 1 This is a flowchart provided in an embodiment of the control program and virtual debugging method of a cold bending forming machine tracking shearing system of the present invention;

[0037] Figure 2 This is an electronic cam curve diagram provided in an embodiment of the control program and virtual debugging method of a cold bending forming machine tracking shearing system of the present invention;

[0038] Figure 3 This is a return zone performance index diagram provided by an embodiment of the control program and virtual debugging method of a cold bending forming machine tracking shearing system of the present invention, wherein (a) is a return position curve, (b) is a return zone velocity curve, and (c) is a return zone acceleration curve;

[0039] Figure 4 This is a real-time communication diagram provided by an embodiment of the control program and virtual debugging method of a cold bending forming machine shearing system of the present invention. Detailed Implementation

[0040] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of this application.

[0041] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0042] like Figures 1-4 As shown, the present invention provides a control program and virtual debugging method for a cold bending forming machine shearing system, comprising:

[0043] S1. Establish a virtual model of the cold bending forming machine's tracking and shearing system. A virtual model of the cold bending forming machine's tracking and shearing system is established in the NXMCD environment using a virtual modeling module. The virtual model includes a feeding mechanism, a shearing mechanism, a servo driver, and photoelectric sensors. The virtual model outputs the cumulative feeding length. With sensor signals and receive the cutter position setting. ;

[0044] Cumulative feeding length The feed length increment is calculated from the encoder pulse count under discrete sampling period. The specific process is as follows: based on the encoder pulse count, encoder pulse count per revolution and feed roller circumference collected in each sampling period, calculate the feed length increment for each period, and accumulate the feed length increments for all periods to obtain the cumulative feed length.

[0045] S2. Write the PLC tracking and shearing system control program. Using the control program development module in TIA Portal, write the tracking and shearing control program for the S7-1200 PLC. Divide the cam into a synchronization zone and a return zone. The synchronization zone uses a linear mapping, and the return zone uses a fifth-order polynomial mapping. The written tracking and shearing control program includes electronic cam function blocks and establishes a master-slave mapping relationship.

[0046] ;

[0047] In the formula, For the cutter to start from the target position on the axis, The cumulative feed length is the spindle position;

[0048] In S2, the electronic cam is based on the feeding length. The segment is defined as a synchronization area and a return area, with the synchronization area being... The cutter's target position from the axis is:

[0049] ;

[0050] In the formula, As the starting point of the synchronization zone, The end point of the synchronization zone, This is the origin position of the cutter;

[0051] Return area is The cutter's target position from the axis is:

[0052] ;

[0053] In the formula, As the starting point of the return zone, The return zone is the final destination. The coefficients are those of a fifth-degree polynomial; where The second-order continuity is ensured by determining the boundary conditions of displacement, velocity, and acceleration at the start and end points of the return zone.

[0054] Preferably, the coefficients of the fifth-order polynomial in the return region are determined by satisfying six boundary conditions, and the coefficients are obtained by constructing a system of linear equations by substituting the above boundary conditions into the polynomial equation. The six boundary conditions are:

[0055] At the start of the return zone Place, ;

[0056] At the end of the return zone Place, .

[0057] When solving for the coefficients of the fifth-order polynomial in the return region, the independent variable is normalized. The specific process is as follows: the physical interval of the feeding length is mapped to the standard interval, and a fifth-order polynomial with respect to the normalized independent variable is constructed; a system of linear equations is constructed based on the normalized polynomial and the boundary conditions, and the normalized coefficients are obtained by solving the system; then, the coefficients of the fifth-order polynomial under the original physical interval are determined by inverse variable mapping.

[0058] In TIA Portal, a tracking and shearing control program was written for the S7-1200 PLC. The triggering of the cam, which is divided into a synchronization zone and a return zone, must meet two conditions simultaneously: first, the cumulative feeding length reaches or exceeds the preset trigger position setting value; second, the photoelectric sensor detects that the material is in place and outputs a valid signal. Furthermore, a de-jittering time is set in the triggering judgment, requiring that the valid signal from the sensor last for a longer period than the de-jittering time before the triggering is finally executed.

[0059] S3. Establish a real-time communication channel. Through the communication connection module, establish a bidirectional communication channel between the NX MCD and the PLC based on OPC. and Mapping to PLC input variables, and converting PLC outputs to PLC input variables. Mapped to servo control inputs of the NX MCD;

[0060] S4. Co-simulation and virtual debugging: Through the debugging and optimization module, NX MCD and PLC simulation are run synchronously, so that the PLC program controls the virtual model and verifies and optimizes the control logic, parameters and performance based on the feedback of the virtual model. The optimization goal is to minimize the fixed length error and motion instability at the same time.

[0061] The process of verifying and optimizing control logic, parameters, and performance based on virtual model feedback is as follows:

[0062] Constructing a comprehensive objective function The process involves minimizing the comprehensive objective function through a debugging and optimization module. This achieves iterative optimization of the control parameters, with the objective function being:

[0063] ;

[0064] In the formula, and This is a weighting coefficient used to balance the two performance indicators of shear length accuracy and motion smoothness. For cutting length, The target length.

[0065] Co-simulation and virtual debugging include boundary testing and fault testing. Boundary testing is used to gradually improve feeding accuracy. Simulations were run at different speed levels, and the results of constant-length shearing were recorded. Servo mechanism acceleration peak performance indicators; Fault testing: Simulate sensor signal abnormality or encoder pulse loss faults in NX MCD to verify whether the safety logic and exception handling program in the PLC control program are executed correctly.

[0066] The specific tasks of the virtual modeling module are as follows: Define the physical structure and kinematic pairs of the feeding mechanism, shearing mechanism, servo driver and photoelectric sensor in the NX MCD environment, configure the signal interaction interface between each component, and enable the virtual model to output the cumulative feeding length signal and sensor status signal in real time, receive external cutter position control commands, and match the dynamic response logic of the actual equipment.

[0067] The specific working logic of the communication connection module is as follows: a bidirectional data exchange channel is established between the NX MCD virtual environment and the PLC controller using the OPC UA protocol, defining the format and cycle of data interaction; the cumulative feeding length signal and sensor signal output by the virtual model are mapped to the input variables of the PLC, and the cutter shaft target position signal calculated by the PLC according to the control program is mapped to the position control input of the servo driver in the NX MCD, realizing closed-loop data interaction.

[0068] Example 1

[0069] This invention provides a control program and virtual debugging method for a cold bending forming machine's follow-up shearing system, according to an embodiment. Through virtual modeling and co-simulation of the control program, offline debugging and parameter optimization of the cold bending forming machine's follow-up shearing system are achieved. The specific implementation steps are as follows:

[0070] S1. Virtual Modeling of the Cold Bending Forming Machine's Tracking Shear System: A full-dimensional virtual model of the tracking shear system is constructed in the NX MCD environment using the virtual modeling module, replicating the mechanical structure and signal interaction logic of the actual equipment. Specifically, this includes:

[0071] First, the components of the virtual model are determined: the model includes a feeding mechanism, a shearing mechanism, a servo driver, and photoelectric sensors. The physical structure parameters of each component are consistent with the actual equipment. The circumference of the feeding roller is configured according to the actual working conditions, and the encoder is coaxially connected to the feeding roller to collect the feeding displacement in real time.

[0072] When modeling, it is necessary to accurately set the physical parameters of each component: in this embodiment, the diameter of the feeding roller is set to 159mm, the circumference is 0.5m, the encoder is selected as a high-resolution model with 1000 pulses per revolution, the detection distance of the photoelectric sensor is set to 5mm, and the response time is no more than 10ms.

[0073] Connect the feed roller to the encoder and output the cumulative feed length in real time using the following formula:

[0074] ;

[0075] Simultaneously define the input and output interfaces of the virtual model - the output interface is used to send the cumulative feed length. With sensor signals The input interface is used to receive the cutter position command issued by the PLC. ;

[0076] Next, an encoder pulse conversion algorithm is embedded in the virtual model. Under discrete sampling periods, according to the formula... Δ L=(ΔN / Nr)×C Calculate the feed length increment for each cycle;

[0077] In the formula, ΔN This represents the number of encoder pulses per sampling period. Nr C is the number of pulses per encoder revolution, and C is the circumference of the feed roller;

[0078] In this embodiment, the discrete sampling period is within 10ms, and the number of pulses collected is Given that the encoder has 1000 pulses per revolution and the feed roller circumference C is 0.5m, the feed increment for this cycle is calculated as follows:

[0079] ;

[0080] Then for all cycles ΔL Accumulate to obtain the real-time cumulative feeding length. Implement the logic for calculating the cumulative feeding length;

[0081] Finally, configure the photoelectric sensor function, set the sensor's detection distance and response time, and output a valid signal Sensor(t)=1 when the material moves to the sensor's detection area, otherwise output Sensor(t)=0 to simulate the actual material arrival detection logic.

[0082] The S2 and PLC tracking shear system control program was written using the control program development module on the TIA Portal platform for the S7-1200 PLC. The core implementation of the electronic cam master-slave mapping and shear triggering logic includes:

[0083] First, establish the master-slave mapping relationship of the electronic cam: based on the cumulative feeding length. Using the master axis position and the cutter displacement as the slave axis position, a mapping function is constructed, and the electronic cam is divided into a synchronization zone and a return zone, each using a different mapping algorithm; the constructed mapping function is as follows:

[0084] ;

[0085] In the formula, The cutter is positioned at the target location on the axis.

[0086] Secondly, a linear mapping design for the synchronization zone is implemented, with the feeding length range of the synchronization zone being [missing information]. The target position of the cutter is calculated using a linear mapping formula:

[0087] ;

[0088] In the formula, As the starting point of the synchronization zone, The end point of the synchronization zone, The origin position of the cutter is set to ensure that the cutter and the feeding movement are synchronized, thus meeting the requirements for fixed-length shearing accuracy.

[0089] This embodiment takes a shearing target length of 0.6m as an example, with the starting point of the synchronization zone... Set to 0m; End point of synchronization zone The setting is 0.2m. Because the acceleration time of the servo motor was ignored when defining the electronic cam area, the time to reach the end of the synchronization zone is greater than the sum of the servo motor's acceleration time and the time to complete one cut; cutter origin position. Set to 0m.

[0090] Next, a fifth-order polynomial mapping design is performed on the return region, and the feeding length range of the return region is... The cutter needs to smoothly return from the completed cutting position to the initial position. The target position of the cutter is calculated using a fifth-order polynomial:

[0091] ;

[0092] In the formula, As the starting point of the return zone, The return zone is the final destination. These are the polynomial coefficients;

[0093] This embodiment takes a shearing target length of 0.6m as an example, with the return zone starting point... The length is 0.2m, and the start of the return zone is the end of the synchronization zone; the end of the return zone... The length is 0.5m. After cutting, the spindle returns to the cutter origin to wait for the next cut. When the spindle position reaches the target cutting length, the spindle position is reset to zero and recalculated to enter the next cycle.

[0094] The polynomial coefficients are determined by the following six boundary conditions:

[0095] At the start of the return zone At that time, the starting position of the return zone is 0.2, the starting speed of the return zone is the same as the ending speed of the synchronization zone, the starting point of the fifth-order polynomial is tangent to the synchronization zone with a slope of 1.0, and the rate of change of velocity is 0.

[0096] ;

[0097] At the end of the return zone At that time, to ensure the cutter can smoothly return to its origin, both its speed and acceleration are 0.

[0098] ;

[0099] By substituting these boundary conditions into the polynomial and its first and second derivative formulas, a system of six linear equations can be obtained, and the coefficients can be uniquely determined after solving it. .

[0100] Furthermore, the coefficients of the fifth-degree polynomial were solved using the independent variable normalization method. Specifically:

[0101] Introducing the normalized independent variable s, the physical interval Linear mapping to standard interval :

[0102] ;

[0103] Through this transformation, the position function is converted into a fifth-degree polynomial in s:

[0104] ;

[0105] Boundary conditions converted to about The conditions are met, and the transformation of the derivative is handled by the chain rule. After normalization, all variables and coefficients are in a similar order of magnitude.

[0106] The final coefficients obtained are:

[0107] ;

[0108] The position function is expressed as:

[0109] ;

[0110] in, ;

[0111] like Figure 3 As shown, the solved fifth-degree polynomial curve and its first and second derivatives satisfy the boundary conditions.

[0112] When writing a tracking and shearing control program for an S7-1200 PLC in TIA Portal, the triggering of the cam, which is divided into a synchronization zone and a return zone, must simultaneously meet two conditions:

[0113] One is when the cumulative feeding length reaches or exceeds the preset trigger position. , The initial value is 0m; the second is that the photoelectric sensor detects the material in place and outputs an effective signal Sensor(t)=1;

[0114] Finally, a debouncing time is added to the program. The clipping action is only performed when the duration of Sensor(t)=1 exceeds the debouncing time, so as to avoid false triggering caused by signal jitter.

[0115] S3. Real-time communication channel establishment: A bidirectional data interaction channel is established between the NX MCD and the PLC based on the OPC UA protocol through the communication connection module, realizing closed-loop linkage between the virtual model and the control program. Specifically, this includes:

[0116] like Figure 4 As shown, during the virtual debugging and optimization phase, the PLC program and the NX MCD virtual model communicate bidirectionally via OPC UA. The PLC receives the output from the virtual model. and And calculate the target position of the cutter according to the control logic. The data is then fed back to the virtual model for servo drive control. This closed-loop interaction allows for the verification of the control program's correctness and performance within a virtual environment.

[0117] S4. Co-simulation and virtual debugging: The debugging and optimization module synchronously runs NX MCD virtual simulation and PLC program simulation, verifies control logic and optimizes parameters based on virtual model feedback, specifically including:

[0118] First, use the comprehensive objective function. Optimize control performance by iteratively optimizing trigger positions. Distance to return zone And weighting coefficients, to achieve a balance between fixed-length accuracy and stability.

[0119] The objective function is:

[0120] ;

[0121] In the formula, and This is a weighting coefficient used to balance the two performance indicators of shear length accuracy and motion smoothness. For cutting length, The target length.

[0122] In this implementation, and The initial values ​​are 1.0 and 0.1 respectively, and the target length is... It is 0.6m.

[0123] The optimization process employs the following iterative strategy:

[0124] First adjust :like Then decrease Conversely, it increases. Then optimize the return curve: if the acceleration integral term is too large, recalculate the polynomial coefficients. Finally, adjust the weighting coefficients according to accuracy and stability requirements. and The proportion.

[0125] Next, during the virtual debugging phase, boundary tests and fault tests are conducted. Boundary tests are performed by gradually increasing the feeding speed. The feeding speed ranges from 0.2 m / s to 0.6 m / s. Simulations are run at different speed levels, and the shearing error and the peak acceleration of the servo mechanism are recorded to verify the stability of the system under high-speed conditions.

[0126] Test results show that at a speed of 0.5 m / s, the length error can be controlled within ±1 mm, and the peak acceleration does not exceed 15 m / s². 2 .

[0127] Fault testing involves simulating sensor malfunctions or encoder pulse loss in the NX MCD to check whether the safety logic in the PLC program can be executed correctly, ensuring that the system has the necessary fault tolerance capabilities and can safely shut down and alarm in abnormal situations.

[0128] The fault test includes the following:

[0129] Sensor signal anomalies: analog signal jitter and persistent failure;

[0130] Encoder malfunction: 5% pulse loss in simulation;

[0131] Finally, after completing all tests, the optimal parameter table and performance index data are output, and a virtual debugging report is generated to provide parameter basis for the on-site debugging of actual equipment.

[0132] Therefore, the present invention provides a control program and virtual debugging method for a cold bending forming machine follow-up shearing system, which realizes the logic verification and parameter optimization of the follow-up shearing system in a virtual environment, which can improve the shearing accuracy and motion stability, reduce the dependence on on-site debugging, reduce costs and shorten the debugging cycle.

[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A virtual debugging method for the control program of a cold bending forming machine's shearing system, characterized in that, include: S1. Establish a virtual model of the cold bending forming machine's tracking and shearing system. A virtual model of the cold bending forming machine's tracking and shearing system is established in the NXMCD environment using a virtual modeling module. The virtual model includes a feeding mechanism, a shearing mechanism, a servo driver, and photoelectric sensors. The virtual model outputs the cumulative feeding length. With sensor signals and receive the cutter position setting. ; S2. Write the PLC tracking and shearing system control program. Using the control program development module in TIA Portal, write the tracking and shearing control program for the S7-1200 PLC. Divide the cam into a synchronization zone and a return zone. The synchronization zone uses a linear mapping, and the return zone uses a fifth-order polynomial mapping. The written tracking and shearing control program includes electronic cam function blocks and establishes a master-slave mapping relationship. ; In the formula, For the cutter to start from the target position on the axis, The cumulative feed length is the spindle position; In S2, the electronic cam is based on the feeding length. The segment is defined as a synchronization area and a return area, wherein the synchronization area is... The cutter's target position from the axis is: ; In the formula, As the starting point of the synchronization zone, The end point of the synchronization zone, This is the origin position of the cutter; The return area is The cutter's target position from the axis is: ; In the formula, As the starting point of the return zone, The return zone is the final destination. The coefficients are those of a fifth-degree polynomial. The start of the return zone is the end of the synchronization zone, where The second-order continuity is ensured by determining the boundary conditions of displacement, velocity, and acceleration at the start and end points of the return zone; The above describes the writing of a tracking and shearing control program for the S7-1200 PLC in TIA Portal. The triggering of the cam, which is divided into a synchronization zone and a return zone, requires two conditions to be met simultaneously: first, the cumulative feeding length reaches or exceeds the preset trigger position setting value; second, the photoelectric sensor detects that the material is in place and outputs a valid signal. Furthermore, a de-jittering time is set in the triggering judgment, requiring that the valid signal of the sensor lasts for more than the de-jittering time before the triggering is finally executed. S3. Establish a real-time communication channel. Through the communication connection module, establish a bidirectional communication channel between the NX MCD and the PLC based on OPC. and Mapping to PLC input variables, and converting PLC outputs to PLC input variables. Mapped to servo control inputs of the NX MCD; S4. Co-simulation and virtual debugging: Through the debugging and optimization module, NX MCD and PLC simulation are run synchronously, so that the PLC program controls the virtual model and verifies and optimizes the control logic, parameters and performance based on the feedback of the virtual model. The optimization goal is to minimize the fixed length error and motion instability at the same time.

2. The virtual debugging method for the control program of the cold bending forming machine tracking shearing system according to claim 1, characterized in that, In S1, the cumulative feeding length The feed length increment is calculated from the encoder pulse count under discrete sampling period. The specific process is as follows: based on the encoder pulse count, encoder pulse count per revolution and feed roller circumference collected in each sampling period, calculate the feed length increment for each period, and accumulate the feed length increments for all periods to obtain the cumulative feed length.

3. The virtual debugging method for the control program of the cold bending forming machine tracking shearing system according to claim 1, characterized in that, The coefficients of the fifth-order polynomial in the return region are determined by satisfying six boundary conditions, and the coefficients are obtained by constructing a system of linear equations by substituting the above boundary conditions into the polynomial equation. The six boundary conditions are: At the start of the return zone place, ; At the end of the return zone place, .

4. The virtual debugging method for the control program of the cold bending forming machine tracking shearing system according to claim 1, characterized in that, When solving for the coefficients of the fifth-order polynomial in the return region, the independent variable is normalized. The specific process is as follows: the physical interval of the feeding length is mapped to the standard interval, and a fifth-order polynomial with respect to the normalized independent variable is constructed; a system of linear equations is constructed based on the normalized polynomial and the boundary conditions, and the normalized coefficients are obtained by solving the system; then, the coefficients of the fifth-order polynomial under the original physical interval are determined by inverse variable mapping.

5. The virtual debugging method for the control program of the cold bending forming machine tracking shearing system according to claim 1, characterized in that, In S4, the process of verifying and optimizing the control logic, parameters, and performance based on virtual model feedback is as follows: Constructing a comprehensive objective function The process involves minimizing the comprehensive objective function through a debugging and optimization module. This achieves iterative optimization of the control parameters, and the objective function is: ; In the formula, and This is a weighting coefficient used to balance the two performance indicators of shear length accuracy and motion smoothness. For cutting length, The target length.

6. The virtual debugging method for the control program of the cold bending forming machine tracking shearing system according to claim 1, characterized in that, In S4, the collaborative simulation and virtual debugging include boundary testing and fault testing, wherein the boundary testing is for gradually improving the feeding accuracy. Simulations were run at different speed levels, and the results of constant-length shearing were recorded. The peak acceleration performance index of the servo mechanism; the fault test simulates sensor signal abnormality or encoder pulse loss fault in NX MCD to verify whether the safety logic and fault handling program in the PLC control program are executed correctly.

7. The virtual debugging method for the control program of the cold bending forming machine tracking shearing system according to claim 1, characterized in that, The specific work of the virtual modeling module is as follows: Define the physical structure and kinematic pairs of the feeding mechanism, shearing mechanism, servo driver and photoelectric sensor in the NX MCD environment, configure the signal interaction interface between each component, and the virtual model has the function of real-time output of cumulative feeding length signal and sensor status signal, receiving external cutter position control command, and matching the dynamic response logic of the actual equipment.

8. The virtual debugging method for the control program of the cold bending forming machine tracking shearing system according to claim 1, characterized in that, The specific working logic of the communication connection module is as follows: a bidirectional data exchange channel is established between the NX MCD virtual environment and the PLC controller using the OPC UA protocol, defining the format and cycle of data interaction; the cumulative feeding length signal and sensor signal output by the virtual model are mapped to the input variables of the PLC, and the cutter shaft target position signal calculated by the PLC according to the control program is mapped to the position control input of the servo driver in the NX MCD, thereby realizing closed-loop data interaction.

Citation Information

Patent Citations

  • Material shearing control method based on active disturbance rejection

    CN111679633A

  • Virtual debugging method and device for lithium ion battery packaging equipment

    CN118550246A