A unity 3D-based numerical control grinding machine state remote monitoring system

The CNC grinding machine status remote monitoring system based on Unity3D solves the problem of remote real-time data transmission and visualization of CNC grinding machines, realizes real-time monitoring of grinding machine status and verification of machining code, and improves fault handling efficiency and machining accuracy.

CN117140355BActive Publication Date: 2025-11-07ZHEJIANG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311002585.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2025-11-07
Estimated Expiration
2043-08-10

AI Technical Summary

Technical Problem

The existing data transmission and processing methods of CNC grinding machines cannot meet the needs of remote real-time transmission of grinding machine operating status and fault information. They lack an intuitive visualization interface and have imperfect graphical verification functions, resulting in low fault response and processing efficiency and a high risk of machining code errors.

Method used

A remote monitoring system for CNC grinding machine status based on Unity3D is adopted, which includes a real-time data acquisition module, a real-time data transmission module, a data visualization module, and a virtual grinding simulation module. The system utilizes a message queue telemetry transmission protocol to achieve remote real-time data transmission, constructs an intuitive visualization interface, and verifies the machining code through the virtual grinding simulation module.

Benefits of technology

It enables remote real-time monitoring of the operating status of CNC grinding machines and efficient processing of fault information, reducing the risk of machining code errors, improving production efficiency and safety, and possessing good cross-platform compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117140355B_ABST
    Figure CN117140355B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on Unity3D's numerical control grinding machine state remote monitoring system, comprising: real-time data acquisition module is used to obtain running state data from numerical control grinding machine in real time;Real-time data transmission module, for receiving the running state data from real-time data acquisition module and the machining code verified via virtual grinding simulation module, and transmission based on message queue telemetry transmission protocol;Data visualization module, for receiving and processing the running state data from real-time data transmission module, visual display is carried out using Unity3D;Virtual grinding simulation module, for obtaining input machining code to be inspected, the simulation of numerical control grinding machine model is carried out by machining code, if machining code verification is correct, then machining code can be issued to the numerical control system of numerical control grinding machine by real-time data transmission module. The above-mentioned system realizes the effective monitoring of remote numerical control grinding machine.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of grinding machine monitoring, and particularly relates to a numerical control grinding machine state remote monitoring system based on Unity3D. BACKGROUND

[0002] A grinding machine is a machine tool used for grinding. Grinding is a process of removing excess material from the surface of a workpiece using a grinding system to achieve the desired shape, size and processing quality. Grinding machines are the main tools for obtaining the surface and size precision of high-end precision parts. Grinding machines can perform highly precise and roughness less grinding to achieve high efficiency processing. During the grinding process, the grinding wheel rotates at a predetermined speed, and the grinding wheel is fed forward at a predetermined feed speed by the grinding wheel frame to grind the outer surface of the workpiece. The thin layer of material on the outer surface of the workpiece is gradually stripped to achieve the required size and shape. Then the grinding wheel frame retreats to a safe distance, and the workbench moves the workpiece left and right to the next grinding area to align the grinding wheel, and performs the same feeding action until the entire grinding area is ground.

[0003] According to different operation modes, grinding machines can be divided into manual grinding machines and numerical control grinding machines. Traditional manual grinding machines are limited by the technical level and experience of the operators. Numerical control grinding machines use digital control systems to achieve precise position control of the workpiece and tool. Numerical control grinding machines have become the mainstream of grinding machines used in current enterprise production.

[0004] As an industrial mother machine used for high-end precision part processing, the reliability of the numerical control grinding machine not only has a crucial influence on the accuracy of the parts, but also is directly related to the production efficiency. However, in the traditional numerical control grinding machine detection method, the operator usually inspects the machine regularly, or installs additional sensors and monitoring systems to monitor the numerical control machine. Due to the limitations of data transmission and processing methods, and the lack of intuitive visual interface, the operator often cannot remotely and in real time obtain the running state and fault information of the grinding machine, which leads to difficulties in taking measures to solve the problem in time, and thus affects the production efficiency.

