Twin simulation method for color ball circulating conveying equipment and related device
By building a geometric model of the color ball cycle conveying equipment and giving electromechanical properties, an MCD model is established, and combining a virtual programmable logic controller and KepServer to connect to the actual PLC controller, the problem of cross-domain information exchange of digital twin models is solved, and barrier-free information exchange between mechanical systems and control systems is realized, product debugging efficiency is improved and cost is reduced.
Patent Information
- Application Number
- CN202510395249.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-18
AI Technical Summary
The existing digital twin models cannot communicate information across fields, resulting in the inability to reflect the overall performance of the entire product.
Build a geometric model of the color ball cycle conveying equipment, give each part of the electromechanical properties, establish an MCD model, and connect the actual PLC controller to debug through a virtual programmable logic controller and KepServer to realize information exchange between the mechanical system and the control system.
It realizes barrier-free information exchange between mechanical systems and control systems, improves product debugging efficiency, and reduces debugging costs.
Smart Images

Figure CN120337527A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to a twin simulation method, and specifically relates to a twin simulation method for a colored ball circulating conveying device and related devices. Background Art
[0002] Digital twin, as an important bridge connecting the information world and the physical world throughout the entire life cycle of product manufacturing, can provide new ideas and methods for the intelligent production of the manufacturing industry.
[0003] Existing digital twin models often can only perform digital twin on products in a certain field, and information cannot be exchanged between different fields of the same product, resulting in incomplete digital twin models and being unable to reflect the comprehensive performance of the entire product. Summary of the Invention
[0004] In view of the technical problem that the current digital twin model cannot exchange information across fields and cannot reflect the comprehensive performance of the entire product, this application provides a twin simulation method for a colored ball circulating conveying device and related devices.
[0005] To achieve the above object, this application adopts the following technical solutions: In a first aspect, this application proposes a twin simulation method for a colored ball circulating conveying device, including: Construct a geometric model of the colored ball circulating conveying device; Assign mechanical and electrical properties to each part in the geometric model of the colored ball circulating conveying device to obtain basic mechanical and electrical objects; the basic mechanical and electrical objects include rigid bodies and collision bodies, as well as complexes of rigid bodies and collision bodies, and the motion modes of rigid bodies include kinematic pairs and constraints; Based on the basic mechanical and electrical objects, establish an MCD model of the colored ball circulating conveying device; Use a control program to debug the MCD model of the colored ball circulating conveying device based on a virtual programmable logic controller; Connect the control program of the programmable logic controller and the MCD model of the colored ball circulating conveying device through KepServer, so that the MCD model of the colored ball circulating conveying device is debugged under the control program of the programmable logic controller and the debugging results are fed back.
[0006] Further, the geometric model of the colored ball circulating conveying device includes a piston lifting mechanism, a three-axis cylinder manipulator mechanism, a mechanical cam mechanism, a conveyor belt mechanism, and a feeding mechanism; The piston lifting mechanism is used to lift and lower the colored balls to be conveyed. When rising, it enables the manipulator in the three-axis cylinder manipulator mechanism to grab the colored balls. When descending, it enables the next colored ball to be conveyed to enter the piston lifting mechanism and wait for conveyance; The three-axis cylinder manipulator mechanism is used to grab the colored balls from the piston lifting mechanism by the manipulator and transfer them to the mechanical cam mechanism; The mechanical cam mechanism is used to convey the colored balls to the conveyor belt mechanism; The conveyor belt mechanism is used to turn the conveying direction of the colored balls and then convey them to the feeding mechanism; The feeding mechanism is used to receive the colored balls conveyed by the conveyor belt mechanism, and raise the colored balls through rotational motion and then send them to the piston lifting mechanism.
[0007] Furthermore, the method for establishing the MCD model of the colored ball circulating conveying device based on the basic electromechanical objects includes: Configure kinematic pairs and constraints for the motion modes of the rigid bodies; Set position control and speed control for the kinematic pairs to make the kinematic pairs reach the preset positions and speeds; Based on the kinematic pairs and constraints, as well as the position control and speed control, design the simulation sequence of the colored ball circulating conveying device to obtain the MCD model of the colored ball circulating conveying device.
[0008] Furthermore, the kinematic pairs include sliding pairs, hinge pairs, fixed pairs, and gear pairs.
[0009] Furthermore, when setting the position control and speed control for the kinematic pairs, it also includes: triggering the position control and speed control by setting collision sensors.
[0010] Furthermore, the method for debugging the MCD model of the colored ball circulating conveying device by using a control program based on a virtual programmable logic controller includes: Load the control program and the human-machine interface into the virtual programmable logic controller; Make the control variables in the MCD model of the colored ball circulating conveying device correspond one by one to the variables in the control program; Simulate the real programmable logic controller operating environment through the virtual programmable logic controller; With the help of the signal adapter in the MCD, make the signals in the MCD correspond to the signals of the virtual programmable logic controller; Implement software-in-the-loop virtual debugging through the MCD and the virtual programmable logic controller, and view the motion simulation of the three-dimensional model of the colored ball circulating conveying device in the human-machine interface.
[0011] Furthermore, the method for connecting the control program of the programmable logic controller and the MCD model of the colored ball circulating conveying device through KepServer includes: Compile the control program and the human-machine interface in the PLC programming software; Export the signals defined in the PLC programming software and import them into KepServer; Configure external signals in the MCD simulation software, define the signal interface between the MCD virtual model and KepServer, and make the signals in KepServer correspond one to one with the signals in the MCD virtual model; Run the simulation of the MCD model of the colored ball circulation conveying equipment in MCD, send control instructions through the human-machine interface, and view the simulation results through the human-machine interface.
[0012] In the second aspect, the present application proposes a twin simulation system of a colored ball circulation conveying device, comprising: The geometric model module is used to build the geometric model of the ball circulation conveying equipment; The attribute module is used to assign electromechanical attributes to each part of the geometric model of the ball circulation conveying equipment to obtain basic electromechanical objects; the basic electromechanical objects include rigid bodies and collision bodies, as well as a complex of rigid bodies and collision bodies, and the motion mode of the rigid body includes kinematic pairs and constraints; An MCD model module is used to establish an MCD model of a colored ball circulation conveying device based on the basic electromechanical objects; Virtual debugging module, used to debug the MCD model of the ball circulation conveying equipment using the control program based on the virtual programmable logic controller; The semi-physical debugging module is used to connect the control program of the programmable logic controller and the MCD model of the colored ball circulating conveying equipment through KepServer, so that the MCD model of the colored ball circulating conveying equipment can be debugged under the control program of the programmable logic controller and the debugging results can be fed back.
[0013] In the third aspect, the present application proposes an electronic device, comprising: a memory, and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the steps of the above-mentioned twin simulation method of the colored ball circulating conveying device.
[0014] In a fourth aspect, the present application proposes a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned twin simulation method of the colored ball circulating conveying equipment are implemented.
[0015] Compared with the prior art, this application has the following beneficial effects: A twin simulation method for a colored ball circulating conveying device of the present application. First, a geometric model of the colored ball circulating conveying device is built. Then, mechanical and electrical properties are assigned to each part of the geometric model of the colored ball circulating conveying device. Next, based on basic mechanical and electrical objects, an MCD model of the colored ball circulating conveying device is established. Finally, simulation debugging can be carried out through fully virtual and semi-physical methods respectively. The present application first conducts geometric modeling on the product, then sets relevant mechanical and electrical properties for the geometric model, and uses relevant software to enable the virtual or actual controller to interact with the virtual model. The virtual model can be controlled through the PLC control program and can be selected according to objective conditions. Compared with traditional digital twin methods, the present application can enable unobstructed information exchange between the actual controller and the virtual mechanical model, conduct virtual debugging and semi-physical simulation, improve the product debugging efficiency, reduce the debugging cost, and provide an important reference for the research and development of new products.
[0016] The present application also proposes a twin simulation system for a colored ball circulating conveying device, an electronic device, and a computer storage medium, which possess all the advantages of the above-mentioned twin simulation method for a colored ball circulating conveying device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0018] Figure 1 Schematic diagram of the piston lifting mechanism in the embodiment of the present application; Figure 2 Schematic diagram of the three-axis cylinder manipulator mechanism in the embodiment of the present application; Figure 3 Schematic diagram of the mechanical cam mechanism in the embodiment of the present application; Figure 4 Schematic diagram of the conveyor belt mechanism in the embodiment of the present application; Figure 5 Schematic diagram of the feeding mechanism in the embodiment of the present application; Figure 6 Schematic diagram of the overall structure of the colored ball circulating conveying device in the embodiment of the present application; Figure 7 Schematic diagram of a twin simulation method for the colored ball circulating conveying device of the present application; Figure 8 Schematic diagram of the linear velocity of the colored balls in the fully virtual simulation based on MCD in the embodiment of the present application; Figure 9Schematic diagram of the full virtual commissioning method based on MCD and PLCSIM-advanced in the embodiment of the present application; Figure 10 Schematic diagram of the linear velocity of the connecting rod that drives the piston movement in the embodiment of the present application; Figure 11 Schematic diagram of the process of semi-physical virtual simulation commissioning based on OPC DA in the embodiment of the present application; Figure 12 Schematic diagram of the linear velocity of the right gripper in the semi-physical simulation based on MCD and the actual PLC in the embodiment of the present application; Figure 13 Schematic diagram of a twin simulation system for the colored ball circulating conveying equipment in the present application.
[0019] Wherein: 1 - temporary storage cylinder, 2 - piston mechanism, 3 - manipulator, 4 - cam mechanism, 5 - conveyor belt, 6 - conveyor, 7 - turntable, 8 - transfer box, 9 - chute. Detailed implementation manners
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Usually, the components of the embodiments of the present application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.
[0021] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application claimed, but merely represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the scope of protection of the present application.
[0022] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0023] In the description of the embodiments of the present application, it should be noted that if terms such as "upper", "lower", "horizontal", "inner", etc. are used to indicate the orientation or positional relationship, it is based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the inventive product is usually placed during use. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation of the present application. In addition, terms such as "first", "second", etc. are only used for descriptive distinction and cannot be construed as indicating or implying relative importance.
[0024] In addition, when the term "horizontal" appears, it does not mean that the component is required to be absolutely horizontal, but it can be slightly inclined. For example, "horizontal" only means that its direction is more horizontal relative to "vertical", and it does not mean that the structure must be completely horizontal, but it can be slightly inclined.
[0025] In the description of the embodiments of the present application, it should also be noted that unless otherwise clearly specified and limited, when the terms "set", "installed", "connected", and "coupled" appear, they should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific situations.
[0026] The colored ball circulating conveying device generally includes five units, specifically a piston lifting mechanism, a three-axis cylinder manipulator mechanism, a mechanical cam mechanism, a conveyor belt mechanism, and a feeding mechanism. As Figure 1 shown, it is a schematic diagram of the piston lifting mechanism. As Figure 2 shown, it is a schematic diagram of the three-axis cylinder manipulator mechanism. As Figure 3 shown, it is a schematic diagram of the mechanical cam mechanism. As Figure 4 shown, it is a schematic diagram of the conveyor belt mechanism. As Figure 5 shown, it is a schematic diagram of the feeding mechanism. As Figure 6 shown, it is a schematic diagram of the overall structure of the colored ball circulating conveying device. The overall working principle of the colored ball circulating conveying device is as follows: When the device is working, first, a colored ball is manually placed in the chute 9 and transferred into the temporary storage cylinder 1 below the manipulator 3. The piston mechanism 2 lifts the colored ball from the temporary storage cylinder 1. The manipulator 3 clamps the colored ball and places it on the conveyor belt 5 driven by the cam mechanism 4, and then it falls into the transfer box 8 via the conveyor belt 6. Finally, the turntable 7 sends the colored ball back to the chute 9, and so on for cyclic motion.
[0027] Specifically for each unit, the piston lifting mechanism pushes the piston rod up and down through the reciprocating motion of the cylinder or hydraulic cylinder. When the piston rod rises, it lifts the ball to a height that the manipulator 3 can pick up, and when it drops, it allows the next ball to enter the temporary storage tube 1. The three-axis cylinder manipulator mechanism is driven by the X, Y, and Z three-axis cylinders to realize the three-dimensional movement of the manipulator 3 in space. The cylinder-driven manipulator 3 completes the gripping and releasing of the ball. Precise trajectory control and action sequence can be achieved through motion controller programming. In the mechanical cam mechanism, when the camshaft rotates, its curved profile pushes the follower (such as a rocker or a slider) to move in a straight line. The motion trajectory of the follower is designed to ensure that the ball is accurately transferred to the conveyor belt 6. The conveyor belt mechanism moves the ball with the belt through friction, and can support the conveyor belt 5 through rollers and rollers to ensure its smooth operation. The feeding mechanism transfers the ball from the transfer box 8 to the entrance of the chute 9 through the design of the turntable 7. The turntable 7 can be driven by a motor or a cylinder to achieve intermittent or continuous movement. The ball circulation conveying equipment realizes efficient and stable circulation conveying function, and the various units work together to ensure the continuous supply and delivery of balls. Digital twins, also known as digital twins and digital mapping, refer to the full use of physical models, sensors, operation history and other data, integrating multidisciplinary and multi-scale simulation processes, as a mirror image of physical products in virtual space, reflecting the entire life cycle of the corresponding physical entity products. With the advent of the information age, the manufacturing industry has long been freed from traditional physical mechanical processing and manufacturing methods. At present, it is mainly the interaction between the information world and the physical world. In order to accelerate the integration of manufacturing resources and services in the information space and the physical space, it is necessary to make full use of the new generation of information technology. The emergence of digital twins can perfectly solve this problem and achieve the goal of intelligent manufacturing. As an important bridge connecting the information world and the physical world throughout the life cycle of product manufacturing, digital twins can provide new ideas and methods for intelligent production in the manufacturing industry.
[0028] Existing digital twin models can often only perform digital twinning of products in a certain field, such as digital twinning of the mechanical structure of a product, or digital twinning of the control system of a product. Different parts of the same product cannot communicate with each other, such as the mechanical system and the control system cannot communicate, and information cannot be exchanged between the virtual model and the actual model, resulting in an incomplete digital twin model that cannot reflect the comprehensive performance of the entire product.
[0029] Based on the above situation, for the ball circulation conveying equipment, this application proposes a twin simulation method and related devices for the ball circulation conveying equipment, which combines the electromechanical concept for simulation design, and can more accurately reflect the comprehensive performance of the entire ball machine. The application is described in detail below in conjunction with the embodiments and drawings.
[0030] like Figure 7As shown, it is a schematic diagram of a twin simulation method of the ball circulation conveying equipment of the present application, which may include: S101, build the geometric model of the colored ball circulation conveying equipment.
[0031] By creating a geometric model that accurately reflects the physical structure of the ball circulation conveyor, the foundation can be laid for the subsequent electromechanical property assignment and MCD model establishment. In practical applications, modeling tools can be used to draw various parts of the ball circulation conveyor according to the actual size and shape of the equipment, such as conveyor belts, balls, drive wheels, driven wheels, support structures, etc. By comparing the size and shape of the geometric model with the actual equipment, the accuracy and reliability of the model can be ensured.
[0032] S102, assigning electromechanical properties to each part of the geometric model of the ball circulation conveying equipment respectively to obtain basic electromechanical objects; the basic electromechanical objects include rigid bodies and collision bodies, and a complex of rigid bodies and collision bodies, and the movement mode of the rigid body includes kinematic pairs and constraints.
[0033] Convert the geometric model into a mechatronic object with physical meaning so as to perform dynamic and kinematic simulation in the MCD model. Define each part in the geometric model (such as conveyor belt, colored balls, drive wheel, etc.) as a rigid body. The rigid body will not deform during the simulation, and only its kinematic parameters such as position, velocity and acceleration are considered. For parts that may collide (such as colored balls and conveyor belts, colored balls and colored balls), define collision bodies and set collision parameters (such as collision recovery coefficient, friction coefficient, etc.) to simulate the collision process in the simulation. For some complex parts (such as the contact between the drive wheel and the conveyor belt), it may be necessary to define the rigid body and the collision body together to more accurately simulate its kinematic and dynamic behavior.
[0034] The assignment of electromechanical properties gives the geometric model physical meaning and provides a basis for subsequent MCD model establishment and simulation.
[0035] S103: Establishing a MCD model of the colored ball circulation conveying equipment based on the basic electromechanical objects.
[0036] Using MCD (Mechatronic Concept Designer) software, basic electromechanical objects are combined to build a complete simulation model of the ball circulation conveying equipment. In practical applications, the defined basic electromechanical objects can be imported into the MCD software, and the electromechanical objects can be assembled and connected in the MCD according to the actual structure of the equipment to form a complete equipment model. Then, according to the actual working conditions of the equipment, the simulation parameters (such as gravity acceleration, simulation time, step length, etc.) are set. The establishment of the MCD model provides a simulation platform for the subsequent control system design and debugging, enabling personnel to conduct comprehensive testing and verification of the equipment in a virtual environment.
[0037] S104, use the control program based on the virtual programmable logic controller to debug the MCD model of the colored ball circulating conveying device.
[0038] By using the virtual PLC controller and the written control program, the MCD model is debugged to verify the correctness and effectiveness of the control system. The integrated debugging of the control system and the equipment model is realized, providing a reference and basis for subsequent physical debugging.
[0039] S105, connect the control program of the programmable logic controller and the MCD model of the colored ball circulating conveying device through KepServer, so that the MCD model of the colored ball circulating conveying device is debugged under the control program of the programmable logic controller, and the debugging results are fed back.
[0040] Use the KepServer data acquisition service software to realize the communication and data exchange between the actual PLC controller and the MCD model, so as to debug the MCD model under the actual control program. Run the control program in the actual PLC controller, control the MCD model, observe the motion state and simulation results of the equipment, and further debug and optimize the control program. At the same time, the MCD model feeds back the simulation results to the PLC controller and the human-machine interface for operators to monitor and analyze.
[0041] The integrated debugging of the actual control system and the virtual equipment model is realized, providing a reliable guarantee for the actual operation of the equipment. Through the connection and debugging of KepServer, problems can be found and solved in time, improving the stability and reliability of the equipment.
[0042] This application uses mechatronic conceptual design to simulate the operation process of the colored ball machine, enabling communication between the mechanical system and the control system, realizing the virtual simulation and semi-physical simulation of the colored ball machine, more accurately reflecting the comprehensive performance of the entire colored ball machine system, providing an important reference for the overall design and testing of the product, and greatly reducing the R & D cost of the product.
[0043] The following further details this application through a specific embodiment.
[0044] S201, build the geometric model of the colored ball circulating conveying device.
[0045] According to the five units included in the colored ball circulating conveying device: the piston lifting mechanism, the three-axis cylinder manipulator mechanism, the mechanical cam mechanism, the conveyor belt mechanism and the feeding mechanism. Geometric modeling is carried out for the five units respectively. Each unit can be separated and controlled independently. After the debugging of each unit is completed, it can be assembled into a whole machine equipment for debugging, so that the geometric model of the colored ball circulating conveying device can be assembled and disassembled, and can complete the colored ball circulating conveying work.
[0046] In practical applications, take the NX software as an example. For the piston lifting mechanism, first create a reference, then draw the piston contour curve on the XC-YC plane, use the rotation command to rotate 360° around the central axis to generate the base, and then modify the detailed features, such as drawing the boss contour on the top plane and performing stretching, etc., and adjust according to the specific structural details. Finally, perform motion verification, assemble the piston rod, add a cylindrical pair constraint, and set the piston stroke, etc. For each unit, the model building details can be adjusted according to different specific structures, and most of them need to go through base modeling, revolving body modeling, profile generation, detailed feature modification, motion verification, etc., and motion constraints can also be set according to actual needs.
[0047] S202, establish the MCD model of the colored ball circulating conveyor equipment.
[0048] In this embodiment, establishing the MCD model of the colored ball circulating conveyor equipment can be completed through several steps including electromechanical object definition, kinematic pair configuration, control strategy determination, and simulation sequence. Specifically: (1) Electromechanical object definition.
[0049] Endow the geometric model of the colored ball machine with electromechanical properties to form a basic electromechanical object. The basic electromechanical object includes a rigid body and a collision body. In practical applications, the rigid body usually includes moving objects in the model such as colored balls, turbines, and worm gears. The collision body includes objects that collide during the operation of the colored ball machine. For example, colored balls and pistons, etc. In addition, some objects may collide during the movement process, and they are both rigid bodies and collision bodies, such as colored balls, pistons, etc. In practical applications, physical properties such as mass and moment of inertia can be assigned to the rigid body, and the restitution coefficient and friction coefficient can be defined as the collision body properties for the collision body. The rigid body properties can ensure that the components move according to physical laws, and the collision body properties define the collision response. The two together constitute the basic physical behavior of the electromechanical model.
[0050] (2) Configure kinematic pairs and constraints.
[0051] The motion mode of the rigid body can be defined through kinematic pairs and constraints. The kinematic pairs in this embodiment include common sliding pairs, hinge pairs, and fixed pairs. The relative motion between components is defined through sliding pairs, hinge pairs, and fixed pairs. For example, the vertical slide rail translation pair limits the stroke to ±300 mm, and the crossbeam cylindrical pair allows rotation and translation. In addition, in order to represent the coupling relationship between two kinematic pairs, a gear pair is also used in this embodiment. In practical applications, a gear pair can be added between the turbine and the worm gear, and then the transmission ratio and meshing clearance are defined.
[0052] It should be noted that the fixed pair can represent the existence of a fixed relationship between two rigid bodies, and can also be used to represent the realization of the action of grasping the small ball.
[0053] (3) Implement control strategy.
[0054] In MCD, position control and speed control can be used to control the kinematic pair so that the kinematic pair reaches the required position and speed. Collision sensors can also be used to express relevant logical relationships.
[0055] In actual application, the connection part of the fixed pair is empty at the beginning, the basic part is the right gripper, and the right gripper is defined as a collision sensor. The fixed pair generates a simulation sequence, indicating that at the corresponding time point, the connection part is selected as the collision sensor defined for the right gripper. By editing the parameters, the ball grabbing action can be realized. At the corresponding time, the connection part is set to empty again to realize the ball release action. Position control, speed control, collision sensor, etc. are displayed in the sensor and actuator module, and the signal is established in the signal adapter.
[0056] When actually controlling, the collision sensor is used to detect physical trigger events, such as collision, contact, pressure change, etc. For example, the right gripper detects whether it touches the ball through the collision sensor, which plays the role of triggering the control logic. Then the position control and speed control are carried out dynamically, and the control result may affect the state of the collision sensor, thus forming a closed-loop optimization control method.
[0057] like Figure 8 As shown, it is a schematic diagram of the linear velocity of the colored ball in the full virtual simulation based on MCD.
[0058] (4) Design simulation sequence In the software MCD, the logical relationship between each action is realized through the simulation sequence of MCD. The action process of the ball circulation conveying equipment can be divided into 19 steps: the ball rises, the gripper opens, the vertical slide rail goes down, the gripper closes, the fixed pair is generated, the vertical slide rail goes up, the crossbeam moves, the gripper opens, the fixed pair is deleted, the cam is reset, the gripper is reset, the vertical beam is reset, the crossbeam is reset, the ball falls on the track, the ball is pushed, the turbine rotates, the push plate is reset, and the worm is reset.
[0059] In actual applications, simulation sequences can include condition-based simulation sequences (green) and time-based simulation sequences (blue). Among them, the condition-based simulation sequence sets the action trigger based on the sensor signal, for example, the collision sensor triggers → generates a fixed pair (grasping). For another example, the pressure sensor>15N→deletes the fixed pair (release), etc. The time-based simulation sequence defines the time-based action flow. For example, 0-2s for piston lifting, 3-5s for gripper opening, and 6-8s for vertical slide rail descending. The time-based simulation sequence plans the basic action flow, and the condition-based simulation sequence adjusts the action according to real-time feedback to realize the intelligent operation of the equipment.
[0060] In practical applications, the model can also be verified and optimized, monitoring the color ball conveying cycle, grasping success rate, equipment energy consumption, etc., and optimizing the model settings according to the monitoring results.
[0061] S203, full virtual simulation based on MCD and PLCSIM-advanced.
[0062] Such as Figure 9 As shown, it is a schematic diagram of the full virtual debugging method process based on MCD and PLCSIM-advanced. It can include: Program the control program and human-machine interface in TIA Portal; Download the control program and human-machine interface to PLCSIM-advanced (virtual PLC); Correspond the control variables of the color ball circulating conveying equipment in MCD with the variables in the control program one by one; Based on PLCSIM-advanced, use the control program to debug the MCD model of the color ball circulating conveying equipment in MCD.
[0063] In practical applications, it can be specifically realized through the following steps: (1) PLC hardware configuration and communication network construction.
[0064] In this embodiment, configuration design is carried out based on Siemens S7-1500 series PLC (Programmable Logic Controller) to ensure data security and communication stability. Add CP1511-1 PN CPU and KTP 700 Basic compact touch screen in TIA Portal, establish a Profinet link, and complete the configuration. It should be noted that Profinet is an industrial Ethernet protocol that supports real-time communication and ensures data synchronization between the PLC, HMI, and devices.
[0065] Here, a communication link between the PLC and the HMI is established through Profinet to provide physical layer support for subsequent signal interaction.
[0066] (2) MCD signal definition and PLC variable mapping.
[0067] The color ball circulating conveying equipment involves multiple actuators and sensors, and there are many interaction signals with external equipment (PLC). Therefore, first establish all signals that need to interact with external equipment (PLC) in NX-MCD, and then correspond to the variables in TIA Portal to achieve mapping. In practical applications, to achieve mapping, the MCD signals and PLC variables can be bound by address or tag name to realize two-way data transmission. By making the MCD signal definition strictly match the variables in the PLC program, the consistency between the virtual model and the PLC logic is ensured.
[0068] (3) PLC control program and human-machine interface development.
[0069] According to the production process of the colored ball conveying equipment and the definition of sensors and actuators in NX-MCD, write the PLC control program and the human-machine interaction interface in the TIA Portal environment. Except for the grasping action of the colored balls, all logical relationships can be realized through the PLC control program. You can write the PLC ladder diagram or SCL program in the TIA Portal to realize the logical control of the colored ball conveying equipment, such as the start and stop of the conveyor belt and the action of the pusher mechanism. Among them, the ladder diagram is a PLC programming language that can intuitively reflect the logic of the electrical control circuit, and SLC is a structured control language that can be used to implement complex algorithms.
[0070] (4) Virtual PLC startup and program deployment.
[0071] Start the virtual PLC to simulate the real PLC operating environment, and download the control program and the human-machine interface in TIA Portal to PLCSIM-advanced (virtual PLC).
[0072] (5) MCD signal adapter configuration and parameter binding.
[0073] Create a signal adapter in the signal adapter of MCD, configure the signal type, such as input / output, and you can also configure the data format, such as boolean / numeric. Then bind the signal adapter to the parameters of the mechatronic object so that the signals in MCD can correspond to the signals of the PLC.
[0074] (6) Software-in-the-loop co-simulation.
[0075] Start the MCD simulation, load the 3D mechanical model, and then operate the equipment on the HMI to observe the mechanical actions in MCD. It should be noted that software-in-the-loop is to simulate the loop through software to verify the integration effect of the PLC program and the mechanical model. Through software-in-the-loop simulation, the coordination between the PLC control logic and the mechanical movement can be verified, and complex systems can be debugged without actual hardware.
[0076] In practical applications, after external signal configuration and signal mapping, software-in-the-loop virtual debugging of the MCD and virtual PLC program can be realized. The motion simulation of the 3D model of the colored ball conveying equipment can be carried out through the HMI screen, and real-time data can be observed and analyzed in the MCD "runtime viewer" by adding the specified object status. As Figure 10 shown, it is a schematic diagram of the linear velocity of the connecting rod that drives the piston movement.
[0077] S204, Hardware-in-the-loop simulation based on MCD and actual PLC controller.
[0078] AsFigure 11 As shown, it is a schematic diagram of the process for semi-physical virtual simulation debugging based on OPC DA, which may include: (1) Compile the control program and human-machine interface in TIA Portal, and download the control program and human-machine interface to the actual controller PLC; (2) Model in MCD and set the signals to correspond one by one with the signals of the control program; (3) Connect the TIA Portal PLC program control and the NX-MCD virtual model with the help of KepServer; (4) Conduct semi-physical virtual simulation debugging based on OPC DA.
[0079] Based on the communication protocol OPC DA (OPC Data Access), the actual PLC controller can be connected to the software MCD through the software KepServer, and the virtual model in MCD can be controlled through the program.
[0080] In this embodiment, the specific implementation steps may include: (1) PLC program and human-machine interface design.
[0081] The PLC program and human-machine interface compiled in TIA Portal are the same as the full virtual simulation based on MCD and PLCSIM-advanced. Compile the control program in TIA Portal (PLC programming software), define the input / output signals, logical control relationships, etc. of the PLC. And design the human-machine interface, map the control parameters, status information, etc. of the PLC to the display elements of the human-machine interface to facilitate operators to monitor and control the system.
[0082] In practical applications, first power on devices such as the PLC, and then download the control program in TIA Portal to the actual PLC controller, and download the human-machine interface to the human-machine interface device.
[0083] (2) Signal export and import to KepServer.
[0084] Export the input / output signals defined in TIA Portal, which can usually be exported as a file of a certain format (such as CSV, XML, etc.). Then import the exported signal file into KepServer, and configure the communication connection between KepServer and the PLC controller to ensure that KepServer can correctly read and write the signals of the PLC.
[0085] It should be noted that KepServer is a relatively common data acquisition service software in industrial control, which provides various types of drivers and has wide applicability. During the implementation or testing of a project, it may be the case that there are no devices such as sensors, actuators, or PLCs, and thus it is not possible to test the effectiveness of the work results through real-time data. KepServer provides a data simulation function and can provide simulation data of various types and formats. Therefore, KepServer is used as an intermediate bridge between the TIA Portal PLC program control and the NX-MCD virtual model.
[0086] (3) MCD external signal configuration and signal mapping.
[0087] Configure external signals in the MCD simulation software to define the signal interface between the MCD virtual model and KepServer. Then, perform signal mapping to map the signals in KepServer one-to-one with the input / output signals of the MCD virtual model, ensuring that MCD can correctly receive the control signals from KepServer and feedback the simulation results back to KepServer. This ensures that the MCD virtual model can correctly respond to the control signals from the PLC controller.
[0088] (4) Run the simulation and control system test.
[0089] Start the MCD simulation software and run the simulation of the virtual model. Send control instructions to the PLC controller through the human-machine interface. The PLC controller processes the instructions according to the control program and transmits the control signals to the MCD virtual model through KepServer. The MCD virtual model performs simulation operations based on the received control signals and feedbacks the simulation results (such as the linear velocity of the right gripper, etc.) back to the PLC controller and the human-machine interface through KepServer. The operator can monitor the simulation results through the human-machine interface and test and verify the control system.
[0090] As Figure 12 shown, it is a schematic diagram of the linear velocity of the right gripper in the hardware-in-the-loop simulation based on MCD and the actual PLC.
[0091] It should be noted that the specific structure of the colored ball circulating conveying device in this application may change, which does not affect the twin simulation method of this application. It only needs to be adjusted when building the geometric model and make adaptive adjustments in the subsequent steps.
[0092] This application first performs geometric modeling on the product, then sets relevant attributes for the geometric model, including rigid bodies, collision bodies, etc. Next, kinematic pairs are set for the relevant connection parts of the model, and positions and velocities are set for the kinematic pairs. The positions and velocities can be controlled through simulation sequences, relevant signals are detected by sensors to trigger relevant simulation sequences, and signal interactions can also be set. Based on relevant communication protocols, relevant software is used to enable the virtual or actual controller to interact with the virtual model. The virtual model can be controlled through the PLC control program and can be selected according to objective conditions. Compared with traditional digital twin methods, the method of this application enables unobstructed information exchange between the actual controller and the virtual mechanical model, allows for virtual commissioning and hardware-in-the-loop simulation, improves the product commissioning efficiency, reduces the commissioning cost, and provides an important reference for new product R & D. In practical applications, this method can be applied to the education field. First, students are required to write programs to commission the virtual model through the controller. After the virtual model is successfully commissioned, the real physical device is commissioned. Under the premise of ensuring teaching quality, the teaching efficiency is improved and the teaching cost is reduced.
[0093] As Figure 13 shown, it is a schematic diagram of a twin simulation system for a colored ball circulating conveying device of this application, which may include: A geometric model module for building a geometric model of the colored ball circulating conveying device; An attribute module for respectively assigning electromechanical attributes to each part of the geometric model of the colored ball circulating conveying device to obtain basic electromechanical objects; the basic electromechanical objects include rigid bodies and collision bodies, as well as a rigid body and collision body complex, and the motion modes of the rigid bodies include kinematic pairs and constraints; An MCD model module for establishing an MCD model of the colored ball circulating conveying device based on the basic electromechanical objects; A virtual commissioning module for commissioning the MCD model of the colored ball circulating conveying device by using a control program based on a virtual programmable logic controller; A hardware-in-the-loop commissioning module for connecting the control program of the programmable logic controller and the MCD model of the colored ball circulating conveying device through KepServer, enabling the MCD model of the colored ball circulating conveying device to be commissioned under the control program of the programmable logic controller and feeding back the commissioning results.
[0094] It should be noted that in the several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of each module is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules can be combined or integrated into another device, or some features can be ignored or not executed. The modules described as separate components may or may not be physically separated. The components shown as modules can be a physical unit or multiple physical units, that is, they can be located in one place or distributed to multiple different places. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0095] In addition, in each embodiment of the present invention, the modules can be integrated in a processing unit, or each module can exist physically alone, or two or more modules can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0096] The embodiment of the present application further provides an electronic device, which may include one or more processors, a memory, and a communication interface.
[0097] Among them, the memory and the communication interface are coupled to the processor. For example, the memory and the communication interface can be coupled together through a bus.
[0098] Among them, the communication interface is used for data transmission with other devices. The memory stores computer program code. The computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the steps of the above-mentioned color ball cyclic conveying device twin simulation method.
[0099] Among them, the processor can be a processor or a controller. For example, it can be a Central Processing Unit (CPU), a general-purpose processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on. The processor can be used to support the electronic device in executing the method steps provided in the above embodiments.
[0100] Among them, the bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The above buses can be divided into an address bus, a data bus, a control bus, etc.
[0101] A computer-readable storage medium provided by an embodiment of the present application stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned color ball circulating conveying device twin simulation method are implemented.
[0102] The computer-readable storage medium involved in the present application includes a Random Access Memory (RAM), an internal memory, a Read-Only Memory (ROM), an Electrically Programmable ROM, an Electrically Erasable Programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium well-known in the technical field.
[0103] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A twin simulation method for a colored ball circulating conveying device, characterized in that, include: Build the geometric model of the ball circulation conveying equipment; Assign electromechanical properties to each part of the geometric model of the ball circulation conveying equipment to obtain basic electromechanical objects; The basic electromechanical objects include rigid bodies and collision bodies, as well as complexes of rigid bodies and collision bodies. The motion modes of rigid bodies include kinematic pairs and constraints. Based on the basic electromechanical objects, an MCD model of the colored ball circulation conveying equipment is established; Based on the virtual programmable logic controller, the control program is used to debug the MCD model of the colored ball circulation conveying equipment; The control program of the programmable logic controller and the MCD model of the colored ball circulating conveying equipment are connected through KepServer, so that the MCD model of the colored ball circulating conveying equipment can be debugged under the control program of the programmable logic controller and the debugging results can be fed back.
2. The twin simulation method of the colored ball circulating conveying device according to claim 1, characterized in that The geometric model of the colored ball circulation conveying equipment includes a piston lifting mechanism, a three-axis cylinder manipulator mechanism, a mechanical cam mechanism, a conveyor belt mechanism and a feeding mechanism; The piston lifting mechanism is used to lift the colored ball to be transported. When it is lifted, the manipulator (3) in the three-axis cylinder manipulator mechanism can grab the colored ball. When it is lowered, the next colored ball to be transported enters the piston lifting mechanism and waits for transport. The three-axis cylinder manipulator mechanism is used to grab the colored balls from the piston lifting mechanism and transfer them to the mechanical cam mechanism through the manipulator (3); The mechanical cam mechanism is used to transfer the colored balls to the conveyor belt mechanism; The conveyor belt mechanism is used to divert the conveying direction of the colored balls and then convey them to the feeding mechanism; The feeding mechanism is used to receive the colored balls transported by the conveyor belt mechanism, and to raise the colored balls through rotational motion and then send them to the piston lifting mechanism.
3. The twin simulation method of the colored ball circulating conveying device according to claim 1, characterized in that, The method for establishing the MCD model of the colored ball circulation conveying equipment based on the basic electromechanical object comprises: Configure joints and constraints for the motion of rigid bodies; Set position control and speed control for the kinematic pair to make the kinematic pair reach the preset position and speed; Based on the kinematic pairs and constraints, as well as position control and speed control, the simulation sequence of the ball circulation conveying equipment is designed, and the MCD model of the ball circulation conveying equipment is obtained.
4. The twin simulation method of the colored ball circulating conveying device according to claim 3, wherein, The kinematic pair comprises a sliding pair, a hinge pair, a fixed pair and a gear pair.
5. The twin simulation method of the colored ball circulating conveying device according to claim 3, wherein When the position control and speed control are set for the kinematic pair, the method further includes: triggering the position control and speed control by setting a collision sensor.
6. The twin simulation method of the colored ball circulating conveying device according to claim 1, characterized in that, The method for debugging the MCD model of the colored ball circulation conveying equipment using a control program based on a virtual programmable logic controller comprises: Load the control program and human-machine interface into the virtual programmable logic controller; Make the control variables in the MCD model of the ball circulation conveying equipment correspond one to one with the variables in the control program; Simulate the real PLC operating environment through the virtual PLC; By means of the signal adapter in the MCD, the signal in the MCD is made to correspond to the signal of the virtual programmable logic controller; Software-in-the-loop virtual debugging is achieved through MCD and virtual programmable logic controller, and the motion simulation of the three-dimensional model of the ball circulation conveying equipment is viewed in the human-machine interface.
7. The twin simulation method of the colored ball circulating conveying device according to claim 1, characterized in that The method of connecting the control program of the programmable logic controller and the MCD model of the colored ball circulation conveying equipment through KepServer includes: Program control programs and human-machine interfaces in PLC programming software; Export the signals defined in the PLC programming software and import them into KepServer; Configure external signals in the MCD simulation software, define the signal interface between the MCD virtual model and KepServer, and make the signals in KepServer correspond one to one with the signals in the MCD virtual model; Run the simulation of the MCD model of the colored ball circulation conveying equipment in MCD, send control instructions through the human-machine interface, and view the simulation results through the human-machine interface.
8. A twin simulation system for a colored ball circulating conveying device, characterized in that, include: The geometric model module is used to build the geometric model of the ball circulation conveying equipment; The attribute module is used to assign electromechanical attributes to each part of the geometric model of the ball circulation conveying equipment to obtain basic electromechanical objects; the basic electromechanical objects include rigid bodies and collision bodies, as well as a complex of rigid bodies and collision bodies, and the motion mode of the rigid body includes kinematic pairs and constraints; An MCD model module is used to establish an MCD model of a colored ball circulation conveying device based on the basic electromechanical objects; Virtual debugging module, used to debug the MCD model of the ball circulation conveying equipment using the control program based on the virtual programmable logic controller; The semi-physical debugging module is used to connect the control program of the programmable logic controller and the MCD model of the colored ball circulating conveying equipment through KepServer, so that the MCD model of the colored ball circulating conveying equipment can be debugged under the control program of the programmable logic controller and the debugging results can be fed back.
9. An electronic device, characterized in that, include: A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the steps of the twin simulation method of the colored ball circulating conveying device as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the twin simulation method of the colored ball circulating conveying equipment as described in any one of claims 1 to 7.