Mechatronics products integrate mechanical structure,electronic hardware and control system.With the increasing variety of functional requirements and more complicated control procedures,it has become an inevitable trend to use simulation software to assist in the research and development of electromechanical products.At present,the mainstream simulation software,or the three-dimensional display effect is too poor,or the real-time is insufficient,or the mechanical and electronic software cannot be connected for comprehensive simulation.Aiming at this situation,this paper designs an electromechanical soft integration simulation system,completes hardware design and software writing,studies the main performance of the system,and verifies the function of the simulation system through physical experiments.The main research contents of this paper are as follows:First,combined with the research content,the paper designs the scheme of electromechanical soft integration simulation system.The system is divided into a lower computer data interaction system for collecting external signals,and a host computer simulation platform for simulating motion.Secondly,with the acquisition circuit board as the carrier,the two modules of acquisition and communication complete the design and production of the data exchange system of the lower computer.The acquisition module uses LPC1114 as the acquisition chip,including 8 motor pulse signals,8 motor direction signal acquisition,24 limit signal feedback and 16 universal input and output interfaces.Through optocoupler isolation,the board can collect industrial common voltage signals such as 5V~24V.The communication module uses LPC11C24 as the communication chip,including RS232 circuit for upper and lower computer communication,CAN interface circuit for connecting extended circuit board and IIC circuit for intra-chip communication.Based on the Unity3D virtual reality engine,the host computer simulation platform was built.The 3D model is imported through the rigid body and joint components,parent-child relationship,and script to solve the problem of no mechanical constraints in Unity3D.Data interaction,motion control,and real-time debugging capabilities were written in the simulation platform.The simulation platform controls the simulation model motion through external real signals,records the model motion coordinates and interference collision information in real time,outputs the motion beat diagram to debug the control program parameters,and verifies the program logic.After the completion of the simulation system,the main performances such as real-time performance and acquisition accuracy are studied.Firstly,the working frequency values and mutual relations of each link are analyzed to prove that the system acquisition accuracy and display accuracy meet the requirements.Experiment with GALIL motion control card,the conclusion that the system accurate acquisition frequency is above 1MHZ,the frame refresh frequency is slightly faster than the serial port transmission rate can make the system pulse acquisition more stable.In the end,the paper uses a robot blanket automatic repairing robot as a simulation object to verify the function of the simulation system.Firstly,the mechanical structure and principle of the turf blanket repair robot are explained.Then connect the simulation upper computer,the acquisition circuit board,the GALIL motion control card and the motion control upper computer to build a joint simulation platform to realize the transformation of mechanical coordinates and virtual coordinates.Finally,through the repair process simulation,the key action timing diagram of the repairing robot is outputted,and the object motion timing is matched with the program logic,and the function of the simulation system is verified by the precise change of the parameter modification. |