[0005] In addition, due to the lack of graphical verification function in the numerical control system of some numerical control grinding machines, the numerical control grinding machine operator needs to check the processing code based on experience. This method has the risk of causing workpiece processing errors due to processing code errors, resulting in part scrap, which brings economic losses to enterprises. This situation is particularly common in complex processing tasks.

[0006] In recent years, significant progress has been made in the field of machine tools based on digital twin technology. Digital twin technology is a technology that can combine physical space with information space, achieving visualization and real-time interaction. Patent document CN115291565A discloses a machine tool digital twin system, which includes a machine tool, a data acquisition module, a data communication module, and a digital twin module. The machine tool contains a MODBUS interface, and the data acquisition module includes a state data acquisition submodule and a motion data acquisition submodule. The data communication module is used to communicate state data and motion data to the digital twin module. The digital twin module includes a machine tool model determination submodule, a motion and machining simulation submodule, and a display submodule. Although this system to some extent realizes the motion mapping, milling mapping, state mapping, parameter prediction, and feedback control of the physical machine tool in the digital twin body. However, due to the development of ODBUS RTU RS-485 communication based on machine tool motors, the adaptation scene is limited, there may be low data transmission efficiency and security challenges, and no solution is disclosed for the problem of remote real-time transmission of machine tool state.

[0007] Patent document CN116237812A discloses a machine tool digital twin system, which includes a machine tool, a data acquisition module for acquiring static attribute data and real-time processing data of the machine tool, a data communication module for transmitting data to a data processing module, a data processing module for eliminating noise components and redundant information in the collected data, and performing fusion processing on the processed data, classifying the data according to components, and formatting variable types and units, a digital twin module for establishing a digital twin model and binding machine tool parameters to the digital twin model. Although the machine tool digital twin system provided by this system to some extent realizes the binding mapping of the five-axis numerical control machine tool processing process and state parameters, forms a digital twin model of the five-axis numerical control machine tool, and can dynamically and real-time reflect the real state of the equipment in the five-axis numerical control machine tool. However, no solution is disclosed for the problem of real-time transmission of the state of the specific remote transmission scene of the grinding machine and the inability to perform graphical verification.

[0008] In the prior art application, for the state monitoring system of the numerical control grinding machine, there are mainly two problems: first, the existing data transmission and processing method cannot meet the demand of remote real-time transmission of the running state and fault information of the grinding machine, which limits the response and processing efficiency of the fault. Second, the lack of remote intuitive visual interface makes it difficult for the operator to clearly understand the running condition of the grinding machine in a timely manner, and at the same time, the graphical verification function of some numerical control grinding machines is not perfect, which exists the risk of processing caused by processing code error. SUMMARY

[0009] In view of the above, the purpose of the present application is to provide a Unity3D-based numerical control grinding machine state remote monitoring system to solve the problems in the prior art and significantly improve the operation efficiency and safety of the numerical control grinding machine, thereby providing an effective solution for remote monitoring of the numerical control grinding machine.

[0010] Specifically, the object of the present application is:

[0011] 1) Develop a new data transmission and processing method, so that the running state and fault information of the grinding machine can be transmitted remotely and in real time, thereby improving the efficiency and accuracy of fault handling;

[0012] 2) Based on the information transmitted remotely and in real time, an intuitive remote visualization interface is constructed, so that the operator can clearly understand the running state of the grinding machine, and a graphical verification function is added to reduce the risk caused by code errors.

[0013] In order to achieve the above-mentioned purpose of the application, the Unity3D-based numerical control grinding machine state remote monitoring system provided by the embodiment comprises: a real-time data acquisition module, a real-time data transmission module, a data visualization module, and a virtual grinding simulation module; wherein:

[0014] The real-time data acquisition module is used to acquire running state data from the numerical control grinding machine in real time, and forward the running state data to the real-time data transmission module;

[0015] The real-time data transmission module is used to receive the running state data from the real-time data acquisition module and the machining code verified by the virtual grinding simulation module, and transmit based on the message queue telemetry transmission protocol;

