| The design of motion control system is an important technology to realize the automatic processing of NC machine tools and an important symbol to measure the level of industrial development of a country.In recent years,with the rapid improvement of the performance of embedded computer hardware and software,there has been an embedded CNC software system with rich functions and high customizability.This kind of low-cost,low-power hardware and software combination system has greatly expanded the application field of traditional numerical control technology,and has become a hot spot in the application field of motion control technology.Based on the research of motion control system,this paper uses "embedded industrial computer+embedded NC module" to construct the system structure,builds the hardware platform of the system,and designs the servo motion control system and auxiliary functions.The system structure design has high openness,small size,low cost,short development cycle and easy expansion of functions.Based on this structure,a cross-platform embedded motion control software system is developed by using Qt as development platform and object-oriented software design idea under Windows system.The system is divided into five functional modules:human-computer interaction module,NC code preprocessing module,motion control module,tool management module and tool path simulation module.Each module follows a certain coupling relationship,and can add and uninstall functions according to the different needs of the system.In the pre-processing module of NC machining code,regular expressions are used for lexical,grammatical analysis and error code location,correct code instructions and data are extracted,and modal code is processed.Using the advantages of regular expressions in character processing,a code parser compatible with various formats of NC processing files is designed.The tool compensation model is established after the parsed code,and the code processing path is transformed into the tool center processing path.At the same time,the development framework of Qt is used to design and develop the human-computer interaction interface;the motion control function module is designed according to the interpolation function provided by the motion controller;the tool management module is established based on the database technology;the three-dimensional simulation of the processing path is carried out using OpenGL graphics simulation technology,and the correctness of the processing code is verified from different angles;Finally,the program code designed under the Windows system is directly transplanted to the Linux system of the embedded industrial computer,compiled and run directly,which verifies the cross-platform execution ability of the system. |