Virtual debugging method and device for USB flash disk assembly production line
Through the virtual debugging method based on NX software, the problem of high debugging time and resource consumption of USB disk assembly line is solved, efficient virtual debugging and collision detection is achieved, and production efficiency and product quality are improved.
Patent Information
- Application Number
- CN202411248111.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-02-11
AI Technical Summary
In the prior art, debugging of USB disk assembly production lines requires a lot of time and resources, and there are uncertainties and risks.
Using the virtual debugging method based on NX software, a three-dimensional model is established through the CAD module, the MCD module is used for motion simulation, TIA Portal designs the PLC control program, and realizes the linkage between TIA Portal and NX through PLCSIM Advanced, performs virtual debugging, and mechanically Collision detection and path optimization are performed during arm movement.
It realizes efficient virtual debugging of USB drive assembly production lines, shortens product R&D cycle, reduces production costs, improves product quality, and reduces the complexity of engineering practices.
Smart Images

Figure CN119416423A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of virtual debugging, and in particular to a virtual debugging method and device for a USB disk assembly production line. Background Art
[0002] As modern technology continues to improve, various applications are constantly iterating and upgrading, and as customers' requirements for product quality continue to increase, the functions of the system are constantly being optimized and improved. Most of the manual labor on the assembly line is gradually replaced by intelligent devices, and virtual commissioning plays an increasingly important role in the design and optimization of assembly lines.
[0003] At present, most assembly production lines have problems with low intelligence and low production efficiency. The design and debugging of traditional assembly production line systems often takes a lot of time and resources, and there are many uncertainties and risks. USB flash drives are widely popular because of their advantages such as fast reading and writing speed and portability, making the corresponding electronic production assembly line a key point. Therefore, the first problem to be dealt with is to use a simulation and monitoring design platform to reasonably control and deploy the USB flash drive assembly production line. Summary of the invention
[0004] The present invention provides a virtual debugging method and device for a U disk assembly production line, which are used to solve the defect that the debugging of the U disk assembly production line in the prior art requires a lot of time and resources, and realize the virtual debugging of the U disk assembly production line based on NX.
[0005] The present invention provides a virtual debugging method for a USB disk assembly production line, comprising: Use NX CAD module to build a 3D model of the USB flash drive assembly line; Using the MCD module of the NX to perform motion simulation on the three-dimensional model to define physical properties, motion properties and simulation sequence of the three-dimensional model, and obtain an MCD simulation model of the three-dimensional model; Using TIA Portal to design a PLC control program for the three-dimensional model to control the motion simulation; The linkage between the TIA Portal and the NX is achieved through PLCSIM Advanced, and the MCD simulation model is controlled by the PLC control program for virtual debugging; in the MCD, the three-dimensional model of the moving robotic arm is subjected to collision detection, and the working path of the robotic arm is modified in the event of a collision of the robotic arm.
[0006] The present invention also provides a virtual debugging device for a U disk assembly production line, comprising: A construction module for building a 3D model of the USB flash drive assembly line using the CAD module of NX; A simulation module, used for performing motion simulation on the three-dimensional model using the MCD module of the NX, so as to define the physical properties, motion properties and simulation sequence of the three-dimensional model, and obtain an MCD simulation model of the three-dimensional model; A control module, used for designing a PLC control program for the three-dimensional model using TIA Portal to control the motion simulation; The debugging module is used to realize the linkage between the TIA Portal and the NX through PLCSIM Advanced, and the PLC control program controls the MCD simulation model for virtual debugging; in the MCD, collision detection is performed on the three-dimensional model of the moving robot arm, and when the robot arm collides, the working path of the robot arm is modified.
[0007] The virtual debugging method and device of the USB flash drive assembly production line provided by the present invention designs the USB flash drive assembly production line based on NX software and completes the virtual debugging simulation thereof. First, the CAD module of NX is used to establish a three-dimensional model of the USB flash drive assembly production line, and then the MCD module of NX is used as the digital model for creation and simulation. A virtual PLC is established in TIA Portal and programmed using ladder diagram language. The linkage between the software TIA Portal and the software NX is completed through PLCSIM Advanced to realize the virtual simulation of the assembly production line. At the same time, the interference function in the MCD module of NX is used to perform collision detection on the robot arm during the movement process to realize the virtual debugging of the USB flash drive assembly production line, and the problems generated in the production line can be discovered and solved, thereby shortening the product development cycle, reducing the production cost of the product, improving the product quality, and reducing the complexity of engineering practice. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0009] Figure 1 It is a flow chart of a virtual debugging method for a USB disk assembly production line provided by the present invention; Figure 2 It is a schematic diagram of the NX MCD motion simulation definition process in the virtual debugging method of the U disk assembly production line provided by the present invention; Figure 3 It is a control flow diagram of a PLC program in a virtual debugging method for a USB disk assembly production line provided by the present invention; Figure 4It is a schematic diagram of simulation movement in the virtual debugging method of the USB disk assembly production line provided by the present invention; Figure 5 It is a schematic diagram of the virtual debugging process in the virtual debugging method of the USB disk assembly production line provided by the present invention; Figure 6 It is a structural schematic diagram of the main conveyor belt in the virtual debugging method of the USB disk assembly production line provided by the present invention; Figure 7 It is a structural schematic diagram of a feeding module in a virtual debugging method for a USB disk assembly production line provided by the present invention; Figure 8 It is a structural schematic diagram of the U disk tray parts in the U disk assembly production line virtual debugging method provided by the present invention; Fig. 9 It is a schematic diagram of the bottom of the chassis of the USB disk tray in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig.10 It is a structural schematic diagram of a mechanical arm in a virtual debugging method for a USB disk assembly production line provided by the present invention; Fig.11 It is a schematic diagram of the overall assembly of the three-dimensional model in the virtual debugging method of the USB flash drive assembly production line provided by the present invention; Fig.12 It is a schematic diagram of the physical property definition process in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig.13 It is a schematic diagram of the electromechanical conceptual design process of the USB disk assembly production line in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig.14 It is a schematic diagram of a grid model in the virtual debugging method of a USB disk assembly production line provided by the present invention; Fig.15 It is a schematic diagram of the crossover operation of the genetic algorithm in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig.16 It is a schematic diagram of the variation operation of the genetic algorithm in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig.17 It is a flow chart of the genetic algorithm in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig.18 It is a schematic diagram of the motion trajectory of the robot arm in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig.19 It is a schematic diagram of the optimal path curve of the robot arm in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig. 20 It is the right view of interference detection in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig.21It is a rear view of interference detection in the virtual debugging method of the USB disk assembly production line provided by the present invention; Fig. 22 It is a timing diagram of the joint axis position in the virtual debugging method of the U disk assembly production line provided by the present invention; Fig.23 It is a timing diagram of the output shaft position in the virtual debugging method of the USB disk assembly production line provided by the present invention. DETAILED DESCRIPTION
[0010] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0011] Combine the following Figure 1 A virtual debugging method for a USB disk assembly production line of the present invention is described, comprising: Step 101, using the CAD (Computer Aided Design) module of NX to establish a three-dimensional model of the USB flash drive assembly production line; The model of the USB flash drive assembly production line is designed, and the work scene is built using the NX CAD modeling environment. The work scene planning is mainly designed based on the assembly process, equipment tool model, motion path and other aspects.
[0012] NX is an integrated computer-aided design software that has the advantages of traditional modeling and parametric modeling. It is a technology that combines dimension-driven functions with fully relevant parametric functions. It also has comprehensive surface modeling and solid modeling functions. It covers all aspects from product design to manufacturing and simulation analysis, and realizes the digitization and integration of the product development process. NX CAD has a wealth of modeling tools and functions, including solid modeling, surface modeling, sketch design, etc., which can meet the design needs of various complex products.
[0013] The three-dimensional model of the USB flash drive assembly production line structure includes the robotic arms used in the production line, equipment dimensions, product types produced by the assembly line, and conveyor belt operation analysis.
[0014] Step 102, using the MCD (Mechatronics Concept Designer) module of the NX to perform motion simulation on the three-dimensional model to define physical properties, motion properties and simulation sequence of the three-dimensional model, and obtain an MCD simulation model of the three-dimensional model; The motion in the 3D model of the USB flash drive assembly line is designed, and the NX MCD function is used to design motion simulation. The simulation planning is mainly based on factors such as the assembly process, the physical properties of the model, and the motion path.
[0015] NX MCD is mainly used to simulate the movement between mechanical parts or components. The simulation supports multi-disciplinary integrated parallel design, realizes the collaborative design of mechanical, electrical and software, and enables the simulation design work to be carried out efficiently. Based on the digital model of the design object, it can access the control software and control hardware, so that virtual debugging can be carried out at all stages of product design. It defines the real-time motion simulation of the physical properties of the object, uses a real-time motion simulation engine, and dynamically feedbacks the user's interaction. It can realize the verification of the conceptual model, and the user can drag the design object freely. MCD can shorten the test time of product debugging, reduce design costs, reduce the risk of innovative design, and manage information throughout the product design process. The NXMCD motion simulation definition flow chart is as follows Figure 2 shown.
[0016] Step 103, using TIA Portal to perform PLC (Programmable Logic Controller) control program design on the three-dimensional model to control the motion simulation; The motion simulation signal variables designed for the assembly line are assembled through the USB flash drive, and the PLC program in the TIA Portal is used for design analysis. Detailed flow chart analysis and explanation are also performed to prepare for the subsequent virtual commissioning.
[0017] TIA Portal is an integrated automation engineering software platform designed to provide a full range of solutions for the field of industrial automation, covering the entire life cycle of the automation system from design to commissioning to operation. TIA Portal integrates a variety of functional modules, including PLC programming, HMI (Human Machine Interaction) design, drive configuration, motion control, safety control, etc., allowing engineers to complete all work tasks on the same platform without switching multiple software. In addition, TIA Portal also supports a variety of communication protocols and network connections, which facilitates integration and communication with other devices and systems. Its user-friendly interface and powerful functions can greatly improve the work efficiency of engineers while ensuring the quality and reliability of the project. TIA Portal is widely used in automation projects of various sizes and fields, including manufacturing, energy, transportation, etc.
[0018] In the design of this embodiment, according to the signal in NX MCD, the signal with the same name is established in TIA Portal to facilitate the subsequent signal mapping operation of MCD. The variable name and type are set in PLC, and the ladder diagram of the control program is written so that the program can be carried out according to the simulation logic in MCD. After continuous debugging, it is determined that the PLC can run according to the logic. The final design is continuously optimized and improved to obtain the final solution.
[0019] When designing PLC programs in TIA Portal, hardware configuration, logic programming, data processing and algorithms, network and communication are involved. In virtual debugging, signal establishment plays a key role. The function of NX MCD can map the internal signals of MCD with external signals, and can freely select the signals to be mapped. Therefore, the signals established in PLC should be as similar or identical to the signals in MCD as possible, which can reduce errors in signal mapping and cause problems in simulation motion.
[0020] The design of the PLC program is based on the events that occur in the MCD, that is, the state of the sensor triggering to carry out the next step of the program, and the writing of the program cannot affect each other, so different signals must be set for control. The signal table settings are shown in Table 1.
[0021] Table 1 Assembly line signal table
[0022] The simulation starts to move. After the start signal X_7 is output, the U disk moves forward at the input speed. The U disk pallet enters the main conveyor belt from the feed module under the transmission of the conveyor belt and the guidance of the guide block; when the pallet triggers the block sensor on the fixture, the PLC outputs the X_9 signal, and the kinematic pair defined on the pallet is modified to a sliding pair, so that the positioning fixture clamps the pallet. Since the speed of the pallet changes twice during the entire simulation process, it is necessary to output two signals to control the start and stop of the pallet. The clamping and releasing of the fixture are controlled by two signals X_7 and X_9 respectively, which can avoid simulation errors caused by the disorder of multiple coils in the normal PLC. The distance control of X_8 is mainly to receive the signal of the pressure block sensor during the process of the chip being pressed into the shell to adjust the distance of the pressed chip and improve the assembly accuracy. The control flow chart of the PLC program is as follows Figure 3 shown.
[0023] Step 104, realizing the linkage between the TIA Portal and the NX through PLCSIM Advanced, and controlling the MCD simulation model by the PLC control program to perform virtual debugging; in the MCD, performing collision detection on the three-dimensional model of the moving robotic arm, and modifying the working path of the robotic arm when a collision occurs to the robotic arm.
[0024] Virtual debugging of the assembly line uses PLCSIM Advanced V3.0 to connect TIA Portal and NX MCD, and uses the signal mapping function in MCD to match the PLC of TIA Portal with the signal of MCD one by one. Modify the program in TIA Portal to debug and realize the control of model movement.
[0025] PLCSIM Advanced V3.0 is an advanced simulation software designed for simulating and testing PLC programs. By using this software, users can develop and test complex control strategies and communication protocols without actually connecting to a physical PLC. To achieve signal interaction between NX MCD and TIA, PLCSIM Advanced is required. Even if there is no physical PLC hardware, the software can still connect signals and programs by creating a virtual PLC. This is the reason why we chose PLCSIMAdvanced as the controller for TIA Portal to communicate with NX MCD without a physical PLC.
[0026] In the simulation environment of NX software, the NX model motion simulation is performed. The motion simulation of the assembly line is realized by using the model established in CAD and the physical properties, motion properties, and simulation sequence defined by the MCD platform. Figure 4 shown.
[0027] The process of virtual commissioning based on NX MCD and TIA Portal is as follows Figure 5 As shown. Start PLCSIM Advanced V3.0, start a PLC instance named PLC3 in the software, compile the control program in the TIA Portal, and then download the compiled PLC program to the virtual PLC. In order to monitor and modify the program in real time, set the PLC to online. Open the PLCSIM Advanced software, and you can see that the identification light of the newly created PLC3 changes from yellow to green, indicating that the PLC program has been downloaded successfully.
[0028] Then configure the external signal for the MCD model, add the PLCSIM Adv instance PLC3, and select the PLC output signal that needs to be mapped with the MCD in the instance of PLC3. At the same time, modify the check value in the sensor in the MCD to be configured as the input signal of the PLC. Make sure that each output signal of the PLC correctly corresponds to the corresponding input signal of the MCD, and vice versa, to ensure the accuracy of the signal mapping.
[0029] In this embodiment, a USB flash drive assembly production line is designed based on NX software, and virtual debugging and simulation are completed for it. First, the CAD module of NX is used to establish a three-dimensional model of the USB flash drive assembly production line, and then the MCD module of NX is used as the digital model for creation and simulation. A virtual PLC is established in TIA Portal and programmed using ladder diagram language. The linkage between the software TIA Portal and the software NX is completed through PLCSIM Advanced to realize the virtual simulation of the assembly production line. At the same time, the interference function in the MCD module of NX is used to perform collision detection on the robot arm during the movement process to realize virtual debugging of the USB flash drive assembly production line. Problems generated in the production line can be discovered and solved, thereby shortening the product development cycle, reducing the production cost of the product, improving product quality, and reducing the complexity of engineering practice.
[0030] On the basis of the above embodiment, the three-dimensional model in this embodiment includes the main conveyor belt, feeding module, discharging module, USB disk tray and robot arm of the USB disk assembly production line, and the USB disk tray includes a USB disk shell and a USB disk chip; The feeding module is connected to the entrance of the main conveyor belt, and the feeding module is used to transfer the USB disk tray to the main conveyor belt; The main conveyor belt is used to transport the USB disk tray; The mechanical arm is used to assemble the USB disk chip into the USB disk housing to obtain the USB disk during the transmission of the USB disk tray on the main conveyor belt; The discharging module is connected to the exit of the main conveyor belt, and the discharging module is used to transfer the USB disk tray to the discharging location.
[0031] On the basis of the above embodiment, the main conveyor belt in this embodiment includes a conveyor belt, a bracket, a positioning fixture, a slide rail and a box body; The conveyor belt is used to transport the USB disk tray; The box is located on both sides of the conveyor belt, and the box is used to provide power for the conveyor belt; The positioning fixture is located on the conveyor belt, and the positioning fixture is used to fix the USB disk tray when the USB disk tray is transferred to the position of the positioning fixture, so that the mechanical arm moves to the position of the positioning fixture to assemble the USB disk; The slide rail is used to change the placement position of the USB flash drive after assembly; The bracket is used to support the main conveyor belt; The feeding module and the discharging module both include a conveyor belt, a base frame and a guide block; The base frame is used to support the feed module and the discharge module, so that the feed module, the discharge module and the main conveyor belt are located in the same horizontal plane, and the feed module and the discharge module are perpendicular to the main conveyor belt; The guide block is used to provide steering for the USB disk tray while not changing the transmission direction of the USB disk tray after steering; The U disk tray also includes a chassis, the bottom surface of the chassis is processed with a notch, so that the U disk tray has a contact space with the stopper in the positioning fixture, and a dome is processed on the lower surface of the chassis, so that the U disk tray turns smoothly; The mechanical arm comprises a base, a joint shaft, an output shaft, a controller and a mechanical gripper.
[0032] like Figure 6 As shown in the figure, the main conveyor belt is mainly composed of a conveyor belt, a bracket, a positioning fixture, a slide rail and a box. The function of the conveyor belt is to provide a stable transmission in a straight line. When the internal motor of the box starts to work, it drives the conveyor belt to move. The specific size of the slide rail is determined by the size of the USB flash drive, and the positioning fixture is determined by the size of the USB flash drive tray. The box design on both sides of the conveyor belt is to give the conveyor belt power and stably transfer the USB flash drive tray to the position of the positioning fixture.
[0033] The design of the slide rail is mainly to facilitate the placement of the USB flash drive in subsequent assembly and transmission. The roughness of the slide surface is smaller than that of other surfaces. Therefore, sheet metal modeling is used for the design of the slide. Compared with ordinary parts, sheet metal parts have high strength, good toughness, and wear resistance, which well meet the requirements of the slide.
[0034] In the design of the positioning fixture, the collision sensor in the block is designed to stop the USB disk tray from moving at the set position. Before the robotic arm starts the clamping work, the USB disk tray can be fixed, so that the robotic arm can stably and accurately clamp and place the USB disk at the designated position during movement, avoiding errors that may cause incorrect positioning of the robotic arm.
[0035] like Figure 7 As shown in the figure, the infeed and outfeed modules are mainly composed of infeed and outfeed conveyor belts, chassis, left and right guide blocks and other components. The infeed module and outfeed module are designed to connect with the main conveyor belt module to ensure that the USB disk tray has good continuity and smoothness during the transmission process. The width of the infeed and outfeed modules is designed to be consistent with the width of the main conveyor belt to ensure that the USB disk tray is stably and smoothly transmitted to the main conveyor belt during movement.
[0036] The design of the chassis is to make the in-feed and out-feed conveyor belts and the main conveyor belt at the same level. The function of the guide block is to provide the U disk tray with steering during the movement, while not changing the straight line direction of the transmission after the steering, always keeping it parallel to the movement direction of the conveyor belt, and ensuring that the U disk tray is always in the middle of the conveyor belt.
[0037] like Figure 8 As shown, the USB disk tray is composed of a USB disk shell, a USB disk chip, a chassis and other parts. The USB disk tray is designed to transport the USB disk shell and chip that need to be assembled, and its size fits the positioning fixture. According to the functional requirements during the movement, a notch is processed on the bottom surface of the chassis, so that the USB disk tray can have space to contact the block in the positioning fixture during movement.
[0038] like Fig. 9 As shown, in order to ensure the steering function of the USB disk tray, two domes are processed under the chassis during the design, so that the USB disk tray can be transmitted by the conveyor belt, realizing the smooth transmission of the USB disk tray between the feeding and unloading module and the main conveyor belt.
[0039] like Fig.10 As shown, the robot arm mainly includes a base, a joint axis, an output axis, a controller and a mechanical gripper. The size of the three-dimensional model needs to be determined according to the range of motion of the mechanical gripper. When the pressure block in the middle of the designed controller is working in the middle of the robot arm, it is designed to move vertically downward so that the USB flash drive chip can be stably pressed into the USB flash drive shell, thereby realizing the assembly of the USB flash drive. The length between the joint axis and the output axis can be 225mm and 180mm respectively, and the maximum up and down movement distance of the mechanical gripper can be 76mm and 61mm respectively.
[0040] On the basis of the above embodiment, the USB disk tray in this embodiment is output from the feeding module, and enters the main conveyor belt under the guidance of the conveyor belt transmission and guide block in the feeding module; When the U disk tray is transferred to the position of the positioning fixture, the positioning fixture fixes the U disk tray, and the mechanical arm starts to work, clamps the U disk chip and puts it into the U disk shell, and the pressure block of the controller of the mechanical arm presses the U disk chip into the U disk shell to achieve complete assembly of the U disk, and then the assembled U disk is clamped out and placed in the slide rail, so that the U disk passes through the slide rail, the placement orientation of the U disk is changed, and then the U disk under the slide rail is put back to the placement position of the U disk tray; After the work of the robot arm is completed, it returns to the initial position, and the positioning fixture releases the USB disk tray so that it continues to move to the discharge module by relying on the main conveyor belt. The overall assembly model of the three-dimensional model of the USB disk assembly production line is as follows Fig.11 shown.
[0041] This embodiment introduces the functions and parts composition of the five components of the USB flash drive assembly production line, namely the main conveyor belt, feeding module, discharging module, USB flash drive tray and robotic arm module. It also completes the modeling in the NX CAD environment, lists the key parameters of each part in the USB flash drive assembly production line, and draws the assembly flow chart of the USB flash drive assembly production line, including the workflow of sub-assembly and general assembly. Complete the work of each sub-assembly and general assembly according to the assembly flow chart to ensure that each part is assembled correctly according to the process. Provide a model for the subsequent motion simulation of the USB flash drive assembly production line.
[0042] On the basis of the above-mentioned embodiment, the three-dimensional model in this embodiment is realized by a top-down assembly modeling method.
[0043] The USB assembly line model is mainly established through the top-down assembly modeling method of NX CAD. First, the general assembly is classified, and then refined into parts step by step, and the corresponding assembly constraints are added. Specifically, the model is established through operations such as reference plane generation, sketching, stretching, and merging entities, and then the model is optimized using commands such as filleting, chamfering, drilling, mirroring, and array.
[0044] The overall assembly of the USB flash drive assembly production line is to assemble the model using assembly constraints. The modeling adopts NX's top-down assembly modeling method. Unlike the traditional bottom-up assembly modeling method, the top-down method is easier to simplify the assembly process in modeling, greatly speeding up the modeling and assembly speed. In the existing assembly model, the top-down modeling design method uses the external contour surface of the part to make and edit sketches, as well as link related dimensions, to speed up the modeling speed and facilitate product research and development. The assembly mainly uses constraints such as contact docking, coaxiality, fixation, and alignment to organize the parts into sub-assemblies and then into general assemblies.
[0045] Based on the above embodiment, the method of using the MCD module of NX to perform motion simulation on the three-dimensional model in this embodiment includes: When the U disk tray passes through the feeding module, the U disk housing and the U disk chip are fixed to the U disk tray respectively using a fixed pair. The U disk tray is defined as a plane pair and a point-on-line pair, so that the U disk tray can move smoothly on the conveyor belt. When the simulation starts, the speed control defined in the point-on-line pair will give the forward speed of the U disk tray; When the tray enters the main conveyor and arrives at the positioning fixture, when the U disk tray moves to the stopper position of the positioning fixture, the stopper sensor will be triggered, and the set simulation sequence will assign the speed acting on the U disk tray to 0. First, the motion pair of the U disk tray is defined as a sliding pair, and position control is added. Then, the U disk tray is fixed on the clamping block by the positioning fixture through the position control. During the process of the mechanical arm clamping the U disk chip, the mechanical gripper defined as the gripper is driven by the reverse calculation mechanism to realize the movement of the mechanical gripper, so as to clamp the U disk chip; before the U disk chip is placed into the U disk shell, the U disk shell is separately defined as a fixed pair to avoid assembly failure due to the displacement of the U disk shell when the U disk chip is inserted into the U disk shell; when the U disk chip is half inserted, the pressure block on the mechanical gripper controller is used to push the U disk chip into the U disk shell; During the process of pushing the U disk chip into the U disk shell, when the U disk chip is placed above the U disk shell by the mechanical gripper, the U disk chip is defined as a sliding pair and position control is given; when the pressure block sensor touches the U disk chip, the U disk chip is pushed into the U disk shell at the squeezing speed of the pressure block, and finally the assembly between the U disk chip and the U disk shell is realized; During the process of the robotic arm clamping the USB flash drive and passing it through the slide rail, when the USB flash drive chip and the USB flash drive shell are assembled, the USB flash drive chip is fixed in the USB flash drive shell due to the fixed pair set by the simulation sequence. The mechanical claw of the robotic arm clamps the USB flash drive and places it on the upper end of the slide rail. Due to the clamping of the claw, the USB flash drive cannot fall freely and pass through the slide rail opening when the claw is released. Therefore, the simulation sequence is used to control the motion pair of the USB flash drive before and after the mechanical claw is released, and the USB flash drive is defined as a fixed pair. After the mechanical claw is released, the definition of the fixed pair is cancelled to achieve the free fall motion of the USB flash drive. When the USB flash drive passes through the slide rail and reaches the slide rail positioning block, the USB flash drive changes from vertical to horizontal. When the mechanical arm clamps the USB flash drive and puts it back into the tray, the mechanical gripper clamps the USB flash drive out from the slide rail positioning block and puts it back into the designated position of the USB flash drive tray, which triggers the distance sensor, causing the position of the stopper under the USB flash drive tray to move downward, and the triggering of the stopper sensor is cut off, so that the USB flash drive is fixed on the USB flash drive tray again; When the tray returns to the main conveyor belt and continues to move, the positioning fixture releases the U disk tray due to the triggering of the distance sensor, and the motion pair and speed control of the U disk tray are reset to the definition at the beginning of the simulation; the U disk tray returns to the main conveyor belt and continues to move to the discharge module.
[0046] In the MCD simulation design of the USB flash drive assembly production line, physical properties such as rigid bodies and collision bodies are used. Before the motion simulation is implemented, the three-dimensional model needs to be given the electromechanical object properties of the geometric three-dimensional model, that is, physical properties such as friction, mass, inertia and collision that the three-dimensional model does not have. The physical property definition flow chart of the USB flash drive assembly production line is shown in Figure 12.
[0047] For the physical properties of the USB flash drive assembly line, the first thing to define is the rigid body properties. Only rigid bodies can be assigned kinematic pairs. Models defined as rigid bodies in the assembly line will fall under the influence of gravity in the simulation. For example, the USB flash drive tray, robotic arm module, etc. need to be defined as rigid bodies, and parts such as USB flash drives, slide rails, and slide rail positioning blocks need to be added to the collision body definition. In order to ensure that the USB flash drive passes through the slider, the collision material properties of the slide rail need to be set to dynamic friction 0.15, rolling friction coefficient 0, and restitution coefficient 0.01. The gripper of the robotic arm needs to use the gripper definition in MCD to realize the gripping of the USB flash drive in the simulated motion, and set the signal adapter to control the clamping and release of the gripper.
[0048] Physical properties are the basis for controlling model behavior, while motion properties are the way to control model behavior. After the physical properties of the assembly line are defined, the definition of motion properties needs to be added on this basis. NX MCD provides many kinematic pairs for the realization of motion, such as hinge pairs, ball pairs, sliding pairs, fixed pairs, sliding pairs, etc. The definition of motion properties cannot perfectly simulate the motion in reality. For example, in the definition of motion properties of the assembly line, the movement of the USB disk tray on the conveyor belt cannot be as smooth as the actual movement. At this time, a normal direction can be made through point-on-line pairs or line-on-line pairs to improve the simulation of the motion. In the subsequent simulation sequence definition, most simulation sequences will cause the motion properties to change accordingly according to the designed effect. For example, when the USB disk tray reaches the position of the positioning fixture, the positioning fixture needs to fix the USB disk tray, and the kinematic pair will change from the previous path pair to a sliding pair.
[0049] The simulation sequence definition in NX MCD can realize the continuity of model movement. The design method of this embodiment is an event-based simulation sequence, which realizes the simulated movement of the model by triggering the sensor to change the signal as a condition. Before adding a simulation sequence, you must first understand the assembly process of the assembly line, and then add the simulation sequence according to the designed process. Before defining the simulation sequence, it is necessary to design the auxiliary motion attribute definition in advance. For example, when the USB disk tray is fixed on the positioning fixture, it is necessary to define the fixed pair in advance to make the positioning fixture and the USB disk tray relatively fixed to avoid the vibration between the collision bodies during the operation of the robot arm affecting the accuracy of assembly. The reverse calculation mechanism is used to drive the robot arm to calculate the shortest moving distance, and it is also necessary to continuously observe the simulation process to modify the point coordinate position during the simulation. Fig.13It is the overall process of electromechanical concept design of USB flash drive assembly production line.
[0050] Based on the above embodiment, this embodiment also includes: Using a grid model to construct an environment model of the robotic arm; A genetic algorithm is used to optimize the working path of the robot arm according to the environmental model to obtain an optimal working path of the robot arm.
[0051] Path planning for the robot. Path planning refers to the use of some optimization method to enable the robot to automatically avoid obstacles in a certain environment when moving to the corresponding target position. When the robot is working, the path planning algorithm can effectively improve the robot's obstacle avoidance ability and optimize the distance and smoothness of the path.
[0052] This embodiment uses a genetic algorithm to optimize the mobile working path of the robot arm. A grid model is used as the environment model, such as Fig.14 As shown. For example, the size of the grid model is 20×20, the lower left corner is the starting point, and the upper right corner is the target point. The black grid is the obstacle point, and the white grid is the feasible point.
[0053] Genetic algorithm is a heuristic search algorithm that simulates the natural selection and inheritance mechanism in biological evolution. The basic idea of genetic algorithm is to iteratively search in the population of candidate solutions by simulating the three main processes of biological evolution: selection, crossover (also known as recombination), and mutation, in order to find the optimal solution or approximate optimal solution to the problem. The algorithm will leave a candidate solution in each iteration, and then use it for distributed search, and then screen each individual. According to the genetic operator, these individuals are selected, paired, and recombined to generate new individuals, and the offspring are randomly mutated to introduce new genetic information. Repeat the above process until the preset convergence conditions are met, such as reaching the maximum number of iterations or the quality of the solution meets the requirements. Compared with traditional heuristic optimization algorithms, the main advantages of genetic algorithms are their population search strategy and simple genetic operators, which enable the algorithm to efficiently search for the optimal solution while reducing the dependence on human interaction.
[0054] Among them, the selection operation is to select the individuals with stronger fitness in the population and pass their abilities to the next generation. The commonly used algorithm in genetic algorithms is the roulette method, which first calculates the fitness of each individual , and then sum up the fitness of each individual to get , as shown in formula (1): (1) Each individual The probability of being selected is: (2) The cumulative probability of an individual is: (3) The larger the fitness value of an individual, the easier it is to be selected. However, there is still a chance that individuals with poor fitness values will be inherited. If the individuals in the population are almost all optimal individuals, the evolutionary ability in the genetic algorithm will soon be lost.
[0055] The crossover operation is one of the key steps in the evolutionary process to simulate the biological reproduction process. It is used to exchange genetic information between parent individuals to produce new offspring. The purpose of the crossover operation is to produce offspring with potentially better fitness by combining the genetic characteristics of two or more parent individuals. Crossover can increase the genetic diversity in the population and help the algorithm explore different areas of the solution space. The crossover type is divided into single-point crossover, multi-point crossover, etc. Fig.15 It is the single-point crossover type in the crossover operation.
[0056] Mutation operation refers to the process of gene mutation in nature, which provides a mechanism for the algorithm to introduce new genetic information into the population, thereby increasing the diversity of the population and preventing the algorithm from converging to the local optimal solution too early. By randomly changing certain genes of individuals, mutation operation can increase the genetic diversity in the population. Mutation helps the algorithm to jump out of the local optimal solution and explore other better solutions that may exist in the solution space. The types of mutation operation can be divided into site mutation, exchange mutation, etc. Fig.16 It is the multi-site mutation type in the mutation operation.
[0057] The overall flow chart of genetic algorithm is as follows: Fig.17 As shown. First, the initial population is generated, the fitness of the individual is calculated according to a certain indicator, the next generation of population is selected based on the fitness, the crossover operation of the population individuals is performed to generate new offspring, and then the population individuals are mutated, and finally a new generation of population is obtained, and it is judged whether the maximum number of population iterations has been reached. If it has been reached, it stops, otherwise it returns to calculating the fitness of the individual. The relevant parameter settings of the genetic algorithm are shown in Table 2.
[0058] Table 2 Related parameter settings of genetic algorithm
[0059] When the path length ratio is 2 and the path smoothness ratio is 5, the motion trajectory of the robot arm obtained by the genetic algorithm is as follows: Fig.18 As shown in the figure, the starting point number of the robot arm movement is 1, and the end point number is 400. After calculation, the output result of the optimal path of the robot arm is 28.63. Fig.19From the changing trend graph of the optimal path curve when a is 2 and b is 5, we can see that the population converged to the optimal path solution for the first time at about the 9th generation, but between the 12th and 20th generations, mainly due to crossover and mutation operations, the algorithm could not directly jump out of the local optimal solution, but at the 21st generation it found the global optimal solution again.
[0060] This embodiment applies an intelligent optimization algorithm to analyze the robot arm and perform path optimization to achieve optimization and improvement of the assembly process, improve the smoothness of the assembly process, reduce enterprise costs, improve production efficiency, and enhance the flexibility and adaptability of the assembly production line.
[0061] Based on the above embodiment, the collision detection of the robot arm in the three-dimensional model in this embodiment includes: During the movement of the MCD simulation model, obtaining a video of the MCD simulation model; Extracting the envelope of the mechanical gripper of the mechanical arm and the envelope of other parts in the three-dimensional model except the mechanical arm from the video; Whether the robotic arm collides is determined according to whether the envelope of the mechanical gripper of the robotic arm overlaps with the envelope of the other components.
[0062] When NX MCD performs motion simulation, optimization may be required because the robot arm may collide with other components on the assembly line during movement. Minor collisions cannot be seen by the naked eye and require the envelope and interference functions of NX MCD to be observed.
[0063] In simulation, it is necessary to record a certain section of the model simulation process to generate a motion process, and then generate an envelope for the gripper cylinder on the robot arm during this motion process. The envelope represents the set of all the positions that the rigid body passes through during this motion process. Then, by using the interference command on two different displayed envelopes, the overlapping parts between the two envelopes will be highlighted, and the rest will remain the original color.
[0064] In this embodiment, the most likely places for collision are between the robot arm and the USB disk tray and between the robot arm and the slide rail. The slide rail is a stationary rigid body and cannot generate an envelope. Therefore, it is only necessary to generate the envelope of the robot arm cylinder and the USB disk tray separately during the entire assembly movement. Fig. 20 and Fig.21 In the figure, the blue envelope is the position that the cylinder passes through when it moves, and the red envelope is the position that the USB disk tray passes through when it moves. From the figure, it can be seen that the non-intersecting part between the blue and red envelopes is highlighted, which means that there is no interference between the robot arm and the USB disk tray during the movement, and the blue envelope does not overlap with the entity of the slide rail, so there is no interference between the robot arm and the slide rail.
[0065] After opening the simulation, connect the PLC to the MCD and start virtual debugging. Open the monitoring of the program in the PLC, monitor the program in real time, and then play it in the MCD. The NX simulation environment starts running, the pallet starts moving, and the assembly line simulates the movement according to the simulation sequence and the program in the PLC. Observe the movement of the robot in NX and keep a record. If the movement does not match the design, stop the simulation and switch the TIA Portal from online to offline, check the error, modify the program again, and debug again until the final screen can realize the simulation operation settings.
[0066] During the simulation, it is necessary to observe the parameters during the motion process. If there is a collision, the motion trajectory set by the robot gripper needs to be modified. Fig. 22 It is a timing diagram of the motion position of the joint axis rotating around the center of the base in the robot arm module during the motion process. Fig.23 This is a timing diagram of the motion position of the joint axis in the robot arm module, which rotates around the center of the outer side of the joint axis during the motion process. Observe the angles rotated by the joint axis and the output axis over time.
[0067] When determining whether a collision has occurred in the robot arm based on whether the envelope of the robot arm's mechanical gripper overlaps with the envelope of other components, the angle rotated by the joint shaft can also be determined based on the motion position timing diagram of the joint shaft during the motion process; the angle rotated by the output shaft can be determined based on the motion position timing diagram of the output shaft during the motion process; when there is a deviation between the angle rotated by the joint shaft and the corresponding preset angle, and / or there is a deviation between the angle rotated by the output shaft and the corresponding preset angle, if the envelope of the robot arm's mechanical gripper overlaps with the envelope of other components, then it is determined that a collision has occurred in the robot arm.
[0068] The U disk assembly production line virtual debugging device provided by the present invention is described below. The U disk assembly production line virtual debugging device described below and the U disk assembly production line virtual debugging method described above can be referenced to each other.
[0069] The device comprises a construction module, a simulation module, a control module and a debugging module, wherein: The construction module is used to build a three-dimensional model of the USB flash drive assembly production line using the CAD module of NX; The simulation module is used to perform motion simulation on the three-dimensional model using the MCD module of the NX to define the physical properties, motion properties and simulation sequence of the three-dimensional model to obtain an MCD simulation model of the three-dimensional model; The control module is used to design a PLC control program for the three-dimensional model using TIA Portal to control the motion simulation; The debugging module is used to realize the linkage between the TIA Portal and the NX through PLCSIM Advanced, and the PLC control program controls the MCD simulation model for virtual debugging; in the MCD, the three-dimensional model of the moving robotic arm is subjected to collision detection, and when the robotic arm collides, the working path of the robotic arm is modified.
[0070] The virtual debugging method and device of the USB flash drive assembly production line provided by the present invention designs the USB flash drive assembly production line based on NX software and completes the virtual debugging simulation thereof. First, the CAD module of NX is used to establish a three-dimensional model of the USB flash drive assembly production line, and then the MCD module of NX is used as the digital model for creation and simulation. A virtual PLC is established in TIA Portal and programmed using ladder diagram language. The linkage between the software TIA Portal and the software NX is completed through PLCSIM Advanced to realize the virtual simulation of the assembly production line. At the same time, the interference function in the MCD module of NX is used to perform collision detection on the robot arm during the movement process to realize the virtual debugging of the USB flash drive assembly production line, and the problems generated in the production line can be discovered and solved, thereby shortening the product development cycle, reducing the production cost of the product, improving the product quality, and reducing the complexity of engineering practice.
[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A virtual debugging method for a USB disk assembly production line, characterized in that: include: Use NX CAD module to build a 3D model of the USB flash drive assembly line; Using the MCD module of the NX to perform motion simulation on the three-dimensional model to define physical properties, motion properties and simulation sequence of the three-dimensional model, and obtain an MCD simulation model of the three-dimensional model; Using TIA Portal to design a PLC control program for the three-dimensional model to control the motion simulation; The linkage between the TIA Portal and the NX is achieved through PLCSIM Advanced, and the MCD simulation model is controlled by the PLC control program for virtual debugging; in the MCD, the three-dimensional model of the moving robotic arm is subjected to collision detection, and the working path of the robotic arm is modified in the event of a collision of the robotic arm.
2. The virtual debugging method for USB disk assembly production line according to claim 1, characterized in that: The three-dimensional model includes the main conveyor belt, feeding module, discharging module, USB disk tray and robotic arm of the USB disk assembly production line, and the USB disk tray includes a USB disk shell and a USB disk chip; The feeding module is connected to the entrance of the main conveyor belt, and the feeding module is used to transfer the USB disk tray to the main conveyor belt; The main conveyor belt is used to transport the USB disk tray; The mechanical arm is used to assemble the USB disk chip into the USB disk housing to obtain the USB disk during the transmission of the USB disk tray on the main conveyor belt; The discharging module is connected to the exit of the main conveyor belt, and the discharging module is used to transfer the USB disk tray to the discharging location.
3. The virtual debugging method for USB disk assembly production line according to claim 2 is characterized in that: The main conveyor belt comprises a conveyor belt, a bracket, a positioning fixture, a slide rail and a box body; The conveyor belt is used to transport the USB disk tray; The box is located on both sides of the conveyor belt, and the box is used to provide power for the conveyor belt; The positioning fixture is located on the conveyor belt, and the positioning fixture is used to fix the USB disk tray when the USB disk tray is transferred to the position of the positioning fixture, so that the mechanical arm moves to the position of the positioning fixture to assemble the USB disk; The slide rail is used to change the placement position of the USB flash drive after assembly; The bracket is used to support the main conveyor belt; The feeding module and the discharging module both include a conveyor belt, a base frame and a guide block; The base frame is used to support the feed module and the discharge module, so that the feed module, the discharge module and the main conveyor belt are located in the same horizontal plane, and the feed module and the discharge module are perpendicular to the main conveyor belt; The guide block is used to provide steering for the USB disk tray while not changing the transmission direction of the USB disk tray after steering; The U disk tray also includes a chassis, the bottom surface of the chassis is processed with a notch, so that the U disk tray has a contact space with the stopper in the positioning fixture, and a dome is processed on the lower surface of the chassis, so that the U disk tray turns smoothly; The mechanical arm comprises a base, a joint shaft, an output shaft, a controller and a mechanical gripper.
4. The virtual debugging method for USB disk assembly production line according to claim 3 is characterized in that: The USB disk tray is output from the feeding module and enters the main conveyor belt under the guidance of the conveyor belt transmission and guide block in the feeding module; When the U disk tray is transferred to the position of the positioning fixture, the positioning fixture fixes the U disk tray, and the mechanical arm starts to work, clamps the U disk chip and puts it into the U disk shell, and the pressure block of the controller of the mechanical arm presses the U disk chip into the U disk shell to realize the assembly of the U disk, and then the assembled U disk is clamped out and put into the slide rail, so that the U disk passes through the slide rail, the placement orientation of the U disk is changed, and then the U disk under the slide rail is put back to the placement position of the U disk tray; After the work of the robot arm is completed, it returns to the initial position, and the positioning fixture releases the USB disk tray, allowing it to continue to move to the discharge module relying on the main conveyor belt.
5. The virtual debugging method for USB disk assembly production line according to claim 1, characterized in that: The three-dimensional model is implemented using a top-down assembly modeling method.
6. The virtual debugging method for USB disk assembly production line according to claim 3 is characterized in that: The method of using the MCD module of NX to perform motion simulation on the three-dimensional model includes: Use fixed pairs to fix the USB disk housing and the USB disk chip on the USB disk tray respectively, define the USB disk tray as a plane pair and a point-on-line pair, and when the simulation starts, the speed control defined on the point-on-line pair will assign the forward speed of the USB disk tray; When the USB disk tray moves to the stopper position of the positioning fixture, the stopper sensor will be triggered, and the set simulation sequence will assign the speed acting on the USB disk tray to 0. The motion pair of the USB disk tray is first defined as a sliding pair, and position control is added. Then, the USB disk tray is fixed on the clamping block by the positioning fixture through the position control. The mechanical gripper is driven by a reverse calculation mechanism to realize the movement of the mechanical gripper to clamp the U disk chip; before the U disk chip is placed into the U disk housing, the U disk housing is defined as a fixed pair; when the U disk chip is half inserted, the pressure block on the controller of the mechanical gripper is used to push the U disk chip into the U disk housing; When the U disk chip is placed on the U disk housing by the mechanical gripper, the U disk chip is defined as a sliding pair and given position control; when the pressure block sensor touches the U disk chip, the U disk chip is pushed into the U disk housing according to the squeezing speed of the pressure block; due to the fixed pair set by the simulation sequence, the U disk chip is fixed in the U disk housing; The mechanical gripper clamps the U disk and places it on the upper end of the slide rail. The simulation sequence is used to control the motion pair of the U disk before and after the mechanical gripper is released, and the U disk is defined as a fixed pair. After the mechanical gripper is released, the definition of the fixed pair is cancelled to achieve free fall motion of the U disk. When the U disk passes through the slide rail and reaches the slide rail positioning block, the U disk changes from vertical to horizontal. When the mechanical gripper clamps the U disk out of the slide rail positioning block and puts it back to the designated position of the U disk tray, it triggers the distance sensor, so that the position of the stopper under the U disk tray moves downward, the triggering of the stopper sensor is cut off, and the U disk is fixed on the U disk tray again; Due to the triggering of the distance sensor, the positioning fixture releases the U disk tray, and the motion pair and speed control of the U disk tray are reset to the definition at the beginning of the simulation; the U disk tray returns to the main conveyor belt and continues to move to the discharge module.
7. The virtual debugging method for USB disk assembly production line according to claim 2, characterized in that: Also includes: Using a grid model to construct an environment model of the robotic arm; A genetic algorithm is used to optimize the working path of the robot arm according to the environmental model to obtain an optimal working path of the robot arm.
8. The virtual debugging method for USB disk assembly production line according to claim 2, characterized in that: The performing collision detection on the mechanical arm in the three-dimensional model comprises: During the movement of the MCD simulation model, obtaining a video of the MCD simulation model; Extracting the envelope of the mechanical gripper of the mechanical arm and the envelope of other parts in the three-dimensional model except the mechanical arm from the video; Whether the robotic arm collides is determined according to whether the envelope of the mechanical gripper of the robotic arm overlaps with the envelope of the other components.
9. A virtual debugging device for a USB disk assembly production line, characterized in that: include: A construction module is used to build a 3D model of the USB flash drive assembly line using the CAD module of NX; A simulation module, used for performing motion simulation on the three-dimensional model using the MCD module of the NX, so as to define the physical properties, motion properties and simulation sequence of the three-dimensional model, and obtain an MCD simulation model of the three-dimensional model; A control module, used for designing a PLC control program for the three-dimensional model using TIA Portal to control the motion simulation; The debugging module is used to realize the linkage between the TIA Portal and the NX through PLCSIM Advanced, and the PLC control program controls the MCD simulation model for virtual debugging; in the MCD, collision detection is performed on the three-dimensional model of the moving robot arm, and when the robot arm collides, the working path of the robot arm is modified.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the virtual debugging method for the USB disk assembly production line as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Safety simulation detection method and system for mobile robot
CN115709484A
Knitting machine auxiliary assembly system and method based on mixed reality
CN118378966A
Virtual debugging method and device for sorting and packaging system of production line
CN118519918A