[0016] The data visualization module is used to receive and process the running state data from the real-time data transmission module, and visualize the data using Unity3D;

[0017] The virtual grinding simulation module is used to obtain the input machining code to be verified, simulate the numerical control grinding machine model through the machining code, and if the machining code is verified correctly, the machining code can be sent to the numerical control system of the numerical control grinding machine through the real-time data transmission module.

[0018] In one embodiment, the running state data received from the real-time data acquisition module comprises the following steps:

[0019] uploading the running state data from the real-time data acquisition module to a first publisher server; constructing a data subscription client for obtaining the running state data from the first publisher server; running the data subscription client to perform connection testing and data testing to ensure the connection of the data subscription client with the first publisher server and the successful subscription of the running state data, and if the connection testing and the data testing are normal, transmitting the running state data to a data visualization module.

[0020] In one embodiment, the data subscription client needs to set the address and port information of the first publisher server, and specify the sample / machine tool device number / data channel number as the subscription topic, and write a running state data subscription state callback function.

[0021] In one embodiment, the downlink to the numerical control system of the numerical control grinding machine comprises:

[0022] If the machining code can make the numerical control grinding machine model normally perform the grinding motion, the machining code is uploaded to the first publisher server, and then downlinked to the numerical control system of the numerical control grinding machine through the first publisher server; wherein the machining code needs to be encoded before uploading, and the request topic is set / request / device product serial number when downlinking.

[0023] In one embodiment, the visualization display using Unity3D comprises:

[0024] The running state data is format-parsed to extract each data volume in the running state data, and the running state data is displayed in real time by constructing a Unity3D component.

[0025] In one embodiment, the simulation of the numerical control grinding machine model comprises:

[0026] The three-dimensional numerical control grinding machine model is modeled, and the machining code is parsed to drive the three-dimensional numerical control grinding machine model to perform the grinding motion.

[0027] In one embodiment, the three-dimensional numerical control grinding machine model modeling comprises:

[0028] The CAD drawing of the numerical control grinding machine is obtained, and the three-dimensional numerical control grinding machine model is established according to the CAD drawing of the numerical control grinding machine through a three-dimensional modeling software; the three-dimensional numerical control grinding machine model structure is divided and lightened, and the obtained three-dimensional numerical control grinding machine model is imported into Unity3D; the structure division divides the three-dimensional numerical control grinding machine model into six parts of bed body, workbench, headstock, tailstock, grinding wheel carrier and grinding machine shell; the grinding wheel carrier is added with a rigid body component and a mesh collider component; a workpiece model is established using a modeling tool, a mesh collision body is added and saved as a prefab; and the workpiece model is generated in the headstock by stacking multiple prefabs, and the three-dimensional numerical control grinding machine model modeling is completed.

[0029] In one embodiment, the grinding movement comprises:

[0030] Generating a sub-object of a three-dimensional numerical control grinding machine model, parsing and mapping the machining code to the sub-object, and driving the three-dimensional numerical control grinding machine model to perform movement;

[0031] If a collision is detected in the movement, the grid vertex position information of each part in the collision area is obtained, the grid vertex information of each vertex is normalized by traversing each vertex to obtain the direction of each vertex, and the vertex coordinates are reduced along the reverse direction of the vertex to simulate the grinding effect of the workpiece model.

[0032] In one embodiment, the virtual grinding simulation module can also realize visual interaction of the model through the numerical control grinding machine three-dimensional model roaming interaction module.

[0033] Compared with the prior art, the present application has at least the following beneficial effects:

[0034] 1) In the first aspect, based on the transmission of the message queue telemetry transmission protocol, the running state data of the numerical control grinding machine is realized for real-time remote monitoring, the efficiency of data acquisition and utilization is improved, and the efficiency and accuracy of fault handling are improved;

