A capping machine control method and control system based on digital twinning
Patent Information
- Application Number
- CN202610927973.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-08-21
AI Technical Summary
传统压盖机多采用继电器控制或半自动化控制,存在以下问题:①压盖压力与送瓶速度调节依赖人工经验,精度不足导致瓶盖松动或瓶身破损;②缺乏压盖后高度检测机制,无法实时修正压盖偏差;③设备运行状态缺乏实时监控,故障排查耗时;④物理样机调试周期长、成本高,难以快速适配不同规格酒瓶
[0019]本发明的有益效果:与现有技术相比,本发明通过PLC能够自动控制压盖压力和送瓶速度,根据孪生模型同步控制压盖和送瓶速度的精度,进而避免瓶盖送到或瓶身损坏,采用检测瓶盖安装后的高度检测传感器,根据该高度变化进而对压盖的时间进行调整纠正,进而确保压盖的精度,降低压盖误差,提高产品合格率,采用数字孪生模型的虚拟控制,通过数字孪生模型中的参数调试同步到压盖机实物控制,通过测量误差大小来调试实物压盖机的各个参数,调试周期大大缩短,调试成本大大降低,能够快速匹配不同规格的酒瓶瓶盖的压盖控制调节。
Smart Images

Figure CN122607951A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of capping machine control technology, specifically to a capping machine control method and control system based on digital twins. Background Technology
[0002] As a traditional Chinese beverage, the level of automation in the production process of baijiu directly affects product quality and production efficiency. The capping process is a crucial step after baijiu bottling, requiring a tight, undamaged seal to prevent leakage during transportation. Traditional capping machines often use relay control or semi-automatic control, which presents the following problems: ① Capping pressure and bottle feeding speed adjustment rely on manual experience, leading to insufficient precision and resulting in loose caps or bottle breakage; ② There is a lack of a height detection mechanism after capping, making it impossible to correct capping deviations in real time; ③ The equipment's operating status lacks real-time monitoring, making troubleshooting time-consuming; ④ Physical prototype debugging is lengthy and costly, making it difficult to quickly adapt to different bottle sizes. Summary of the Invention
[0003] The purpose of this invention is to provide a digital twin-based capping machine control method and control system, which improves the accuracy of capping pressure and bottle feeding speed, avoids loose caps or bottle breakage, enables real-time capping time correction, reduces large capping errors, improves the pass rate, shortens the debugging cycle, reduces debugging costs, and quickly adapts to the capping control and adjustment of bottle caps of different specifications.
[0004] To achieve the objective of this invention, the technical solution adopted by this invention is as follows: a capping machine control method based on digital twins, the steps of which are as follows:
[0005] Step 1: NX MCD Digital Twin Modeling. A three-dimensional virtual prototype model of the capping machine is constructed using NX MCD mechanical simulation software. The virtual prototype model of the capping machine includes a wine bottle, frame, sorting conveyor belt, sorting cylinder, capping cylinder, main conveyor belt, photoelectric sensor 1, photoelectric sensor 2, photoelectric sensor 3, laser displacement sensor, and photoelectric sensor 4.
[0006] Step 2: Construct the physical layer and build the physical structure of the capping machine corresponding to the virtual prototype model of the capping machine in Step 1. Use NX MCD mechanical simulation software to virtually map the virtual prototype model of the capping machine to the physical structure of the capping machine to ensure that the virtual and physical structures of the capping machine are consistent in function.
[0007] Step 3: Construct the control layer. A PLC is paired with a touch screen to receive sensor signals from the physical structure of the capping machine, execute control logic, and output drive instructions. Virtual simulation control is achieved through the PLC.
[0008] Step 4: Construct a digital twin layer. Based on the three-dimensional virtual prototype model of the capping machine constructed in Step 1, interact with the control layer through the Profinet communication module to realize the virtual-real mapping and synchronous movement of physical quantities (position, pressure, speed, height).
[0009] The PLC digital input / output interface includes execution signals for conveyor motor enable, capping cylinder extension / capping, capping cylinder retraction / reset, as well as detection signals for bottle positioning, photoelectric sensor, capping cylinder position, limit switch, safety door closing, and emergency stop. The PLC analog input interface includes actual capping height and 0-5V signal from the height sensor.
[0010] The cylinder solenoid valve coil is connected to the PLC output terminal through an intermediate relay to achieve power amplification; the photoelectric sensor signal is connected to the PLC digital input module, and the height sensor signal is connected to the PLC analog input module, both connected to the PLC input terminal via shielded cables; the touch screen is connected to the PLC's PN interface through the Profinet communication module cable; the PLC's SIMAdvanced module establishes communication with TIA Portal software and NX MCD via Ethernet;
[0011] Step 5: Simulation Test. The touchscreen is clicked to start the process. The PLC outputs that the conveyor belt motor rotates forward and begins conveying the bottles. When a bottle reaches the capping position, photoelectric sensor one triggers, and the capping cylinder extends. In the 3D model of the capping machine constructed by the NX MCD mechanical simulation software, the clamping cylinder clamps synchronously with the capping cylinder extension, holding for a set time before retracting. After capping, the conveyor belt motor rotates forward to continue conveying the bottles forward. At the defective product sorting point, photoelectric sensor two detects the arrival of a bottle, and the main conveyor belt stops. The laser displacement sensor detects the cap height and calculates the capping pass rate. Based on the detection results, the extension time of the capping cylinder is adjusted to control the capping accuracy, achieving closed-loop control. The actions in the 3D model of the capping machine constructed by the NX MCD mechanical simulation software are completely synchronized with the PLC instructions. When the synchronization error between the simulated actions of the virtual 3D model of the capping machine and the actual actions of the capping machine is less than 5 ms, the test is considered successful, and mass production can begin.
[0012] It also includes closed-loop control simulation: the virtual height deviation is manually set in the NX MCD mechanical simulation software; the height sensor feedback signal is transmitted to the PLC, the PLC calculates the capping time increment and updates the capping time; during the next round of capping, the actual height in the NX MCD mechanical simulation software is synchronously corrected, and the deviation is reduced to the set threshold to meet the requirements.
[0013] It also includes fault simulation: simulating a height sensor fault (output signal 0mA) in NX MCD mechanical simulation software. After the PLC detects the abnormality, it immediately stops the machine and displays a height sensor fault alarm on the touch screen; height abnormality protection: when the cap height deviation exceeds ±1mm (over-limit threshold), the PLC immediately stops the machine and alarms to prevent batches of unqualified products; height sensor fault protection: if an abnormal sensor signal (≤3mA or ≥21mA) is detected, the machine immediately stops and prompts a height sensor fault.
[0014] A digital twin-based capping machine control system includes:
[0015] The NX MCD digital twin module is used to build a 3D virtual prototype model of a capping machine using NX MCD mechanical simulation software.
[0016] The physical layer construction module is used to build the physical structure of the capping machine corresponding to the virtual prototype model of the capping machine. The virtual prototype model of the capping machine and the physical structure of the capping machine are virtually mapped through NXMCD mechanical simulation software to ensure that the virtual and physical structures of the capping machine are consistent in function.
[0017] The control layer module, consisting of a PLC and a touch screen, is used to receive sensor signals from the physical structure of the capping machine, execute control logic, and output drive commands, thereby achieving virtual simulation control through the PLC.
[0018] The digital twin layer construction module, based on the constructed 3D virtual prototype model of the capping machine, interacts with the control layer through the Profinet communication module to achieve virtual-real mapping and synchronous movement of physical quantities. The simulation testing module, activated by a touchscreen click, initiates the PLC output, causing the conveyor belt motor to rotate forward and begin conveying bottles. When a bottle reaches the capping position, photoelectric sensor one triggers, extending the capping cylinder. The clamping cylinder in the 3D model of the capping machine, constructed using NX MCD mechanical simulation software, simultaneously clamps and extends the capping cylinder, holding for a set time before retracting. After capping, the conveyor belt motor rotates forward to continue conveying bottles forward. At the defective product sorting point, photoelectric sensor two detects the arrival of a bottle, stopping the main conveyor belt. A laser displacement sensor detects the cap height and calculates the capping pass rate. Based on the detection results, the extension time of the capping cylinder is adjusted to control capping accuracy, achieving closed-loop control. The actions in the 3D model of the capping machine constructed using NX MCD mechanical simulation software are completely synchronized with the PLC commands. When the synchronization error between the simulated actions of the virtual 3D model and the actual actions of the capping machine is less than 5 ms, the test is considered successful, and mass production can begin.
[0019] The beneficial effects of this invention are as follows: Compared with the prior art, this invention can automatically control the capping pressure and bottle feeding speed through PLC, and synchronously control the accuracy of capping and bottle feeding speed according to the twin model, thereby avoiding damage to the bottle cap or bottle body. It adopts a height detection sensor after the bottle cap is installed, and adjusts and corrects the capping time according to the height change, thereby ensuring the accuracy of capping, reducing capping error, and improving the product qualification rate. It adopts virtual control of digital twin model, and synchronizes the parameter debugging in digital twin model to the physical control of capping machine. By measuring the error, the various parameters of the physical capping machine are adjusted, which greatly shortens the debugging cycle and greatly reduces the debugging cost. It can quickly match the capping control adjustment of bottle caps of different specifications. Attached Figure Description
[0020] Figure 1 This is a three-dimensional structural schematic diagram of the capping machine (dual-channel capping) model in Embodiment 1 of this application;
[0021] Figure 2 This is a front view structural diagram of the capping machine model in Embodiment 1 of this application;
[0022] Figure 3 This is a top view of the capping machine model in Embodiment 1 of this application;
[0023] Figure 4 This is a schematic diagram of the left side of the capping machine model in Embodiment 1 of this application;
[0024] Figure 5 This is a schematic diagram of the control principle of the capping machine in Embodiment 1 of this application.
[0025] Figure 6 This is a schematic diagram of the PLC port in Embodiment 1 of this application;
[0026] Figure 7 Design a flowchart for the simulation control software;
[0027] Figure 8 Design a flowchart for the program;
[0028] Figure 9 Design an interface diagram for online monitoring of the capping machine;
[0029] Figure 10 This is a diagram of the cylinder testing interface;
[0030] Figure 11 Alarm interface diagram
[0031] Figure 12 Configure it for external signals;
[0032] Figure 13 The model simulation test diagram;
[0033] Figure 14 Screenshot of the monitoring test run;
[0034] Figure 15 This is a screenshot of the historical alarm interface. Detailed Implementation
[0035] The present invention will be further described below with reference to the accompanying drawings and specific examples.
[0036] With the rapid development of intelligent manufacturing and Industry 4.0, digital twin technology has been widely applied in the field of industrial control. This application utilizes the NX-MCD electromechanical conceptual design module, which can realize functions such as 3D modeling, physical and electromechanical attribute setting, kinematic simulation, and logic control through communication with PLC. It can realize the design, simulation, and verification of mechanical systems in a virtual environment. Traditional production line debugging modes have many limitations, such as long cycles, high costs, uncontrollable risks, and insufficient verification. Virtual simulation debugging technology, through digital models, simulates equipment operation and verifies control logic in a virtual environment, greatly improving the efficiency of automated production, while significantly reducing trial and error costs and shortening the R&D cycle. This application focuses on the bottle capping unit in the packaging production line of the liquor industry, and conducts in-depth research on the virtual simulation debugging method of NX-MCD, including 3D model construction, signal interaction, and simulation verification processes, providing a referable technical solution for the digital transformation of the liquor industry.
[0037] Example 1: A control method for a capping machine based on digital twins, the steps of which are as follows:
[0038] Step 1: NX MCD Digital Twin Modeling. A 3D virtual prototype model of the capping machine is constructed using NX MCD mechanical simulation software, such as... Figure 1-4 As shown, the virtual prototype model of the capping machine includes a wine bottle 10, a frame 9, a sorting conveyor belt 11, a sorting cylinder 12, a capping cylinder 13, a main conveyor belt 14, photoelectric sensor 1 20, photoelectric sensor 21, photoelectric sensor 3 22, a laser displacement sensor 23, and photoelectric sensor 4 24, as shown. Figure 1As shown, a main conveyor belt 14 is installed on the frame 9. The main conveyor belt 14 is driven by a conveyor belt motor 15 and moves from left to right. Two bottle limiting baffles 16 are installed at the front and rear of the main conveyor belt 14, respectively. The two bottle limiting baffles 16 limit and directional the movement of the moving bottles 10. A vertically arranged capping cylinder 13 is installed near the middle of the main conveyor belt 14. A capping cylindrical block 17 is fixedly connected to the end of the cylinder rod of the capping cylinder 13. The cylinder seat of the capping cylinder 13 is fixedly connected to the capping support frame 18. 8 is fixedly connected to the frame 9. The sorting cylinder 12 is installed on one side of the main conveyor belt 14. The cylinder seat of the sorting cylinder 12 is fixedly connected to the frame 9 through the fixed support 19 and is located after the capping cylinder 13. The two bottle limiting baffles 16 directly opposite the sorting cylinder 12 have notches. The notches can allow the cylinder rod of the sorting cylinder 12 to push the bottle out and send it into the sorting belt 11. The sorting belt 11 is installed on one side of the main conveyor belt 14. The photoelectric sensor 20 is installed on one side of the belt frame of the main conveyor belt 14 and is located below the capping point to monitor whether the bottle is in place during capping. Photoelectric sensor 4 24 is installed on one side of the belt frame of the main conveyor belt 14 and next to the discharge end to monitor the number of capped bottles. Photoelectric sensor 3 22 is installed on one side of the belt frame of the main conveyor belt 14 and next to the sorting cylinder 12 to monitor whether the capped bottles have been delivered to the sorting position. Photoelectric sensor 21 is installed on one side of the belt frame of the sorting belt to monitor the number of bottles with unqualified caps. Laser displacement sensor 23 is installed on the fixed support 19 via a cantilever frame and is directly facing the top surface of the bottle caps of the conveyed bottles to monitor the number of bottles. Whether the cap height meets the capping requirements (the control program controls the start and stop of the conveyor belt; when the photoelectric sensor at the capping point detects the arrival of the bottle, the conveyor belt stops to cap it; after capping, the height is checked to see if it is qualified; if qualified, it is transported to the next station; if not qualified, it is pushed out to the defective product area by a pusher cylinder; the production qualification rate function block is called to calculate the production qualification rate of the capping machine, and the calculation is based on the height feedback from the measurement, and the delay time of the capping cylinder is adjusted to realize closed-loop control of the capping process, which can maximize the efficiency and high quality of production according to actual production needs).
[0039] Working Principle: After the wine bottle 10 is filled and capped, it passes through the capping position on the main conveyor belt 14 and is detected by photoelectric sensor 20, at which point the main conveyor belt 14 stops. The PLC controls the extension of the cylinder rod of the capping cylinder 13, specifically through a precision regulating valve to control the extension length of the cylinder rod, performing capping and delaying the process. After capping is completed, the cylinder rod of the capping cylinder 13 retracts, the main conveyor belt 14 starts, and when the photoelectric sensor 22 at the sorting cylinder 12 detects a product, the main conveyor belt 14 stops. The height detection laser displacement sensor 23 detects the height of the wine bottle, and unqualified products are sorted by the sorting cylinder 12 and the sorting belt 11, and counted by photoelectric sensor 21. Qualified products enter the next production stage and are counted by photoelectric sensor 4. Simultaneously, the status of each sensor, sorting cylinder, and conveyor belt motor can be viewed in real time through a touch screen, and virtual-real synchronous control can be achieved, providing a basis for the design of electromechanical concept products. The control system adopts a three-layer architecture of "physical layer - control layer - digital twin layer".
[0040] Step 2: Construct the physical layer (including virtual physical mapping). Build the physical structure of the capping machine corresponding to the virtual prototype model in Step 1. Use NX MCD mechanical simulation software to virtually map the virtual prototype model of the capping machine to the physical structure, ensuring that the virtual and physical structures of the capping machine are functionally consistent. The mechanical parts of the physical structure of the capping machine include the frame, main conveyor belt, sorting conveyor belt, sorting cylinder, and capping cylinder. Actuators include the sorting motor that drives the sorting conveyor belt, the main conveyor belt motor, the capping cylinder, solenoid valves, etc. The sensor group includes photoelectric sensors, pressure sensors, and height sensors.
[0041] Step 3: Construct the control layer. The PLC is paired with a KTP1200 touch screen to receive sensor signals from the physical structure of the capping machine, execute control logic, and output drive instructions. Virtual simulation control is achieved through the PLC's SIM Advanced module. The PLC used is a Siemens S7-1500 PLC.
[0042] Step 4: Construct a digital twin layer. Based on the 3D virtual prototype model of the capping machine constructed in Step 1, interact with the control layer through the Profinet communication module to achieve virtual-real mapping and synchronous motion of physical quantities (position, pressure, velocity, height). The hardware block diagram of the control system is as follows: Figure 5 As shown;
[0043] The PLC digital input / output interface includes execution signals for conveyor motor enable, capping cylinder extension / capping, and capping cylinder retraction / reset, as well as detection signals for bottle positioning, photoelectric sensor, capping cylinder positioning, limit switch, safety door closing, and emergency stop. The PLC analog input interface includes actual capping height and a 0-5V signal from the height sensor. The PLC digital I / O wiring diagram is as follows. Figure 6 As shown.
[0044] The cylinder solenoid valve coil is connected to the PLC output terminal via an intermediate relay to amplify power; the photoelectric sensor signal is connected to the PLC digital input module, and the height sensor signal is connected to the PLC analog input module, both connected to the PLC input terminal via shielded cables; the touch screen is connected to the PLC's PN interface via a Profinet communication module cable; the PLC's SIMAdvanced module establishes communication with TIA Portal software and NX MCD mechanical simulation software via Ethernet.
[0045] Software design flowchart, such as Figure 7 As shown, the main steps include:
[0046] NX electromechanical concept design: NX MCD model design, physical property design, and motion property design;
[0047] TIA Portal V18 Control Logic Programming: Write TIA Portal control programs and design HMI human-machine interfaces using the successfully verified NX MCD sequence editor;
[0048] Signal configuration and signal mapping: Establish communication with TIA Portal via S7-PLCSIM Advanced V5.0 and establish signal mapping between "MCD signal" and "external signal (TIPort V18)"; Mode selection: Supports "automatic mode" (continuous operation) / "manual mode" (single-step debugging).
[0049] NX MCD Digital Twin Modeling: This application uses the physical capping machine needed in a liquor production line as a reference to systematically construct a virtual prototype model of the capping machine, such as... Figure 1 As shown, the virtual prototype model of the capping machine is equipped with height detection and defective product sorting modules, which can complete closed-loop control of the capping process and calculate the capping pass rate. It completes the digital assembly of the whole machine and embeds sensor units such as bottle position detection and capping position feedback to form a mechatronic digital model with sensing capabilities. By configuring the physical properties and signal mapping relationship of the parts in the NXMCD module, the mechanical motion, gravity and sensor triggering form a dynamic closed loop. This digital debugging mode of "virtual construction-simulation verification-closed-loop improvement" moves the trial and error process that traditionally relies on physical prototypes to the design stage, significantly shortens the on-site debugging cycle, effectively avoids the risks of manufacturing rework and downtime, and greatly reduces R&D costs and production uncertainty, providing solid and reliable digital support for the intelligent upgrading and high-quality delivery of liquor production lines.
[0050] Program design flow:
[0051] To enhance the system's usability and reliability, it is designed with manual, automatic, emergency stop, and reset operation modes. The program flowchart is as follows: Figure 8 As shown.
[0052] Manual mode: Responds to manual operation commands on the touch screen. It is used for checking and testing the movement of various mechanical structures or for manually controlling and adjusting production on the touch screen screen after a problem occurs in an individual mechanism.
[0053] Automatic Mode: The control program controls the start and stop of the conveyor belt. When the photoelectric sensor at the capping station detects the arrival of a bottle, the conveyor belt stops to cap it. After capping, the height is checked to see if it meets the requirements. If it does, the bottle is transported to the next station; otherwise, a pusher cylinder pushes it to the defective product area. The production pass rate function block is called to calculate the production pass rate of the capping machine. Based on the measured height feedback, the delay time of the capping cylinder is adjusted to achieve closed-loop control of the capping process. Automatic mode can maximize efficient and high-quality production according to actual production needs.
[0054] Alarm and protection functions: The system incorporates alarm and protection functions, collecting signals from the capping point, height detection sensor, and pusher in real time, updating the touchscreen display data, and recording fault information. For example, if there are no bottles on the conveyor belt, the machine will pause. If there is a missynchronization during capping, the emergency stop button can be pressed, and the reset button will reset all actuators. The touchscreen display allows for synchronous online monitoring of data such as capping time, number of caps, and bottle height, as well as switching between various modes.
[0055] HMI Design: The touchscreen was developed using WinCC Advanced configuration software and includes the main monitoring interface, cylinder test interface, and fault alarm interface.
[0056] Main monitoring page: Capping machine (A) online monitoring interface as shown Figure 9 The left image shows the real-time display of the equipment conveyor belt, individual cylinders, and photoelectric sensors in automatic mode, as well as the production pass rate (%) of production line A. It includes settings for start, stop, reset, production zeroing, and manual / automatic switching for line A. The online monitoring interface for the capping machine (B) is shown below. Figure 9 The right figure shows the real-time status of the conveyor belt, individual cylinders, and photoelectric sensors in automatic mode, as well as the production pass rate (%) of production line B. It also includes settings for starting, stopping, resetting, and resetting production, and manual / automatic switching for production line B.
[0057] Cylinder test interface as follows Figure 10 As shown: In manual mode, the test buttons for the conveyor belt, capping cylinder, and pusher cylinder are displayed, and manual production is performed.
[0058] Fault alarm interface: such as Figure 11As shown, "Height Deviation Exceeds Limit" and "Height Sensor Failure" are marked with fault codes and handling suggestions (such as "Check the height sensor installation location" and "Adjust the capping time parameter"). Historical Alarm Interface: Defined as the start screen, it displays historical equipment "Capping / Pushing Cylinder Extension / Retraction Timeout" faults, marked with fault codes and handling suggestions (such as "Check the height sensor installation location" and "Adjust the capping time parameter").
[0059] System communication settings: When configuring the virtual PLC connection in S7-PLCSIM Advanced, set the online access mode to "PLCSIM", create a new instance and specify its name, IP address (e.g., 192.168.0.2), and subnet mask, then start the instance; establish a signal mapping between the virtual simulation environment and the external control system in NX, associating the simulation signals generated internally by NX-MCD with the input / output variables required by the external controller (PLC). Use the Profinet IO protocol to achieve bidirectional communication between the PLC, PLCSIM Advanced, and NX MCD.
[0060] External signal configuration such as Figure 12 As shown: In the External Signal Type box, select PLCSIM Adv as the type. In the Signal box, click the same name for both the MCD signal and the external signal (PLC), and then click the signal mapping in the middle. Click all signals with the same name in sequence to create signals, and check for incorrect connections at the mapped signal locations.
[0061] Step 5: Simulation testing, including virtual-real synchronous simulation, closed-loop control simulation, and fault simulation. Start the simulation by clicking the touchscreen. The virtual-real synchronous simulation method is as follows: The PLC outputs the conveyor belt motor to rotate forward and begin conveying the bottles. When the bottle reaches the capping position, photoelectric sensor one is triggered, and the capping cylinder extends. The NX MCD mechanical simulation software constructs a 3D model of the capping machine, where the clamping cylinder synchronously clamps and the capping cylinder extends. After holding for a set time, it retracts. After capping, the conveyor belt motor rotates forward to continue conveying the bottles forward. At the defective product sorting point, photoelectric sensor two detects the arrival of a bottle, and the main conveyor belt stops. The laser displacement sensor detects the bottle cap height and calculates the capping pass rate. Based on the detection results, the extension time of the capping cylinder is adjusted to control the capping accuracy (for example, manually setting the "virtual height deviation" in NX MCD, such as a standard height of 250mm, a simulated actual height of 249.8mm, and a deviation of 0.2mm). The height sensor feedback signal is transmitted to the PLC. Calculate the capping time increment (0.2mm × 0.5s / mm = 0.1s), and update the capping time to 0.5 + 0.1 = 0.6s; during the next capping cycle, the actual height in the NX MCD is synchronously corrected to 249.95mm, reducing the deviation to +0.05mm (meeting the requirements), thus achieving closed-loop control. The actions in the 3D model of the capping machine constructed by the NX MCD mechanical simulation software are completely synchronized with the PLC instructions; when the synchronization error between the simulated actions of the virtual 3D model of the capping machine and the actual actions of the capping machine is less than 5ms, the test is considered successful, and mass production can begin. Figure 13 The diagram is for model simulation and testing.
[0062] It also includes a closed-loop control simulation method: In the NX MCD, the "virtual height deviation" is manually set (e.g., standard height 250mm, simulated actual height 249.8mm, deviation 0.2mm); the height sensor feedback signal is transmitted to the PLC, the PLC calculates the capping time increment (0.2mm×0.5s / mm=0.1s), and updates the capping time to 0.5+0.1=0.6s; in the next round of capping, the actual height in the NXMCD is synchronously corrected to 249.95mm, the deviation is reduced to +0.05mm, which meets the requirements.
[0063] Figure 14 The image on the left shows the closed-loop control monitoring test operation screen of the capping machine A. Figure 14The right image shows the monitoring and testing screen of capping machine B without closed-loop control. Without closed-loop control, the height deviation range is -0.6 to +0.5 mm, with an average deviation of ±0.35 mm. The pass rate (≥249.8 mm and ≤250.2 mm) is 92%, and the capping time is fixed at 0.5 s. With closed-loop control, the height deviation range is -0.18 to +0.15 mm, with an average deviation of ±0.08 mm. The pass rate (≥249.8 mm and ≤250.2 mm) is 100%, and the capping time is adjustable from 0.42 to 0.65 s. The results, as shown in Table 2, indicate that after enabling height closed-loop control, the capping height deviation is significantly reduced, the pass rate is 100%, meeting the design requirements; the capping time can be dynamically adjusted according to the height deviation, resulting in a faster response speed.
[0064] Table 1. Test Results of High-Level Closed-Loop Control
[0065] The results show that after enabling height closed-loop control, the capping height deviation is significantly reduced, with an average deviation of only ±0.08mm and a pass rate of 100%, meeting the design requirements; the capping time can be dynamically adjusted according to the height deviation, resulting in a faster response speed.
[0066] The capping height of 100 bottles was tested, with an initial capping time of 0.5s and a standard height of 250mm. The results are shown in Table 2. In terms of comprehensive performance verification, after 2 hours of continuous operation (producing 1200 bottles), all indicators of the system met the standards.
[0067] Table 2 Comprehensive Performance Verification
[0068] Height abnormality protection: When the cap height deviation exceeds ±1mm (over-limit threshold), the PLC will immediately stop the machine and sound an alarm to prevent batch of unqualified products;
[0069] Altitude sensor fault protection: If an abnormal sensor signal (≤3mA or ≥21mA) is detected, the machine will stop immediately and indicate that the altitude sensor is faulty.
[0070] Fault Simulation: A "height sensor fault" is simulated in NX MCD. Upon detecting the anomaly, the PLC immediately stops the machine and displays a "height sensor fault" alarm on the touchscreen. Height Anomaly Protection: When the cap height deviation exceeds ±1mm (over-limit threshold), the PLC immediately stops the machine and triggers an alarm to prevent batch production of defective products. Historical alarm interface screenshots are shown below. Figure 15 As shown.
[0071] This application sets up a height detection sensor and a closed-loop control algorithm to achieve dynamic adjustment of the capping time, with a capping height deviation of ≤±0.2mm, solving the problem of poor capping consistency in traditional equipment; the communication simulation process verifies the low-latency interaction between PLC, PLCSIM Advanced and NX MCD, with a virtual-real synchronization error of ≤5ms, providing a virtual verification platform for the debugging of physical prototypes.
[0072] Example 2: A digital twin-based capping machine control system, comprising:
[0073] The NX MCD digital twin module is used to build a 3D virtual prototype model of a capping machine using NX MCD mechanical simulation software.
[0074] The physical layer construction module is used to build the physical structure of the capping machine corresponding to the virtual prototype model of the capping machine. The virtual prototype model of the capping machine and the physical structure of the capping machine are virtually mapped through NXMCD mechanical simulation software to ensure that the virtual and physical structures of the capping machine are consistent in function.
[0075] The control layer module, consisting of a PLC and a touch screen, is used to receive sensor signals from the physical structure of the capping machine, execute control logic, and output drive commands, thereby achieving virtual simulation control through the PLC.
[0076] The digital twin layer construction module, based on the constructed 3D virtual prototype model of the capping machine, interacts with the control layer through the Profinet communication module to achieve virtual-real mapping and synchronous movement of physical quantities. The simulation testing module, activated by a touchscreen click, initiates the PLC output, causing the conveyor belt motor to rotate forward and begin conveying bottles. When a bottle reaches the capping position, photoelectric sensor one triggers, extending the capping cylinder. The clamping cylinder in the 3D model of the capping machine, constructed using NX MCD mechanical simulation software, simultaneously clamps and extends the capping cylinder, holding for a set time before retracting. After capping, the conveyor belt motor rotates forward to continue conveying bottles forward. At the defective product sorting point, photoelectric sensor two detects the arrival of a bottle, stopping the main conveyor belt. A laser displacement sensor detects the cap height and calculates the capping pass rate. Based on the detection results, the extension time of the capping cylinder is adjusted to control capping accuracy, achieving closed-loop control. The actions in the 3D model of the capping machine constructed using NX MCD mechanical simulation software are completely synchronized with the PLC commands. When the synchronization error between the simulated actions of the virtual 3D model and the actual actions of the capping machine is less than 5 ms, the test is considered successful, and mass production can begin.
[0077] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection of the claims.
Claims
1. A control method for a capping machine based on digital twins, characterized in that, The steps of this method are as follows: Step 1: NX MCD Digital Twin Modeling. A three-dimensional virtual prototype model of the capping machine is constructed using NX MCD mechanical simulation software. The virtual prototype model of the capping machine includes a wine bottle, frame, sorting conveyor belt, sorting cylinder, capping cylinder, main conveyor belt, photoelectric sensor 1, photoelectric sensor 2, photoelectric sensor 3, laser displacement sensor, and photoelectric sensor 4. Step 2: Construct the physical layer and build the physical structure of the capping machine corresponding to the virtual prototype model of the capping machine in Step 1. Use NX MCD mechanical simulation software to virtually map the virtual prototype model of the capping machine to the physical structure of the capping machine to ensure that the virtual and physical structures of the capping machine are consistent in function. Step 3: Construct the control layer. A PLC is paired with a touch screen to receive sensor signals from the physical structure of the capping machine, execute control logic, and output drive instructions. Virtual simulation control is achieved through the PLC. Step 4: Construct a digital twin layer. Based on the three-dimensional virtual prototype model of the capping machine constructed in Step 1, interact with the control layer through the Profinet communication module to realize the virtual-real mapping and synchronous movement of physical quantities, including position, pressure, speed and height. The PLC digital input / output interface includes execution signals for conveyor motor enable, capping cylinder extension / capping, capping cylinder retraction / reset, as well as detection signals for bottle positioning, photoelectric sensor, capping cylinder positioning, limit switch, safety door closing, and emergency stop; the PLC analog input interface includes actual capping height and 0-5V signal from the height sensor. The cylinder solenoid valve coil is connected to the PLC output terminal via an intermediate relay; the photoelectric sensor signal is connected to the PLC digital input module, and the height sensor signal is connected to the PLC analog input module, both connected to the PLC input terminal via shielded cables; the touch screen is connected to the PLC's PN interface via the Profinet communication module cable; the PLC's SIM Advanced module establishes communication with TIA Portal software and NX MCD via Ethernet. Step 5: Simulation Test. The touchscreen is clicked to start the process. The PLC outputs that the conveyor belt motor rotates forward and begins conveying the bottles. When a bottle reaches the capping position, photoelectric sensor one triggers, and the capping cylinder extends. In the 3D model of the capping machine constructed by the NX MCD mechanical simulation software, the clamping cylinder clamps synchronously with the capping cylinder extension, holding for a set time before retracting. After capping, the conveyor belt motor rotates forward to continue conveying the bottles forward. At the defective product sorting point, photoelectric sensor two detects the arrival of a bottle, and the main conveyor belt stops. The laser displacement sensor detects the cap height and calculates the capping pass rate. Based on the detection results, the extension time of the capping cylinder is adjusted to control the capping accuracy, achieving closed-loop control. The actions in the 3D model of the capping machine constructed by the NX MCD mechanical simulation software are completely synchronized with the PLC instructions. When the synchronization error between the simulated actions of the virtual 3D model of the capping machine and the actual actions of the capping machine is less than 5 ms, the test is considered successful, and mass production can begin.
2. The capping machine control method based on digital twin according to claim 1, characterized in that, It also includes closed-loop control simulation: the virtual height deviation is manually set in the NX MCD mechanical simulation software; the height sensor feedback signal is transmitted to the PLC, the PLC calculates the capping time increment and updates the capping time; during the next round of capping, the actual height in the NX MCD mechanical simulation software is synchronously corrected, and the deviation is reduced to the set threshold to meet the requirements.
3. The capping machine control method based on digital twin according to claim 1, characterized in that, It also includes fault simulation: simulating height sensor faults in NX MCD mechanical simulation software; after the PLC detects the abnormality, it immediately stops the machine and displays a height sensor fault alarm on the touch screen; height abnormality protection: when the cap height deviation exceeds ±1mm, the PLC immediately stops the machine and alarms; height sensor fault protection: if an abnormal sensor signal is detected, it immediately stops the machine and prompts a height sensor fault.
4. A digital twin-based capping machine control system, characterized in that, include The NX MCD digital twin module is used to build a 3D virtual prototype model of a capping machine using NX MCD mechanical simulation software. The physical layer construction module is used to build the physical structure of the capping machine corresponding to the virtual prototype model of the capping machine. The virtual prototype model of the capping machine and the physical structure of the capping machine are virtually mapped through NX MCD mechanical simulation software to ensure that the virtual and physical structures of the capping machine are consistent in function. The control layer module, consisting of a PLC and a touch screen, is used to receive sensor signals from the physical structure of the capping machine, execute control logic, and output drive commands, thereby achieving virtual simulation control through the PLC. The digital twin layer construction module, based on the constructed 3D virtual prototype model of the capping machine, interacts with the control layer through the Profinet communication module to achieve virtual-real mapping and synchronous movement of physical quantities. The simulation testing module, activated by a touchscreen click, initiates the PLC output, causing the conveyor belt motor to rotate forward and begin conveying bottles. When a bottle reaches the capping position, photoelectric sensor one triggers, extending the capping cylinder. The clamping cylinder in the 3D model of the capping machine, constructed using NX MCD mechanical simulation software, simultaneously clamps and extends the capping cylinder, holding for a set time before retracting. After capping, the conveyor belt motor rotates forward to continue conveying bottles forward. At the defective product sorting point, photoelectric sensor two detects the arrival of a bottle, stopping the main conveyor belt. A laser displacement sensor detects the cap height and calculates the capping pass rate. Based on the detection results, the extension time of the capping cylinder is adjusted to control capping accuracy, achieving closed-loop control. The actions in the 3D model of the capping machine constructed using NX MCD mechanical simulation software are completely synchronized with the PLC commands. When the synchronization error between the simulated actions of the virtual 3D model and the actual actions of the capping machine is less than 5 ms, the test is considered successful, and mass production can begin.