A method for driving model motion and online measurement based on G code acquisition using MDC
Through the method of driving model motion and online measurement based on MDC acquisition of G code, the problems of low production management of CNC machine tools and lack of practical experience are solved, real-time monitoring and simulation teaching are realized, and production efficiency and teaching quality are improved.
Patent Information
- Application Number
- CN202211706054.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-12-29
AI Technical Summary
The existing technology lacks effective real-time monitoring methods to improve the production management efficiency of CNC machine tools. At the same time, in secondary vocational colleges, due to the expensive equipment and limited learning resources, it is difficult for students to obtain sufficient practical processing experience of CNC machine tools.
Through the driving model motion and online measurement method based on MDC acquisition of G code, real-time, transparent and visual equipment monitoring and simulation teaching of CNC machine tools can be realized. The method includes the CNC system collecting data and sending it to the CNC simulation software, the simulation software loads the model and drives the simulation motion, automatically measuring the machining tolerance and adjusting the tool compensation value.
It has achieved the improvement of real-time monitoring and production management efficiency, provided a simulation teaching environment, improved students' learning interest and understanding of the CNC machine tool processing process, and thus improved teaching quality.
Smart Images

Figure CN115951632B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of measurement technology, and in particular relates to a method for driving model movement and online measurement based on MDC-collected G codes. Background Art
[0002] As global competition becomes increasingly fierce, CNC machining is widely used in various manufacturing fields such as automobiles, aviation, and molds as an important means to ensure product quality, improve labor productivity, and achieve automation. Whether CNC machine tools can fully play their role depends on the efficiency and ease of use of the CNC programs they use. In order to ensure the correctness of the CNC machining process, it is very important to verify the machining program before actual CNC machining. At present, with the development of computer simulation technology, the technology of using computer simulation technology to verify the CNC machining process is widely used in actual production.
[0003] MDC (Manufacturing Data Collection & Status Management) is a set of software and hardware solutions for real-time collection, reporting and charting of detailed manufacturing data and processes in the workshop. At present, there is a lack of effective methods and devices for real-time monitoring of CNC machine tools through MDC production management. In major secondary vocational schools, CNC machine tools are expensive and learning resources are limited. Due to the large number of students, many students may have few opportunities to observe the actual processing of CNC machine tools. Summary of the invention
[0004] In view of this, the present invention provides a method for driving model motion and online measurement based on MDC acquisition of G code, which provides a real-time, transparent, and visual CNC machine tool equipment monitoring system for manufacturing production management, and also solves the teaching needs of major secondary vocational schools. The present invention can intuitively, synchronously, and realistically simulate the actual processing process of CNC machine tools. When applied to enterprises, it can greatly improve the production management efficiency of enterprises, better coordinate workshop management, and improve production efficiency. The present invention is applied to the teaching of secondary vocational schools, which can meet the requirements of CNC machine tool simulation teaching, improve students' interest in learning, and deepen their understanding of the processing process of CNC machine tools, thereby improving the teaching quality of the school.
[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0006] The method of driving model motion and online measurement based on MDC acquisition of G code includes:
[0007] Use the CNC system to control the CNC machine tools, collect data during the CNC machine tool processing, and send the collected data to the CNC simulation software in real time;
[0008] The CNC simulation software receives the data sent by the CNC system, loads the simulation model according to the received data, drives the CNC machine simulation model to move, and operates synchronously with the CNC machine tool;
[0009] The CNC simulation software automatically measures the machining tolerance and judgment criteria at the actual position of the CNC machine tool simulation model based on the operating data of the CNC machine tool, and returns the modified tool compensation value based on the measurement results to achieve online measurement.
[0010] Furthermore, the CNC machine tool is integrated with an MDC module, and data during the machining process is collected in real time through the MDC module.
[0011] Furthermore, a network transmission module is integrated in the CNC machine tool, and the collected data is sent to the CNC simulation software in real time through the network transmission module.
[0012] Further, the data collected in real time by the MDC module during the processing process include the type of the CNC system and the type of the CNC machine tool;
[0013] G code program for data machine tool processing;
[0014] CNC machine tool operating status data.
[0015] Furthermore, the CNC machine tool also pre-reads several program segments before performing processing control, and performs speed planning and motion planning in advance.
[0016] Furthermore, the CNC machine tool also sends the pre-read data to the CNC simulation software. After receiving the data, the CNC simulation software calculates the data corresponding to the point in the machine tool coordinate system, and performs collision and interference checks on these pre-read data segments and the CNC machine tool simulation model;
[0017] If it is found that the data collides with the machine tool parts, an alarm message will be sent to the CNC system immediately. After receiving the information, the CNC system will control the machine tool to move or stop according to the warning level.
[0018] Furthermore, the CNC simulation software automatically measures the machining tolerance and judgment standard at the actual position of the CNC machine tool simulation model according to the operation data of the CNC machine tool, and returns the modified tool compensation value according to the measurement result, realizing online measurement including
[0019] The NC simulation software receives the real-time motion data of the NC machine tool, performs coordinate transformation on the motion point data, and transforms it into point coordinates in the world coordinate system;
[0020] Compare these points with the actual coordinate positions on the processing model, calculate the distance between the two points, and determine whether it meets the accuracy;
[0021] If the accuracy requirements are not met, the CNC simulation software calculates the optimal tool compensation value based on the tool geometry and sends it to the CNC machine tool. After receiving the tool compensation value, the CNC machine tool automatically adjusts the current tool compensation value.
[0022] Compared with the prior art, the method of driving model movement and online measurement based on MDC acquisition of G code described in the present invention has the following advantages:
[0023] The present invention is applied to manufacturing production management, which can realize real-time, transparent and visual monitoring of CNC machine tools, use production overall management, and improve production efficiency;
[0024] The present invention is applied to various secondary vocational schools, and can easily allow every student to observe the actual processing process of CNC machine tools in real time, thereby improving learning efficiency, facilitating students to master CNC technology more proficiently, and improving the teaching quality of the school;
[0025] The predictive collision interference check provided by the present invention greatly improves processing safety;
[0026] The online measurement method provided by the present invention can timely correct the tool compensation value, thereby ensuring the processing quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0028] Figure 1 It is a schematic diagram of real-time data interaction between a numerical control machine tool and numerical control simulation software of the present invention;
[0029] Figure 2 It is a schematic diagram of the real-time data acquisition and processing flow of the numerical control simulation software of the present invention. DETAILED DESCRIPTION
[0030] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0031] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention 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 therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0032] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" 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 a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0033] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0034] like Figure 1-2 As shown, the present invention provides a method for driving model movement and online measurement based on MDC acquisition of G code, including
[0035] Use the CNC system to control the CNC machine tools, collect data during the CNC machine tool processing, and send the collected data to the CNC simulation software in real time;
[0036] The CNC simulation software receives the data sent by the CNC system, loads the simulation model according to the received data, drives the CNC machine simulation model to move, and operates synchronously with the CNC machine tool;
[0037] The CNC simulation software automatically measures the machining tolerance and judgment criteria at the actual position of the CNC machine tool simulation model based on the operating data of the CNC machine tool, and returns the modified tool compensation value based on the measurement results to achieve online measurement.
[0038] The CNC machine tool is integrated with an MDC module, and data during the machining process is collected in real time through the MDC module.
[0039] In one embodiment of the present invention, the CNC machine tool is equipped with a dedicated CNC system, which consists of hardware and software. The CNC system software is also called control software, which is mainly divided into the following parts:
[0040] Input data processing program: Receive the input G code processing program, decode the processing instructions and data represented by the standard code, and process the data into the data format specified within the system.
[0041] Interpolation operation program: According to the type of curve, the starting point, end point, etc. are calculated, and feed pulses are sent to each coordinate axis to drive the workbench or tool to make corresponding movements.
[0042] Speed control program: Control the frequency of interpolation operation according to the given feed speed to ensure the predetermined feed speed.
[0043] Management program: responsible for scheduling and managing various programs that serve the processing process, such as input, data processing, and interpolation operations.
[0044] Diagnostic program: timely detect system faults during program operation and point out the type of fault.
[0045] Based on the software composition and performance of the numerical control system, the method of real-time data collection of the numerical control system integrated with MDC of the present invention includes two methods:
[0046] The first type: The MDC module of the CNC system only collects the G code line number, and the line number is used as the basis for synchronization and update between the CNC system and the data simulation software. During the operation of the CNC machine tool, the current executed code line number collected by the MDC module is transmitted to the CNC simulation software in real time through the network.
[0047] The second type: The MDC module of the CNC system collects a wealth of information, including all information in the code program segment, such as the G code line number, current position, speed information, etc. During the operation of the CNC machine tool, all the information collected by the MDC module is fed back to the CNC simulation software in real time.
[0048] In one embodiment of the present invention, the MDC module of the numerical control system collects data in real time during the processing, including
[0049] Types of CNC systems and types of CNC machines;
[0050] G code program for data machine tool processing;
[0051] CNC machine tool operating status data.
[0052] In one embodiment of the present invention, the network transmission module in the numerical control simulation software is responsible for receiving data and transmitting the received data to the management module of the numerical control simulation software, and the management module of the numerical control simulation software processes the received data.
[0053] The CNC simulation software adapts to the actual production environment, including: CNC machine tools, CNC systems, tool libraries and other information, with code reverse reading module, interpolation module, drive model motion module, etc.
[0054] The CNC simulation software management module receives the collected data and processes it accordingly based on the data type:
[0055] After receiving the CNC machine tool type: the simulation software management module will load the corresponding simulation model from the machine tool library;
[0056] Receive the CNC system type: the simulation software management module will load the corresponding CNC system;
[0057] After receiving the processed G code program: the simulation software management module will start the thread and read the G code back into the internal data structure for use by the parsing program;
[0058] After receiving the real-time collected data, the simulation software management module will make corresponding processing and drive the model to move synchronously in real time;
[0059] After receiving the machine tool operation status data, the simulation software management module will also make corresponding processing to ensure synchronous operation with the CNC machine tool.
[0060] There are two types of real-time data collected by the data simulation software management module: one is only the line number; the other is the line number, position, speed and other information. Different processing is required for these two types of information to drive the model movement.
[0061] The first type: only includes line number information.
[0062] The simulation software management module will retrieve the corresponding program segment position in the G code according to the line number, switch to highlight the current code line, find the corresponding reverse reading result data, and then parse the data to obtain the position information and speed information. Finally, interpolation processing is performed based on the position and speed information to control the movement of the simulation model and the synchronization of the machine tool.
[0063] The second type: includes all the information in the code such as line number, position, speed, etc.
[0064] Because the transmitted data is the result of code program analysis, the simulation software does not need to analyze the G code. It only needs to retrieve the corresponding program segment position in the G code according to the line number and switch to highlight the current code line. Then, interpolation processing is performed based on the position and speed information to control the movement of the simulation model and synchronize with the machine tool.
[0065] In one embodiment of the present invention, in order to predict the safety of CNC machining, the present invention can ensure that x steps can be run in advance according to the information collected in real time, and perform cutting and collision interference checks. If there is a problem, an alarm will be issued in time, and the machine can be shut down in serious cases, thereby greatly ensuring the safety of machining.
[0066] Specifically, in order to more effectively control the movement of each coordinate axis of the machine tool, the CNC system will pre-read several program segments, perform speed planning and motion planning in advance, thereby improving the movement efficiency of the machine tool and improving the processing quality. The data pre-read by the CNC system is sent to the CNC simulation software. When the CNC simulation software receives the data, it calculates the data corresponding to the point in the machine tool coordinate system, and performs collision interference checks on these pre-data segments and the CNC machine tool model. If the data is found to collide with the machine tool parts, an alarm message is immediately sent to the CNC system. After receiving the information, the CNC system controls the machine tool to move or stop according to the warning level to improve processing safety.
[0067] In another embodiment of the present invention, during the operation of the CNC machine tool, the CNC machine tool can collect the size of the processing object, and based on the transmitted data, the actual position on the CNC simulation model, automatically measure the processing tolerance and judgment standard, and return the modified tool compensation value based on the measurement results, thereby improving the processing accuracy and realizing the online measurement function.
[0068] The CNC simulation software receives the real-time motion data of the CNC machine tool, and first transforms the motion point data into point coordinates in the world coordinate system. These points are then compared with the actual coordinate positions on the processing model. The distance between the two points is calculated to determine whether it meets the accuracy requirements. If the accuracy requirements are not met, the CNC simulation software calculates the optimal tool compensation value based on the tool geometry to improve the processing accuracy, and sends the calculated optimal tool compensation value to the CNC machine tool. After receiving the tool compensation value, the CNC machine tool automatically adjusts the current tool compensation value. During the processing, this real-time online measurement and real-time adjustment of the tool compensation value can greatly improve the processing quality.
[0069] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for driving model motion based on MDC acquisition of G code, characterized in that: include Use the CNC system to control the CNC machine tools, collect data during the CNC machine tool processing, and send the collected data to the CNC simulation software in real time; CNC simulation software includes: Input data processing program: Receive the input G code processing program, decode and process the processing instructions and data represented by the standard code into the data format specified in the system; Interpolation operation program: According to the type of curve, the starting point and end point are calculated, and feed pulses are sent to each coordinate axis to drive the workbench or tool to make corresponding movements; Speed control program: controls the frequency of interpolation operation according to the given feed speed to ensure the predetermined feed speed; Management program: responsible for scheduling and managing various programs that serve the processing process, such as input, data processing, and interpolation operations; Diagnostic program: timely discover system faults during program operation and point out the fault type; Based on the composition and performance of the CNC system software, the MDC module is integrated in the CNC machine tool. The MDC module collects data in the processing process in real time, including the CNC system type and CNC machine type of the CNC machine tool, the G code program of the data machine tool processing, and the CNC machine tool operation status data. There are two methods for collecting data: The first type: The MDC module of the CNC system only collects the G code line number. At this time, the line number is used as the basis for synchronization and update between the CNC system and the data simulation software. During the operation of the CNC machine tool, the current executed code line number collected by the MDC module is transmitted to the CNC simulation software in real time through the network; The second type: The MDC module of the CNC system collects rich information, including all information in the code program segment. During the operation of the CNC machine tool, all the information collected by the MDC module is fed back to the CNC simulation software in real time; The CNC simulation software receives the data sent by the CNC system, loads the simulation model according to the received data, drives the CNC machine simulation model to move, and operates synchronously with the CNC machine tool; there are two types of real-time acquisition data received by the CNC simulation software, one includes only the line number; the other includes the line number, position, and speed information. For these two types of information, different processing methods are used to drive the model movement; The first one: only includes line number information: The CNC simulation software retrieves the corresponding program segment position in the G code according to the line number, switches to highlight the current code line, finds the corresponding reverse reading result data, and then parses the data to obtain the position information and speed information. Finally, it performs interpolation processing based on the position and speed information to control the movement of the simulation model and synchronize with the machine tool. The second type: including all the information in the code segment: Because the transmitted data is the result of code program analysis, the simulation software does not need to analyze the G code again. It only needs to retrieve the corresponding program segment position in the G code according to the line number, switch to highlight the current code line, and then perform interpolation processing according to the position and speed information to control the movement of the simulation model and the synchronization of the machine tool; It also includes the CNC machine tool pre-reading several program segments before processing control, and pre-planning speed and motion planning, including: The CNC machine tool also sends the pre-read data to the CNC simulation software. After receiving the data, the CNC simulation software calculates the data corresponding to the point in the machine tool coordinate system and performs collision and interference checks on these pre-read data segments and the CNC machine tool simulation model; If it is found that the data collides with the machine tool parts, an alarm message will be sent to the CNC system immediately. After receiving the information, the CNC system will control the machine tool to move or stop according to the warning level.
2. The method for driving model motion based on MDC collection of G codes according to claim 1, characterized in that: The CNC machine tool is integrated with an MDC module, and data during the machining process is collected in real time through the MDC module.
3. The method for driving model motion based on MDC collection of G codes according to claim 1, characterized in that: The CNC machine tool is integrated with a network transmission module, through which the collected data is sent to the CNC simulation software in real time.
4. The method for driving model motion based on MDC-collected G codes according to claim 1, characterized in that: The CNC simulation software automatically measures the machining tolerance and judgment standard at the actual position of the CNC machine tool simulation model according to the operation data of the CNC machine tool, and returns the modified tool compensation value according to the measurement result, realizing online measurement including The NC simulation software receives the real-time motion data of the NC machine tool, performs coordinate transformation on the motion point data, and transforms it into point coordinates in the world coordinate system; Compare these points with the actual coordinate positions on the processing model, calculate the distance between the two points, and determine whether it meets the accuracy; If the accuracy requirements are not met, the CNC simulation software calculates the optimal tool compensation value based on the tool geometry and sends it to the CNC machine tool. After receiving the tool compensation value, the CNC machine tool automatically adjusts the current tool compensation value.
Citation Information
Patent Citations
Speed forecasting method, as well as numerical control device and numerical control system thereof
CN102945020A
Embedded type integratedly-manufactured data collecting terminal based on network
CN103384268A
Digital factory management system and management method
CN107844098A
Production line digital twinning system
CN111708332A
Numerical control machine tool track error compensation method based on cloud computing
CN114609969A