[0035] 2) In the second aspect, the numerical control grinding machine remote monitoring system constructed by Unity3D realizes real-time mapping of the numerical control grinding machine state, strengthens the corresponding relationship between the physical space and the information space, and displays the numerical control grinding machine state in a comprehensive and intuitive manner;

[0036] 3) The virtual grinding simulation based on the machining code realized by Unity3D can simulate and verify the machining code in three dimensions, and enhance the machining efficiency and accuracy;

[0037] 4) In addition, the machining code can also be directly issued to the numerical control system of the numerical control grinding machine through the real-time data transmission module, which saves the step of directly inputting the machining code in the numerical control system of the numerical control grinding machine, and this system can run on devices with different operating systems such as Windows, Android and iOS after part of the code is modified, and has good cross-platform performance. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0039] Figure 1 is a structural block diagram of a Unity3D-based numerical control grinding machine state remote monitoring system provided by the embodiment;

[0040] Figure 2 is a first part implementation flowchart of a real-time data transmission module provided by the embodiment;

[0041] Figure 3 is an implementation flowchart of a virtual grinding simulation module provided by the embodiment. DETAILED DESCRIPTION

[0042] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the protection scope of the present application.

[0043] Figure 1 is a structural block diagram of a Unity3D-based numerical control grinding machine state remote monitoring system provided by the embodiment. As shown in Figure 1 the numerical control grinding machine state remote monitoring system provided by the embodiment includes the following functional modules: a real-time data acquisition module, a real-time data transmission module, a data visualization module, and a virtual grinding simulation module. The virtual grinding simulation module can also realize three-dimensional all-around view observation of the model through a numerical control grinding machine three-dimensional model roaming interaction module.

[0044] Each part will be described in detail below:

[0045] (1) The real-time data acquisition module is used to acquire running state data from the numerical control grinding machine in real time and forward the running state data to the real-time data transmission module.

[0046] Specifically, a numerical control grinding machine with a operating system of Huazhong numerical control system is used in the embodiment, and a Huazhong numerical control high-speed data acquisition box is equipped. The high-speed data acquisition box can collect the running state data in the numerical control grinding machine at a fixed frequency.

[0047] In order to realize the collection of the running state data in the numerical control grinding machine, it is necessary to modify the model.json file configured in the numerical control system of the numerical control grinding machine, so as to add, delete and modify the content and collection frequency of the collected numerical control grinding machine running state data.

[0048] By configuring the model.json file, the numerical control grinding machine data content including various shaft data, system data, channel data, tool parameter data, coordinate system data, alarm data, etc. can be obtained.

[0049] In this embodiment, the collected content includes: grinding machine startup state, alarm information, workpiece number, feed speed, grinding wheel speed, headstock speed, x-axis current, y-axis current, c-axis current. The collection frequency is 20ms per time. The collected running state data is forwarded to the real-time data transmission module through the high-speed data acquisition box.

[0050] (2) Real-time data transmission module, for receiving running state data from real-time data acquisition module and processing code verified by virtual grinding simulation module, and transmitting based on message queue telemetry transmission protocol.

[0051] In this embodiment, the real-time data transmission module is divided into two parts for implementation. The first part receives running state data from the real-time data acquisition module, and then transmits based on the message queue telemetry transmission protocol (hereinafter referred to as MQTT) protocol. The second part receives processing code verified by the virtual grinding simulation module, and then issues it to the numerical control system of the numerical control grinding machine based on the MQTT protocol.

[0052] Figure 2 is the first part of the real-time data transmission module provided by the embodiment. As shown in Figure 2 , this process is mainly transmitted through the MQTT protocol, and the mode used is the publish / subscribe message mode.

[0053] Specifically, first, the collected numerical control grinding machine running state data is forwarded to the MQTT publisher server in real time by the high-speed data acquisition box.

[0054] Second, write an MQTT script in Unity3D to build a data subscription client that is used to obtain running state data from the MQTT publisher server.

[0055] In this embodiment, the MQTT script sets the address and port information of the publisher server, specifies Sample / machine tool device number / data channel number as the subscription topic, and also obtains the numerical control grinding machine running state data through the callback function of the subscription state.

[0056] When writing the MQTT script, in order to ensure that the built data subscription client can correctly connect to the MQTT publisher server and successfully subscribe to the running state data, connection testing and data testing are required to confirm whether the publisher server is successfully connected and whether the high-speed acquisition box of Huazhong Numerical Control has uploaded the data to the publisher server.

[0057] Finally, if the connection test and data test are normal, the running state data in JSON format can be obtained in Unity3D, and the running state data is published to the data visualization module for parsing and processing through the MQTT script.

[0058] The second part is to receive the processing code verified by the virtual grinding simulation module and issue it to the numerical control system. This part will be introduced later after the virtual grinding simulation module.

[0059] (3) Data visualization module, for receiving and processing the running state data from the real-time data transmission module, and visualizing by using Unity3D.

[0060] In this embodiment, the function of the data visualization module is to format analyze the running state data of the real-time data transmission module, extract each data volume in the running state data, and display the running state data in real time by constructing the components of Unity3D.

[0061] In this embodiment, the data visualization module analyzes the message content obtained by the real-time data transmission module and displays the analyzed content on the visualized UI interface. Since the running state data transmitted by the real-time data transmission module is in JSON format, a C# script needs to be written in the data visualization module to analyze and process the JSON format running state data, so as to extract each data volume. By using each data volume in the update() function of the C# script to update the content of the Text component in the visualized UI interface, the real-time data visualization is realized.

[0062] Specifically, first, determine the data content that needs to be displayed in the data visualization interface, and construct the display components for the corresponding data content in Unity3D. In this embodiment, the displayed data content includes date and time, message subscription state, grinding machine start state, alarm information, workpiece number, feed speed, grinding wheel speed, headstock speed, x-axis current, y-axis current, and c-axis current.

[0063] Secondly, a C# script is written to analyze and process the JSON format running state data, extract the data content that needs to be displayed, and map it with the components constructed by Unity3D. By using each data volume in the update() function of the C# script to update the content of the Text component in the visualized UI interface, the real-time data visualization is realized.

[0064] For example, when the numerical control grinding machine is in normal running state, the alarm information content is null. When updating the visualized interface, if the C# script detects that the alarm information is not null, the visualized interface will display an alarm prompt, and the prompt will be sent to the maintenance personnel. Similarly, through the data visualization module, the running state data of the numerical control grinding machine can be monitored and displayed remotely in real time, thereby improving the production efficiency and the safety of the equipment operation.

[0065] (4) a virtual grinding simulation module, configured to obtain an input machining code to be verified, simulate a numerical control grinding machine model through the machining code, and if the machining code is verified to be correct, transmit the machining code to a numerical control system of the numerical control grinding machine through a real-time data transmission module.

[0066] In this embodiment, the virtual grinding simulation module is implemented in two parts. The first part is three-dimensional numerical control grinding machine modeling. The second part is to drive the three-dimensional numerical control grinding machine model to perform grinding movement after analyzing the machining code.

[0067] The implementation flowchart of the virtual grinding simulation module provided in this embodiment is shown in FIG. 1. Figure 3 As shown in FIG. 1, the implementation of the first part of the virtual grinding simulation module includes software modeling, lightweight processing, and structure redivision; and importing a three-dimensional numerical control grinding machine model into Unity3D.

[0068] Specifically, the three-dimensional numerical control grinding machine modeling in Unity3D includes the following steps.

[0069] First, obtain a CAD drawing of the numerical control grinding machine, and perform high-fidelity modeling on the numerical control grinding machine through a three-dimensional modeling software SolidWorks according to the CAD drawing of the numerical control grinding machine.

[0070] Second, place the obtained model into 3DMax for structure division and lightweight processing. This step can reduce the number of unnecessary points and surfaces in the model through optimization on the basis of ensuring the accuracy and fidelity of the model, thereby reducing the calculation amount of subsequent model movement.

[0071] Specifically, the structure division is to redivide the structure of the grinding machine into six parts, i.e., the bed, the worktable, the headstock, the tailstock, the grinding wheel carrier, and the grinding machine shell, according to the working feed mode of the grinding machine. The lightweight processing is to reduce the number of unnecessary points and surfaces while ensuring the fidelity of the model. In this embodiment, the number of points and surfaces of the model is reduced by 50% in the lightweight processing process.

[0072] Third, after completing the structure division and the model lightweight processing, export the three-dimensional numerical control grinding machine model as a model file in.fbx format, and complete the establishment of the numerical control grinding machine digital twin model. Import the established model into Unity3D for use in the subsequent virtual grinding simulation process.

[0073] Fourth, operate the imported three-dimensional numerical control grinding machine model in Unity3D. This step needs to find the grinding wheel carrier in the level panel of the imported three-dimensional numerical control grinding machine model in Unity3D, add a rigid body component and a mesh collider component to the child object grinding wheel of the grinding wheel carrier, and check the trigger option of the mesh collider component at the same time.

[0074] and modeling the workpiece by using discrete method; since the numerical control grinding machine used in the embodiment is a numerical control cylindrical grinding machine, the workpiece to be processed in the embodiment is of cylindrical structure, and thus can be composed of a plurality of cylindrical sheet pieces. Therefore, a cylindrical sheet piece model is established by using the ProBuilder modeling tool built in Unity3D, and a mesh collision body is added to the model. After checking the trigger option of the mesh collision body in Unity3D, corresponding material information is added to reflect the material color of the real part.

[0075] The cylindrical sheet piece models are created as prefabs in Unity3D for subsequent calling; the top dead center position of the headstock in the numerical control grinding machine model is found, an empty object is created at the position, and a C# script is added to the object. The script is used to generate a workpiece model with a custom diameter and length. The generation process includes generating cylindrical sheet piece prefab instances in a fixed direction at the top dead center position, the number of prefabs being equal to the custom workpiece length divided by the thickness of the cylindrical sheet piece, and the workpiece model being obtained by stacking the prefabs, and the part custom diameter being realized by controlling the proportional scaling of the cylindrical sheet piece.

[0076] Finally, an InputField component object is established in the Unity3D scene for inputting the machining code to be verified. The machining code input in the embodiment is G code. A script is written to obtain the G code content input by the InputField text box, and the corresponding content is parsed according to the compiled G code to be parsed into the motion mode and motion data of the three-dimensional numerical control grinding machine model in Unity3D, so as to simulate the grinding motion process of the numerical control grinding machine model.

[0077] Specifically, the grinding motion process is implemented as follows:

[0078] Firstly, the corresponding motion mode and motion data in Unity3D are obtained by content parsing based on the compiled G code, a script is mounted to the corresponding numerical control grinding machine model sub-object in Unity3D, the script is executed to drive the numerical control grinding machine model to perform motion, and the feeding motion effect is realized.

[0079] Secondly, if a collision occurs between the grinding wheel and the workpiece during the motion process, the C# script mounted on the cylindrical sheet piece prefab is executed to obtain the mesh vertex position information of all the cylindrical sheet piece models in the collision area.

[0080] Thirdly, the mesh vertex information of each vertex is normalized to obtain the direction of each vertex, the vertex coordinates are decreased along the reverse direction of the vertex, and thus the cylindrical sheet piece model in the collision area is reduced, so as to simulate the grinding process of the numerical control grinding machine model, and further verify whether the current machining code is correct in advance.

[0081] Secondly, after the virtual simulation verification, the verified processing code can be transmitted to the MQTT publisher server in the real-time data transmission module through the MQTT protocol. Specifically, in this embodiment, the request topic in this step is set as Set / Request / Device SN code.

[0082] Finally, it is issued by the publisher server to the numerical control system, which is the second part of the real-time data transmission module. In this step, the G code is issued to the numerical control system of the numerical control grinding machine, which saves the step of directly inputting the processing code in the numerical control system of the numerical control grinding machine. Not only the correctness of the processing code is verified, but also the operation personnel is facilitated to further use the processing code for processing in the numerical control grinding machine. Before issuing the G code, the G code content needs to be encoded and then issued. The G code content in the request content needs to be encoded using the 16-bit hexadecimal value string of the file byte content.

[0083] For example, the G code content in the request content needs to be encoded using the 16-bit hexadecimal value string of the file byte content, such as the byte value of the character G in the G code file is 71, and the corresponding 16-bit hexadecimal representation is 47. Therefore, the character G in the request content is represented by two characters 47.

[0084] Moreover, in order to more clearly show the three-dimensional numerical control grinding machine model, the virtual grinding simulation module can also realize three-dimensional all-around visual observation of the model through the numerical control grinding machine three-dimensional model roaming interaction module.

[0085] (5) The numerical control grinding machine three-dimensional model roaming interaction module is used to realize visual interaction of the model with the virtual grinding simulation module.

[0086] The user can control the numerical control grinding machine model by moving the mouse, and observe the grinding machine model from a three-dimensional perspective, including moving, rotating, and zooming functions. The left mouse button controls the model movement, the mouse wheel controls the model zoom, and the right mouse button controls the model rotation.

[0087] Specifically, in this embodiment, a RawImage object, a RenderTexture object, and a Camera object are first created in the Unity3D scene. The RawImage object is used to realize the function of displaying the original picture by directly transmitting the pixel data of the original picture to the computer's graphics card for rendering. The RenderTexture object is used to realize the function of rendering the scene or game object to the texture instead of the screen. The Camera object is used to realize the function of shooting.

[0088] Secondly, the created RenderTexture is dragged to the Texture attribute of the created RawImage, and the created RenderTexture is dragged to the Target Texture attribute of the created Camera. The effect of dragging to the attribute is to take the picture projected by the Camera object to the RawImage object with the RenderTexture object as the carrier, so as to realize the effect of displaying the 3D model in the 2D picture.

[0089] Thirdly, the newly created Camera object is added with a script to control the camera movement and rotation, so as to control the shooting distance of the camera and the CNC grinding machine model, thereby realizing the above functions.

[0090] Finally, a set of ToggleGroup switch groups are provided in the embodiment to control the visibility of the grinding machine shell, and the switch group name is the internal view of the grinding machine. The on option is used to control the hiding of the grinding machine shell, and the off option is used to control the display of the grinding machine shell, thereby helping the user to better observe the internal model details of the CNC grinding machine model.

[0091] The embodiment realizes remote real-time visualization by collecting real-time running state data of the grinding machine and transmitting the data to the data visualization module based on the MQTT protocol. The three-dimensional grinding machine model is driven for virtual grinding by inputting the machining code to be inspected, and remote model visualization simulation is realized. In the manner of data visualization and model visualization, relevant technical personnel can remotely and effectively monitor the CNC grinding machine.

[0092] The specific embodiments described above have detailed the technical solutions and beneficial effects of the present application. It should be understood that the above description is only the most preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, supplements and equivalent replacements made within the principle range of the present application shall be included in the protection scope of the present application.

Claims

1. A Unity3D-based numerical control grinding machine state remote monitoring system, characterized in that, The application relates to a real-time data acquisition module, a real-time data transmission module, a data visualization module and a virtual grinding simulation module. The real-time data acquisition module is used for acquiring running state data from a numerical control grinding machine in real time and forwarding the running state data to the real-time data transmission module. The real-time data transmission module is used for receiving the running state data from the real-time data acquisition module and machining codes verified by the virtual grinding simulation module and transmitting the running state data and the machining codes based on a message queue telemetry transmission protocol. The data visualization module is used for receiving and processing the running state data from the real-time data transmission module and visualizing the running state data by using Unity3D. The virtual grinding simulation module is used for acquiring input machining codes, simulating a numerical control grinding machine model by using the machining codes and issuing the machining codes to a numerical control system of the numerical control grinding machine by the real-time data transmission module if the machining codes are verified to be correct. The running state data from the real-time data acquisition module is received by the following steps:

2. The Unity3D-based remote monitoring system for the state of a CNC grinding machine according to claim 1, characterized in that, The running state data from the real-time data acquisition module is uploaded to a first publisher server; a data subscription client is constructed and used for obtaining the running state data from the first publisher server; the data subscription client is run to perform connection testing and data testing, so as to ensure the connection of the data subscription client and the first publisher server and the successful subscription of the running state data; and if the connection testing and the data testing are normal, the running state data is transmitted to the data visualization module. The data subscription client needs to set address and port information of the first publisher server, specify a sample / machine tool equipment number / data channel number as a subscription topic and write a subscription state callback function of the running state data.

3. The Unity3D-based remote monitoring system for CNC grinding machine status according to claim 2, characterized in that, The machining codes are uploaded to the first publisher server and then issued to the numerical control system of the numerical control grinding machine by the first publisher server if the machining codes can make the numerical control grinding machine model normally perform grinding movement; wherein the machining codes need to be encoded before being uploaded and the request topic is set as / request / equipment product serial number when the machining codes are issued.

4. The Unity3D-based remote monitoring system for CNC grinding machine status according to claim 2, characterized in that, The running state data is visualized by using Unity3D by the following steps: The running state data is format-analyzed, each data amount in the running state data is extracted and the running state data is displayed in real time by constructing a Unity3D component.

5. The Unity3D-based remote monitoring system for CNC grinding machine status according to claim 1, characterized in that, The simulation of the numerical control grinding machine model comprises the following steps: A three-dimensional numerical control grinding machine model is modeled and the three-dimensional numerical control grinding machine model is driven to perform grinding movement after the machining codes are analyzed.

6. The Unity3D-based remote monitoring system for CNC grinding machine status according to claim 1, characterized in that, The three-dimensional numerical control grinding machine model is modeled by the following steps: CAD drawings of the numerical control grinding machine are acquired, a three-dimensional numerical control grinding machine model is established by a three-dimensional modeling software according to the CAD drawings of the numerical control grinding machine; 7. The Unity3D-based remote monitoring system for CNC grinding machine status according to claim 6, characterized in that, The three-dimensional numerical control grinding machine model is divided into a bed body, a workbench, a headstock, a tailstock, a grinding wheel frame and a grinding machine shell and is lightened, the three-dimensional numerical control grinding machine model is imported into Unity3D, the three-dimensional numerical control grinding machine model is divided into six parts by structure division; A rigid body component and a mesh collision component are added to the grinding wheel frame; ​ ​ A workpiece model is established using a modeling tool, a mesh collision body is added, and the workpiece model is saved as a prefab; A workpiece model is generated by superimposing a plurality of prefabs on the headstock, and modeling of the three-dimensional numerical control grinding machine model is completed.

8. The Unity3D-based remote monitoring system for CNC grinding machine status according to claim 7, characterized in that, The grinding motion comprises: A sub-object of the three-dimensional numerical control grinding machine model is generated, machining codes are parsed and mapped to the sub-object, and the three-dimensional numerical control grinding machine model is driven to perform motion; If a collision is detected in the motion, the mesh vertex position information of each part in the collision area is obtained; by traversing each vertex, the mesh vertex information of the vertex is normalized to obtain the direction of each vertex, so that the vertex coordinates decrease along the reverse direction of the vertex, and the grinding machining effect of the workpiece model is simulated.

9. The Unity3D-based remote monitoring system for CNC grinding machine status according to claim 1, characterized in that, The virtual grinding simulation module can also realize visual interaction of the model through a numerical control grinding machine three-dimensional model roaming interaction module.

Citation Information

Patent Citations

  • Digital twinning system of machine tool

    CN115291565A

  • Digital twinning system of machine tool

    CN116237812A

  • Online anti-collision monitoring device facing centreless internal grinding machine

    CN103128661A

  • Three-dimensional digital workshop system for multi-source heterogeneous data

    CN113313431A