Open type numerical control management method and platform based on PLCopen motion control standard

CN120143743AInactive Publication Date: 2025-06-13GUANGZHOU YIDA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510631219.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-06-13
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN120143743A_ABST
    Figure CN120143743A_ABST
Patent Text Reader

Abstract

The invention relates to an open numerical control management method and platform based on a PLCopen motion control standard, and the method comprises the following steps: extracting geometric feature data from a three-dimensional CAD model of an ideal cutter, recognizing the type of the cutter, matching a PLCopen motion control instruction, and generating a candidate instruction set; and carrying out machine tool kinematics simulation by utilizing the instruction set, obtaining simulation motion trail data, and carrying out collision detection. And if it is detected that the safe distance is insufficient, parameters of the candidate instruction set are optimized according to a collision detection result, and an optimized PLCopen motion control instruction is generated. And finally, the optimized instruction is utilized to control the machine tool to grind the tool to be ground, and a target tool corresponding to the ideal three-dimensional CAD model of the tool is obtained. The core of the scheme lies in that the grinding instruction is automatically generated and optimized according to the tool model, so that automatic tool grinding is achieved, and the technical problem that an existing automatic system is difficult to dynamically adjust according to the tool abrasion state and the grinding force is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of numerical control management, and particularly relates to an open numerical control management method and platform based on the PLCopen motion control standard. Background Art

[0002] With the continuous improvement of the requirements for tool accuracy and production efficiency in modern manufacturing, traditional numerical control tool grinding methods face many challenges. Traditional tool grinding methods usually rely on experienced operators to manually program, which is inefficient and difficult to ensure the consistency of machining quality. In addition, traditional grinding methods lack in-depth analysis of tool geometric features and are difficult to achieve personalized grinding for different types of tools, resulting in problems such as low grinding efficiency and short tool life. At the same time, with the increasing complexity of tool geometries, the difficulty and error rate of manual programming also increase, and for the grinding of complex tools, traditional programming methods are difficult to meet the requirements of accuracy and efficiency.

[0003] Although existing automated tool grinding systems have improved the machining efficiency to a certain extent, most of them use closed numerical control systems, lacking openness and flexibility. These systems are usually difficult to integrate with other production equipment and perform data interaction, which limits their application in the intelligent manufacturing environment. In addition, existing automated systems have insufficient monitoring and optimization capabilities for the tool grinding process and are difficult to perform dynamic adjustment based on real-time data such as tool wear status and grinding force, resulting in difficulties in further improving the stability and efficiency of the grinding process. The emergence of open numerical control systems and the PLCopen motion control standard provides new ideas for solving these problems. However, how to apply the PLCopen standard to the complex tool grinding process and achieve automatic recognition of tool geometric features, intelligent matching and optimization of instructions is still a key technical problem to be solved urgently.

[0004] Therefore, researching an open numerical control management method based on the PLCopen motion control standard has important theoretical significance and practical application value for improving the automation degree, machining accuracy and efficiency of tool grinding, and promoting the intelligent development of tool grinding technology. This method needs to be able to automatically extract tool geometric features, intelligently identify tool types, and perform instruction matching and optimization in the PLCopen instruction library according to tool types and geometric features, and finally generate an efficient and accurate grinding machining program. At the same time, this method also needs to have functions of collision detection and parameter optimization to ensure the safety of the grinding process, and integrate and perform data interaction with other production equipment through an open communication interface, so as to better meet the application requirements in the intelligent manufacturing environment. Summary of the Invention

[0005] The main object of the present invention is to provide an open numerical control management method and platform based on the PLCopen motion control standard, which solves the technical problem that the existing automation systems are difficult to dynamically adjust according to the tool wear state and grinding force.

[0006] To achieve the above object, the present invention provides an open numerical control management method based on the PLCopen motion control standard, including the following steps: Extract geometric features from the ideal tool 3D CAD model to obtain tool geometric feature data; Identify the tool type based on the tool geometric feature data to obtain a tool type identifier; Match instructions in a preset PLCopen motion control instruction library based on the tool type identifier to obtain a candidate instruction set; Control a preset machine tool to perform kinematic simulation on the tool to be ground based on the candidate instruction set to obtain simulation motion trajectory data; Perform collision detection on the simulation motion trajectory data to obtain a collision detection result. When the collision detection result shows that the safety distance is insufficient, optimize the parameters of the candidate instruction set based on the collision detection result to obtain an optimized PLCopen motion control instruction; Control the machine tool to grind the tool to be ground based on the optimized PLCopen motion control instruction to obtain a target tool corresponding to the ideal tool 3D CAD model.

[0007] Further, the extracting geometric features from the ideal tool 3D CAD model to obtain tool geometric feature data includes: Perform meshing on the ideal tool 3D CAD model to obtain tool mesh model data, and extract topological information from the tool mesh model data to obtain tool topological information, where the tool topological information includes the connection relationship of each node and the adjacency relationship information of each face in the tool mesh model; Detect feature edges of the tool mesh model data based on the tool topological information to obtain a set of tool feature edges, and extract feature points from the set of tool feature edges to obtain a set of tool feature points; Calculate geometric parameters of the tool mesh model data based on the set of tool feature points to obtain tool geometric feature data.

[0008] Further, the identifying the tool type based on the tool geometric feature data to obtain a tool type identifier includes: Construct a feature vector from the tool geometric feature data to obtain a tool feature vector, and perform principal component analysis dimensionality reduction on the tool feature vector to obtain a dimensionality-reduced tool feature vector; Calculate the similarity with a preset tool type feature library based on the dimension-reduced tool feature vector to obtain tool type similarity data, and sort the tool type similarity data to obtain the sorted tool type similarity data; Determine the tool type based on the sorted tool type similarity data to obtain a tool type identifier; wherein, the tool type identifier includes milling cutters, drills, and reamers.

[0009] Furthermore, perform instruction matching in a preset PLCopen motion control instruction library based on the tool type identifier to obtain a candidate instruction set, including: Parse the instruction bytecode of the tool type identifier to obtain a set of instruction primitives, and construct a syntax tree for the set of instruction primitives to obtain a PLCopen instruction syntax tree, where the PLCopen instruction syntax tree includes an instruction opcode segment, an operand segment, a status field, and a checksum segment; Perform state machine encoding based on the PLCopen instruction syntax tree to obtain a state transition table, and perform instruction stream parsing on the state transition table to obtain an instruction pipeline descriptor, where the instruction pipeline descriptor includes an instruction fetch stage code, a decoding stage code, an execution stage code, and a write-back stage code; Generate binary instructions for the instruction pipeline descriptor through an instruction compiler to obtain a candidate instruction set; wherein, the candidate instruction set includes axis group enable instruction codes, motion control instruction codes, synchronization trigger instruction codes, and status query instruction codes.

[0010] Furthermore, control a preset machine tool to perform kinematic simulation on the tool to be ground based on the candidate instruction set, and obtain simulation motion trajectory data, including: Parse the candidate instruction set to obtain a set of kinematic parameters, and perform kinematic modeling on a preset machine tool based on the set of kinematic parameters to obtain a machine tool kinematic model; wherein, the machine tool kinematic model includes joint degrees of freedom, link parameters, and workspace information; Perform tool path planning on the tool to be ground based on the machine tool kinematic model to obtain tool theoretical path data, and perform interpolation calculation on the tool theoretical path data to obtain tool interpolation trajectory data; Perform coordinate transformation on the tool interpolation trajectory data through forward kinematics to obtain tool spatial pose data, and decompose the motion of each axis of the machine tool based on the tool spatial pose data to obtain an axis motion instruction sequence; Perform inverse kinematics on the machine tool based on the axis motion instruction sequence to obtain a machine tool joint angle sequence, and perform dynamic analysis on the machine tool joint angle sequence to obtain joint torque data; The trajectory evaluation of the joint torque data is carried out through multi-body dynamics simulation to obtain simulation motion trajectory data; wherein, the simulation motion trajectory data includes axis position information, axis velocity information and trajectory tracking information.

[0011] Further, the parameter optimization of the candidate instruction set based on the collision detection result to obtain an optimized PLCopen motion control instruction includes: Performing spatial analysis on the collision detection result to obtain collision risk area data, and performing safety distance evaluation on the candidate instruction set based on the collision risk area data to obtain an instruction safety factor matrix; wherein, the instruction safety factor matrix includes the execution risk value and safety margin value of each instruction. Performing structural reconstruction on the instruction safety factor matrix through a topology optimization method to obtain an optimized instruction topology structure, and performing instruction sequence rearrangement on the candidate instruction set based on the optimized instruction topology structure to obtain a rearranged instruction sequence. Performing parameter sensitivity analysis on the rearranged instruction sequence to obtain instruction parameter sensitivity data, and performing adaptive parameter adjustment on the rearranged instruction sequence based on the instruction parameter sensitivity data to obtain a parameter-optimized instruction set. Performing a global search on the parameter-optimized instruction set through a multi-objective optimization algorithm to obtain a Pareto initial solution set, and performing instruction performance evaluation based on the Pareto initial solution set to obtain instruction performance data; wherein, the instruction performance data includes machining accuracy, motion smoothness and energy consumption efficiency information. Performing decision analysis on the Pareto initial solution set based on the instruction performance data to obtain a PLCopen instruction configuration scheme, and performing instruction encoding on the PLCopen instruction configuration scheme to obtain an optimized PLCopen motion control instruction; wherein, the optimized PLCopen motion control instruction includes an optimized axis group enable instruction, motion control instruction, synchronous trigger instruction and status query instruction.

[0012] Further, the performing decision analysis on the Pareto initial solution set based on the instruction performance data to obtain a PLCopen instruction configuration scheme includes: Performing multi-criterion hierarchical decomposition on the instruction performance data to obtain an instruction evaluation vector system, and performing fuzzy hierarchical weight assignment on the instruction evaluation vector system to obtain an index weight vector, wherein the index weight vector includes machining accuracy weight, trajectory smoothness weight, energy consumption efficiency weight and machining time weight. Perform vector projection transformation on the Pareto initial solution set based on the index weight vector to obtain an instruction scheme scoring matrix, and construct a dominance relationship graph for the instruction scheme scoring matrix to obtain a scheme dominance topological network, where the scheme dominance topological network includes node dominance, path dominance, local clustering coefficient, and global centrality; Perform eigenvalue decomposition on the scheme dominance topological network by means of spectral analysis method to obtain a network eigen-spectrum, and perform scheme ranking calculation based on the network eigen-spectrum to obtain a scheme ranking sequence, where the scheme ranking sequence includes a main ranking value, a secondary ranking value, a ranking stability index, and a ranking reliability index; Perform decision threshold screening on the Pareto initial solution set based on the scheme ranking sequence to obtain an optimal PLCopen instruction configuration scheme; wherein, the optimal PLCopen instruction configuration scheme includes optimal axis group configuration parameters, optimal motion sequence parameters, optimal synchronization trigger parameters, and optimal status feedback parameters.

[0013] The present invention also provides an open numerical control management platform based on the PLCopen motion control standard, including: An extraction module for extracting geometric features of an ideal tool three-dimensional CAD model to obtain tool geometric feature data; An identification module for identifying the tool type based on the tool geometric feature data to obtain a tool type identifier; A matching module for performing instruction matching in a preset PLCopen motion control instruction library based on the tool type identifier to obtain a candidate instruction set; A simulation module for controlling a preset machine tool to perform kinematic simulation on a tool to be ground based on the candidate instruction set to obtain simulation motion trajectory data; An optimization module for performing collision detection on the simulation motion trajectory data to obtain a collision detection result. When the collision detection result shows that there is insufficient safety distance, parameter optimization is performed on the candidate instruction set based on the collision detection result to obtain an optimized PLCopen motion control instruction; A grinding module for controlling the machine tool to grind the tool to be ground based on the optimized PLCopen motion control instruction to obtain a target tool corresponding to the ideal tool three-dimensional CAD model.

[0014] The present invention also provides a computer device, including a memory and a processor, where a computer program is stored in the memory, and when the processor executes the computer program, the steps of the method described in any one of the above are implemented.

[0015] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.

[0016] An open numerical control management method based on the PLCopen motion control standard provided by the present invention includes the following steps: extracting geometric features of an ideal tool three-dimensional CAD model to obtain tool geometric feature data; identifying the tool type based on the tool geometric feature data to obtain a tool type identifier; performing instruction matching in a preset PLCopen motion control instruction library based on the tool type identifier to obtain a candidate instruction set; controlling a preset machine tool to perform kinematic simulation on a tool to be ground based on the candidate instruction set to obtain simulation motion trajectory data; performing collision detection on the simulation motion trajectory data to obtain a collision detection result. When the collision detection result shows that the safety distance is insufficient, parameter optimization is performed on the candidate instruction set based on the collision detection result to obtain an optimized PLCopen motion control instruction; controlling the machine tool to grind the tool to be ground based on the optimized PLCopen motion control instruction to obtain a target tool corresponding to the ideal tool three-dimensional CAD model, solving the technical problem that the existing automation system is difficult to dynamically adjust according to the tool wear state and grinding force, realizing an open architecture based on the PLCopen motion control standard, making the method easy to integrate and interact with other numerical control systems and production equipment, and improving the openness and scalability of the system. Description of the Drawings

[0017] Figure 1 is a schematic diagram of the steps of an open numerical control management method based on the PLCopen motion control standard in an embodiment of the present invention; Figure 2 is a structural block diagram of an open numerical control management platform based on the PLCopen motion control standard in an embodiment of the present invention; Figure 3 is a structural schematic diagram of a computer device in an embodiment of the present invention.

[0018] The realization of the purpose, functional features and advantages of the present invention will be further described with reference to the embodiments and the drawings. Detailed Embodiments

[0019] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0020] As Figure 1 shown, Figure 1Schematic diagram of the steps of an open numerical control management method based on the PLCopen motion control standard in an embodiment of the present invention; An embodiment of the present invention provides an open numerical control management method based on the PLCopen motion control standard, including the following steps: Step S1, extract geometric features from the ideal tool three-dimensional CAD model to obtain tool geometric feature data.

[0021] Specifically, extracting geometric features from the ideal tool three-dimensional CAD model to obtain tool geometric feature data. The goal of this step is to obtain the key geometric information from the digital model of the tool for subsequent tool type identification, instruction matching, parameter optimization, etc. Specifically, first, the ideal tool three-dimensional CAD model needs to be preprocessed, such as removing noise, repairing defects, etc., to ensure the integrity and accuracy of the model. Then, various geometric feature extraction methods can be used, such as feature-based extraction methods, model-based extraction methods, etc., to extract the geometric feature data of the tool from the CAD model. These geometric feature data can include the diameter, length, angle, number of edges, helix angle, etc. of the tool, as well as the shape, position, and size information of each part of the tool. For example, for the CAD model of a twist drill, geometric feature data such as its diameter, length, helix angle, number of edges, and tip angle can be extracted. Another example is that for the CAD model of a ball-end milling cutter, geometric feature data such as its ball-end radius, shank diameter, total tool length, and number of edges can be extracted. The extracted geometric feature data will be used for subsequent tool type identification. For example, based on features such as the diameter, length, and number of edges of the tool, it can be identified whether the tool is a milling cutter, drill bit, or reamer, etc. In addition, these geometric feature data will also be used for the matching of PLCopen motion control instructions and parameter optimization. For example, based on the diameter and length of the tool, parameters such as the feed rate and cutting depth of the machine tool during the grinding process can be determined. In short, extracting geometric features from the ideal tool three-dimensional CAD model to obtain tool geometric feature data is a key step in implementing the open numerical control management method based on the PLCopen motion control standard, providing the necessary geometric information basis for subsequent tool type identification, instruction matching, parameter optimization, etc.

[0022] Step S2, identify the tool type based on the tool geometric feature data to obtain a tool type identifier.

[0023] Specifically, based on the tool geometric feature data, tool type identification is performed to obtain a tool type identifier. The core of this step is to use the geometric feature data extracted from the ideal tool 3D CAD model to determine the specific type of the tool. To implement this step, first, a tool type feature library needs to be established. This library stores the geometric feature data of various common tool types and their corresponding type identifiers. For example, the library will record the typical features of a twist drill (diameter range, length range, helix angle range, etc.) and the corresponding identifier "twist drill". Similarly, it will also record the feature data and identifiers of other tool types such as ball end mills and end mills. Then, the extracted tool geometric feature data is compared and analyzed with the data in the tool type feature library. Multiple classification algorithms can be used, such as support vector machines, decision trees, neural networks, etc., or rule-based expert systems, to make a judgment based on the similarity or compliance degree between the tool geometric feature data and the features of each type in the feature library. For example, if the geometric feature data of the tool to be identified highly matches the typical features of a twist drill, it is identified as a twist drill and given the corresponding type identifier. Another example is that if the ball nose radius of the tool to be identified is greater than zero and other features match those of a ball end mill, it is identified as a ball end mill and given the corresponding type identifier. After obtaining the tool type identifier, appropriate PLCopen motion control instructions can be selected according to this identifier. For example, if the tool is identified as a twist drill, instructions related to drilling, such as MC_Drilling, can be selected; if the tool is identified as a ball end mill, instructions related to milling, such as MC_MoveCircular and MC_MoveSuperimposed, can be selected. Therefore, tool type identification is the key bridge connecting the tool geometric feature data and the subsequent matching of PLCopen motion control instructions. It ensures that the selected instructions match the tool type, thus achieving efficient and precise tool grinding.

[0024] Step S3, based on the tool type identifier, perform instruction matching in the preset PLCopen motion control instruction library to obtain a candidate instruction set.

[0025] Specifically, instruction matching is performed in a preset PLCopen motion control instruction library based on the tool type identifier to obtain a candidate instruction set. This step aims to screen out the instructions applicable to the grinding of this type of tool from the preset PLCopen motion control instruction library according to the identified tool type, and form a candidate instruction set. The preset PLCopen motion control instruction library contains various standard motion control instructions, such as MC_MoveLinear (for linear motion), MC_MoveCircular (for circular motion), MC_Drilling (for drilling), MC_MoveSuperimposed (for superimposed motion), and so on. The process of instruction matching is to search for the instructions related to the grinding process of this type of tool according to the tool type identifier. For example, if the tool type identifier is "twist drill", the MC_Drilling instruction and other auxiliary instructions that may be used for twist drill grinding, such as instructions for controlling the coolant, can be matched. Another example is that if the tool type identifier is "ball end mill", the MC_MoveCircular, MC_MoveSuperimposed and other instructions, as well as other instructions that may be used for ball end mill grinding, such as instructions for controlling the spindle speed, can be matched. The result of the matching is a candidate instruction set, which contains all the relevant instructions that may be used for the grinding of this type of tool. It should be noted that since the grinding process of a tool may require multiple steps and each step may require different instructions, the candidate instruction set usually contains multiple instructions, which will be used to construct a complete grinding processing program later. After obtaining the candidate instruction set, further parameter optimization and collision detection are required to ensure that the finally generated grinding processing program can complete the tool grinding task safely and efficiently.

[0026] Step S4, based on the candidate instruction set, control a preset machine tool to perform kinematic simulation on the tool to be ground, and obtain simulation motion trajectory data.

[0027] Specifically, based on the candidate instruction set, control a preset machine tool to perform kinematic simulation on the tool to be ground, and obtain simulation motion trajectory data. The purpose of this step is to verify the feasibility of the candidate instruction set and provide a data basis for subsequent collision detection. Specifically, first, it is necessary to establish three-dimensional models of the preset machine tool and the tool to be ground in a virtual environment. Then, input the matched candidate instruction set into the control system of the virtual machine tool to drive the virtual machine tool to perform grinding operations according to the instructions. During this process, the system will record the motion states of the virtual machine tool and the virtual tool in real time, including information such as position, speed, and acceleration, and convert this information into simulation motion trajectory data. For example, if the candidate instruction set contains the MC_MoveCircular instruction for grinding the ball head part of a ball-end mill, then during the simulation, the grinding wheel of the virtual machine tool will move along a predetermined circular arc trajectory, and the system will record the motion trajectory data of the grinding wheel. Another example is that if the candidate instruction set contains the MC_Drilling instruction for grinding the spiral groove of a twist drill, then during the simulation, the grinding wheel of the virtual machine tool will perform rotational and feeding motions, and the system will record the motion trajectory data of the grinding wheel. These simulation motion trajectory data completely describe the relative motion between the tool and the machine tool during the grinding process and are an important basis for collision detection. By analyzing the simulation motion trajectory data, it is possible to determine whether there is a risk of collision or interference during the grinding process, thereby providing guidance for subsequent optimization of instruction parameters. In other words, kinematic simulation is a step to preview the grinding process, which can discover potential problems before actual grinding operations, thereby improving the safety of the grinding process.

[0028] Step S5: Perform collision detection on the simulation motion trajectory data to obtain a collision detection result. When the collision detection result shows that the safety distance is insufficient, optimize the parameters of the candidate instruction set based on the collision detection result to obtain an optimized PLCopen motion control instruction.

[0029] Specifically, collision detection is performed on the simulated motion trajectory data to obtain a collision detection result. When the collision detection result shows that the safety distance is insufficient, the candidate instruction set is parameter-optimized based on the collision detection result to obtain optimized PLCopen motion control instructions. This step is to ensure the safety of the grinding process and improve the grinding efficiency. Using the simulated motion trajectory data obtained in the previous steps, the relative positions of the machine tool and the tool during the entire grinding process can be analyzed to determine whether there is a risk of collision or interference. The collision detection algorithm calculates the minimum distance between the machine tool (such as the grinding wheel) and the tool to be ground and compares it with a preset safety distance. If the minimum distance is less than the safety distance, it is considered that there is a risk of collision, and the collision detection result will show that the safety distance is insufficient. For example, when simulating the grinding of the ball head part of a ball nose end mill, if the motion trajectory of the grinding wheel is too close to the tool shank, resulting in the minimum distance being less than the safety distance, the collision detection result will show a risk of collision. Similarly, when simulating the grinding of the spiral groove of a twist drill, if the motion trajectory of the grinding wheel is too close to the cutting edge of the tool, resulting in the minimum distance being less than the safety distance, the collision detection will also give an alarm. When the collision detection result shows that the safety distance is insufficient, the candidate instruction set needs to be parameter-optimized. The method of parameter optimization can be to adjust the parameters in the instructions, such as changing the arc radius in the MC_MoveCircular instruction, the feed rate or cutting depth in the MC_Drilling instruction, or to adjust the execution order of the instructions. The optimization goal is to avoid collisions while ensuring the grinding efficiency. Through repeated iteration of simulation and collision detection, a set of optimized PLCopen motion control instructions is finally obtained. These instructions can efficiently complete the tool grinding task while ensuring safety. The finally obtained optimized PLCopen motion control instructions will be used for the actual tool grinding operation.

[0030] Step S6, control the machine tool to grind the tool to be ground based on the optimized PLCopen motion control instructions to obtain a target tool corresponding to the ideal three-dimensional CAD model of the tool.

[0031] Specifically, based on the optimized PLCopen motion control instructions, the machine tool grinds the tool to be ground to obtain the target tool corresponding to the ideal tool three-dimensional CAD model. This is the final execution stage of the entire process. The goal is to actually apply the optimized PLCopen motion control instructions verified in the virtual simulation stage to the physical machine tool to complete the grinding process of the tool. After the previous steps, we have obtained a set of optimized PLCopen motion control instructions verified by simulation. These instructions can ensure the safety and efficiency of the grinding process. In this step, we load these instructions into the control system of the actual numerical control machine tool. The control system of the machine tool will parse and execute these instructions, driving each component of the machine tool (such as the grinding wheel, spindle, feed axis, etc.) to move along a predetermined trajectory to grind the tool. For example, for the grinding of a ball-nose end mill, the machine tool will control the grinding wheel to perform circular motion according to the MC_MoveCircular instruction to grind out the ball-nose shape; for the grinding of a twist drill, the machine tool will control the grinding wheel to perform rotational and feed motions according to the MC_Drilling instruction to grind out the spiral groove. The entire grinding process is carried out under the precise control of the optimized PLCopen motion control instructions, thereby ensuring the grinding accuracy and efficiency, and finally obtaining the target tool corresponding to the ideal tool three-dimensional CAD model. This means that the geometric shape and dimensions of the tool after grinding will be highly consistent with the ideal tool three-dimensional CAD model, meeting the design requirements. This step marks the completion of the entire tool grinding process, achieving closed-loop control from the digital model to the manufacturing of the actual tool, effectively improving the automation level and accuracy of tool manufacturing.

[0032] In a specific embodiment, the geometric feature extraction of the ideal tool three-dimensional CAD model to obtain tool geometric feature data includes: Perform meshing on the ideal tool three-dimensional CAD model to obtain tool mesh model data, and extract topological information from the tool mesh model data to obtain tool topological information. Among them, the tool topological information includes the connection relationship of each node and the adjacency relationship information of each face in the tool mesh model; Based on the tool topological information, perform feature edge detection on the tool mesh model data to obtain a set of tool feature edges, and extract feature points from the set of tool feature edges to obtain a set of tool feature points; Based on the set of tool feature points, perform geometric parameter calculation on the tool mesh model data to obtain tool geometric feature data.

[0033] Specifically, the step of extracting geometric features from the ideal tool 3D CAD model to obtain tool geometric feature data is the starting link of the entire tool grinding process. Its purpose is to convert the 3D CAD model of the ideal tool into a data form that can be understood and processed by a computer, providing necessary input information for subsequent steps such as tool type recognition, instruction matching, and simulation. This process mainly includes three sub-steps: meshing processing and topology information extraction, feature edge detection and feature point extraction, and geometric parameter calculation. First, perform meshing processing on the ideal tool 3D CAD model, that is, convert the CAD model originally represented by curves and surfaces into a mesh model composed of a large number of triangular or quadrilateral patches. This step is similar to splicing a smooth surface with many small planes. The mesh model data contains the three-dimensional coordinate information of each mesh vertex. At the same time, extract topology information from the tool mesh model data to obtain tool topology information, where the tool topology information describes the connection relationships between various nodes and the adjacency relationships between various faces in the mesh model. For example, which vertices are connected to which edges, and which faces are connected to which edges and vertices. These information are crucial for subsequent feature edge detection. Then, based on the extracted tool topology information, perform feature edge detection on the tool mesh model data. Feature edges usually refer to the edges where the geometric shape of the tool model changes significantly. For example, the connection between the ball head and the tool shank of a ball end mill, the edge of the spiral groove of a twist drill, etc. There are many algorithms for detecting feature edges. For example, an algorithm based on curvature change can identify the edges with larger curvature as feature edges. After obtaining the set of tool feature edges, further perform feature point extraction on these feature edges. Feature points are usually the endpoints or intersection points of feature edges. For example, the center of the ball of a ball end mill does not exist explicitly in the CAD model, but can be calculated through the intersection points of the edge lines of the ball part. Another example is that the vertex and bottom point of a twist drill can also be determined through the endpoints of the feature edge lines. These sets of feature points contain the key geometric information of the tool. Finally, based on the extracted set of tool feature points, perform geometric parameter calculation on the tool mesh model data to obtain tool geometric feature data. For example, the ball radius, tool shank diameter, overall tool length, etc. of a ball end mill can be calculated; for a twist drill, the helix angle, diameter, length, cutting edge length, etc. can be calculated. These geometric parameters constitute the tool geometric feature data, which are the key parameters for describing the shape and size of the tool. For example, the geometric feature data of a ball end mill may include: the ball radius is 5 mm, the tool shank diameter is 10 mm, the overall tool length is 75 mm, etc. The geometric feature data of a twist drill may include: the diameter is 8 mm, the helix angle is 30 degrees, the cutting edge length is 10 mm, the overall length is 100 mm, etc. These data will be used for subsequent tool type recognition to select appropriate PLCopen motion control instructions. All in all, through these three sub-steps, we convert the ideal tool 3D CAD model into tool geometric feature data containing key geometric information, laying a foundation for the subsequent automated grinding process.

[0034] In a specific embodiment, the tool type identification based on the tool geometric feature data to obtain a tool type identifier includes: Construct a feature vector from the tool geometric feature data to obtain a tool feature vector, and perform principal component analysis dimensionality reduction on the tool feature vector to obtain a dimensionality-reduced tool feature vector; Calculate the similarity of a preset tool type feature library based on the dimensionality-reduced tool feature vector to obtain tool type similarity data, and sort the tool type similarity data to obtain sorted tool type similarity data; Determine the tool type based on the sorted tool type similarity data to obtain a tool type identifier; wherein, the tool type identifier includes a milling cutter, a drill bit, and a reamer.

[0035] Specifically, for the step of identifying the tool type based on the tool geometric feature data to obtain the tool type identifier, the core objective of this step is to determine the type of the tool to be ground according to the extracted tool geometric feature data, such as whether it is a milling cutter, a drill bit or a reamer, so as to select appropriate grinding strategies and PLCopen motion control instructions subsequently. This step mainly includes three sub-steps: feature vector construction and dimensionality reduction, similarity calculation and sorting, and tool type determination. First, construct a feature vector for the tool geometric feature data to obtain a tool feature vector. The tool geometric feature data contains multiple parameters, such as diameter, length, helix angle, ball nose radius, etc. For the convenience of subsequent calculations, these parameters need to be combined into a vector, that is, the tool feature vector. For example, the feature vector of a ball nose milling cutter can be expressed as [diameter, length, ball nose radius], and the feature vector of a twist drill can be expressed as [diameter, length, helix angle]. Since the characteristic parameters of different types of tools may be different, for unified processing, all possible characteristic parameters can be included in the feature vector, and the missing parameter values are set to 0 or other specific values. After constructing the feature vector, in order to reduce the computational complexity and avoid the curse of dimensionality, principal component analysis (PCA) dimensionality reduction needs to be performed on the tool feature vector to obtain the dimensionality-reduced tool feature vector. The PCA algorithm can project high-dimensional data into a low-dimensional space while retaining the main information of the data. Then, calculate the similarity based on the dimensionality-reduced tool feature vector with a preset tool type feature library. The tool type feature library stores the feature vectors of various known tool types, such as various types of milling cutters, drill bits, reamers, etc. The purpose of similarity calculation is to measure the similarity degree between the tool to be identified and various known tool types. Commonly used similarity calculation methods include cosine similarity, Euclidean distance, etc. The calculation result obtains tool type similarity data. For example, the similarity between the tool to be identified and a milling cutter is 0.9, the similarity with a drill bit is 0.2, and the similarity with a reamer is 0.1. After obtaining the tool type similarity data, these data need to be sorted to obtain the sorted tool type similarity data. The purpose of sorting is to find the tool type with the highest similarity to the tool to be identified. For example, sorting by similarity from high to low, the result is milling cutter > drill bit > reamer. Finally, based on the sorted tool type similarity data, perform tool type determination to obtain the tool type identifier. Usually, select the tool type with the highest similarity as the type of the tool to be identified. For example, in the previous example, since the similarity between the tool to be identified and the milling cutter is the highest, it is determined as a milling cutter, and the tool type identifier is "milling cutter". In this way, we obtain the tool type identifier, such as "milling cutter", "drill bit" or "reamer". This identifier will be used in the subsequent instruction matching step to select appropriate PLCopen motion control instructions for grinding processing.For example, if the tool type is identified as "ball nose end mill", instructions applicable to the grinding of the ball nose end mill will be searched in the PLCopen motion control instruction library. For example, MC_MoveCircular is used for grinding the ball nose, and MC_MoveLinear is used to control the feed and retraction of the tool, etc.

[0036] In a specific embodiment, instruction matching is performed in a preset PLCopen motion control instruction library based on the tool type identifier to obtain a candidate instruction set, including: Perform instruction bytecode parsing on the tool type identifier to obtain a set of instruction primitives, and construct a syntax tree for the set of instruction primitives to obtain a PLCopen instruction syntax tree, where the PLCopen instruction syntax tree includes an instruction opcode segment, an operand segment, a status field, and a checksum segment; Perform state machine encoding based on the PLCopen instruction syntax tree to obtain a state transition table, and perform instruction stream parsing on the state transition table to obtain an instruction pipeline descriptor, where the instruction pipeline descriptor includes an instruction fetch stage code, a decoding stage code, an execution stage code, and a write-back stage code; Generate binary instructions for the instruction pipeline descriptor through an instruction compiler to obtain a candidate instruction set; where the candidate instruction set includes an axis group enable instruction code, a motion control instruction code, a synchronization trigger instruction code, and a status query instruction code.

[0037] Specifically, the instruction matching is performed in the preset PLCopen motion control instruction library based on the tool type identifier to obtain a candidate instruction set. The goal of this step is to select appropriate instructions from the preset PLCopen motion control instruction library according to the identified tool type and form a candidate instruction set for subsequent simulation and optimization. This process is not simply a matter of searching and copying, but rather requires parsing, encoding, and compiling the instructions, and finally generating binary instructions that can be executed by the machine tool control system. This step mainly includes three sub-steps: instruction bytecode parsing and syntax tree construction, state machine encoding and instruction stream parsing, and binary instruction generation. First, the instruction bytecode of the tool type identifier is parsed to obtain a set of instruction primitives. For example, if the tool type identifier is "milling cutter", the instructions related to the milling cutter will be searched in the instruction library, and the bytecodes of these instructions will be parsed into a set of instruction primitives. Instruction primitives are the basic units that make up an instruction. For example, the primitives of the MC_MoveLinear instruction may include the target position to move, the moving speed, the acceleration, etc. Then, a PLCopen instruction syntax tree is constructed from the set of instruction primitives. The syntax tree is a tree structure used to represent the syntax rules of an instruction. The PLCopen instruction syntax tree includes an instruction opcode segment, an operand segment, a status field, and a checksum segment. For example, the syntax tree of the MC_MoveLinear instruction may contain the opcode MC_MoveLinear, the operands being the target position coordinates (x, y, z), the speed and acceleration, the status field indicating the execution status of the instruction, and the checksum used to ensure the integrity of the instruction. Next, state machine encoding is performed based on the PLCopen instruction syntax tree to obtain a state transition table. A state machine is a model used to describe the behavior of a system, which consists of a series of states and the transitions between them. For example, the execution process of the MC_MoveLinear instruction can be divided into multiple states: start, acceleration, uniform motion, deceleration, stop. The state transition table describes the transition conditions and transition actions between different states. Then, the instruction stream is parsed from the state transition table to obtain an instruction pipeline descriptor. The instruction pipeline descriptor describes the execution process of an instruction in the CPU, which usually includes an instruction fetch stage code, a decoding stage code, an execution stage code, and a write-back stage code. For example, the instruction pipeline descriptor of the MC_MoveLinear instruction may include: in the instruction fetch stage, the instruction is read from memory, in the decoding stage, the opcode and operands of the instruction are parsed, in the execution stage, the target position and the motion trajectory are calculated, and in the write-back stage, the result is written into the output register. Finally, binary instructions are generated from the instruction pipeline descriptor through an instruction compiler to obtain a candidate instruction set. The candidate instruction set consists of a series of binary codes that can be directly executed by the control system of the machine tool. The candidate instruction set includes axis group enable instruction codes, motion control instruction codes, synchronization trigger instruction codes, and status query instruction codes.For example, for the grinding of a ball-end mill, the candidate instruction set may include: axis group enable instruction codes for starting each axis of the machine tool, MC_MoveCircular motion control instruction codes for grinding the ball-end part, MC_MoveLinear motion control instruction codes for controlling the feed and retraction of the tool, synchronous trigger instruction codes for coordinating the motion of each axis, and status query instruction codes for monitoring the status of the machine tool. Another example, for the grinding of a twist drill, the candidate instruction set may include: axis group enable instruction codes, MC_Drilling motion control instruction codes for grinding the spiral groove, MC_MoveLinear motion control instruction codes for controlling the feed and retraction of the tool, synchronous trigger instruction codes, and status query instruction codes. Through the above three sub-steps, we finally obtain the candidate instruction set, and these instructions will be used to control the machine tool to grind the tool.

[0038] In a specific embodiment, kinematic simulation is performed on the to-be-ground tool by the preset machine tool based on the candidate instruction set, and the simulated motion trajectory data is obtained, including: Instruction parsing is performed on the candidate instruction set to obtain a kinematic parameter set, and kinematic modeling is performed on the preset machine tool based on the kinematic parameter set to obtain a machine tool kinematic model; wherein, the machine tool kinematic model includes joint degrees of freedom, link parameters, and workspace information; Tool path planning is performed on the to-be-ground tool based on the machine tool kinematic model to obtain tool theoretical path data, and interpolation calculation is performed on the tool theoretical path data to obtain tool interpolation trajectory data; Coordinate transformation is performed on the tool interpolation trajectory data through forward kinematics to obtain tool spatial pose data, and motion decomposition is performed on each axis of the machine tool based on the tool spatial pose data to obtain an axis motion instruction sequence; Inverse kinematics is performed on the machine tool based on the axis motion instruction sequence to obtain a machine tool joint angle sequence, and dynamic analysis is performed on the machine tool joint angle sequence to obtain joint torque data; Trajectory evaluation is performed on the joint torque data through multi-body dynamics simulation to obtain simulated motion trajectory data; wherein, the simulated motion trajectory data includes axis position information, axis velocity information, and trajectory tracking information.

[0039] Specifically, the candidate instruction set is used to control a preset machine tool to perform kinematic simulation on the tool to be ground, and the simulated motion trajectory data is obtained. The goal of this step is to simulate the motion of the machine tool in a virtual environment, verify the feasibility of the candidate instruction set, and generate the simulated motion trajectory data for subsequent collision detection and instruction optimization. This step mainly includes five sub-steps: instruction parsing and kinematic modeling, tool path planning and interpolation calculation, coordinate transformation and motion decomposition, kinematic inverse solution and dynamic analysis, and multi-body dynamic simulation and trajectory evaluation. First, the candidate instruction set is parsed to obtain the kinematic parameter set. For example, parameters such as the target position, speed, and acceleration are parsed from the MC_MoveLinear instruction, and parameters such as the center coordinates, radius, and rotation angle are parsed from the MC_MoveCircular instruction. Then, based on the kinematic parameter set, a kinematic model of the preset machine tool is established to obtain the machine tool kinematic model. The machine tool kinematic model describes the geometric structure and motion characteristics of the machine tool, including joint degrees of freedom, link parameters, and workspace information. For example, the kinematic model of a five-axis linkage machine tool includes the degrees of freedom of five joints, the length and angle of each link, and the set of all spatial positions that the machine tool can reach. Next, based on the machine tool kinematic model, tool path planning is performed on the tool to be ground to obtain the tool theoretical path data. Tool path planning refers to planning the motion trajectory of the tool on the workpiece according to the geometric shape of the tool and the grinding requirements. For example, for the grinding of a ball-end mill, the motion trajectory of the grinding wheel relative to the tool needs to be planned to grind out the ball-end shape; for the grinding of a twist drill, the motion trajectory of the grinding wheel relative to the tool needs to be planned to grind out the spiral groove. After obtaining the tool theoretical path data, interpolation calculation needs to be performed on these data to obtain the tool interpolation trajectory data. The purpose of interpolation calculation is to convert discrete path points into a continuous motion trajectory so that the machine tool can move smoothly. Then, coordinate transformation is performed on the tool interpolation trajectory data through forward kinematics to obtain the tool spatial pose data. Forward kinematics refers to calculating the position and orientation of the tool in space based on the joint angles of the machine tool. The tool spatial pose data describes the position and orientation of the tool at each moment, including position coordinates and rotation angles. Based on the tool spatial pose data, motion decomposition is performed on each axis of the machine tool to obtain the axis motion instruction sequence. Motion decomposition refers to decomposing the motion of the tool into the motion of each axis of the machine tool. For example, a five-axis linkage machine tool needs to control the rotation angles of five axes to achieve the motion of the tool in space. After that, based on the axis motion instruction sequence, inverse kinematics is performed on the machine tool to obtain the machine tool joint angle sequence. Inverse kinematics refers to calculating the angles of each joint of the machine tool based on the position and orientation of the tool in space. Dynamic analysis is performed on the machine tool joint angle sequence to obtain the joint torque data. Dynamic analysis refers to calculating the torques required for each joint of the machine tool to drive the machine tool to move along a predetermined trajectory.Finally, trajectory evaluation is performed on the joint torque data through multibody dynamics simulation to obtain simulation motion trajectory data. Multibody dynamics simulation is to simulate the motion of the machine tool in the computer and calculate the forces and motion states of each component of the machine tool. The simulation motion trajectory data includes axis position information, axis velocity information, and trajectory tracking information. For example, the position, velocity, and acceleration of each axis at each moment can be obtained, as well as the deviation between the actual motion trajectory of the tool and the theoretical trajectory. By analyzing the simulation motion trajectory data, the performance of the candidate instruction set can be evaluated, such as whether the expected grinding effect can be achieved and whether there are problems such as collisions or interferences. For example, when simulating the grinding of a ball-end milling cutter, it can be checked whether the grinding wheel can move along the predetermined trajectory to grind an ideal ball-end shape; when simulating the grinding of a twist drill, it can be checked whether the grinding wheel can move along the spiral groove to grind an ideal spiral groove shape.

[0040] In a specific embodiment, the parameter optimization of the candidate instruction set based on the collision detection result to obtain an optimized PLCopen motion control instruction includes: Performing spatial analysis on the collision detection result to obtain collision risk area data, and performing safety distance evaluation on the candidate instruction set based on the collision risk area data to obtain an instruction safety factor matrix; wherein, the instruction safety factor matrix includes the execution risk value and safety margin value of each instruction; Performing structural reconstruction on the instruction safety factor matrix through a topology optimization method to obtain an optimized instruction topology structure, and performing instruction sequence rearrangement on the candidate instruction set based on the optimized instruction topology structure to obtain a rearranged instruction sequence; Performing parameter sensitivity analysis on the rearranged instruction sequence to obtain instruction parameter sensitivity data, and performing adaptive parameter adjustment on the rearranged instruction sequence based on the instruction parameter sensitivity data to obtain a parameter-optimized instruction set; Performing a global search on the parameter-optimized instruction set through a multi-objective optimization algorithm to obtain a Pareto initial solution set, and performing instruction performance evaluation based on the Pareto initial solution set to obtain instruction performance data; wherein, the instruction performance data includes machining accuracy, motion smoothness, and energy consumption efficiency information; Performing decision analysis on the Pareto initial solution set based on the instruction performance data to obtain a PLCopen instruction configuration scheme, and performing instruction encoding on the PLCopen instruction configuration scheme to obtain an optimized PLCopen motion control instruction; wherein, the optimized PLCopen motion control instruction includes an optimized axis group enable instruction, motion control instruction, synchronous trigger instruction, and status query instruction.

[0041] Specifically, based on the collision detection results, parameter optimization is performed on the candidate instruction set to obtain optimized PLCopen motion control instructions. The goal of this step is to optimize the candidate instruction set according to the simulation results, improve the grinding efficiency and safety, and finally generate optimized PLCopen motion control instructions. The core of this step lies in adjusting the instruction parameters and order according to the collision detection results, and finding the best instruction configuration scheme through a multi-objective optimization algorithm. This step mainly includes five sub-steps: spatial analysis and safety distance evaluation, topology optimization and instruction sequence rearrangement, parameter sensitivity analysis and adaptive parameter adjustment, multi-objective optimization and instruction performance evaluation, and decision analysis and instruction encoding. First, spatial analysis is performed on the collision detection results to obtain collision risk area data. The collision detection results will indicate which areas have collision risks and the severity of the collisions. Spatial analysis further analyzes the spatial distribution and geometric characteristics of these collision risk areas. Then, based on the collision risk area data, safety distance evaluation is performed on the candidate instruction set to obtain an instruction safety factor matrix. The instruction safety factor matrix contains the execution risk value and safety margin value of each instruction. For example, if an instruction causes the tool to enter a collision risk area, the execution risk value of this instruction will be higher and the safety margin value will be lower. Next, the instruction safety factor matrix is structurally reconstructed through a topology optimization method to obtain an optimized instruction topology structure. Topology optimization is a method of improving the structural performance by changing the topology of the structure. In this step, topology optimization is used to adjust the relationship between instructions to reduce the collision risk. Then, based on the optimized instruction topology structure, the candidate instruction set is rearranged to obtain a rearranged instruction sequence. For example, high-risk instructions can be adjusted to be executed after low-risk instructions, or some instructions can be merged or split to avoid collisions. Parameter sensitivity analysis is performed on the rearranged instruction sequence to obtain instruction parameter sensitivity data. Parameter sensitivity analysis is used to evaluate the influence degree of instruction parameters on the grinding results. For example, the speed parameter of the MC_MoveLinear instruction has a greater impact on the grinding efficiency, while the acceleration parameter has a greater impact on the grinding smoothness. Then, based on the instruction parameter sensitivity data, adaptive parameter adjustment is performed on the rearranged instruction sequence to obtain a parameter-optimized instruction set. For example, the speed and acceleration parameters of the MC_MoveLinear instruction can be adjusted according to the sensitivity data to improve the grinding efficiency and smoothness. After that, a global search is performed on the parameter-optimized instruction set through a multi-objective optimization algorithm to obtain a Pareto initial solution set. The multi-objective optimization algorithm is used to optimize multiple objectives simultaneously, such as machining accuracy, motion smoothness, and energy consumption efficiency. The Pareto initial solution set is a set of feasible instruction configuration schemes that achieve a balance among different objectives. Then, instruction performance evaluation is performed based on the Pareto initial solution set to obtain instruction performance data.The instruction performance data includes machining accuracy, motion smoothness, and energy consumption efficiency information. For example, the machining accuracy can be evaluated by simulating and calculating the deviation between the final shape and the ideal shape of the tool, the motion smoothness can be evaluated by analyzing the motion trajectory of the tool, and the energy consumption efficiency can be evaluated by calculating the power consumption of the motor. Finally, based on the instruction performance data, decision-making analysis is performed on the initial Pareto solution set to obtain a PLCopen instruction configuration scheme. Decision-making analysis is used to select the best instruction configuration scheme from the initial Pareto solution set. For example, a scheme that weighs different objectives can be selected according to actual requirements. Instruction encoding is performed on the PLCopen instruction configuration scheme to obtain an optimized PLCopen motion control instruction. The optimized PLCopen motion control instruction includes an optimized axis group enable instruction, motion control instruction, synchronous trigger instruction, and status query instruction. For example, for the grinding of a ball-end mill, the parameters of the MC_MoveCircular instruction can be optimized to improve the grinding accuracy and efficiency; for the grinding of a twist drill, the parameters of the MC_Drilling instruction can be optimized to improve the grinding quality and speed. These optimized instructions will be used to control the machine tool for actual grinding operations.

[0042] In a specific embodiment, the decision-making analysis on the initial Pareto solution set based on the instruction performance data to obtain a PLCopen instruction configuration scheme includes: Performing multi-criteria hierarchical decomposition on the instruction performance data to obtain an instruction evaluation vector system, and performing fuzzy hierarchical weight assignment on the instruction evaluation vector system to obtain an index weight vector, where the index weight vector includes machining accuracy weight, trajectory smoothness weight, energy consumption efficiency weight, and machining time weight; Performing vector projection transformation on the initial Pareto solution set based on the index weight vector to obtain an instruction scheme scoring matrix, and constructing a dominance relationship graph for the instruction scheme scoring matrix to obtain a scheme dominance topological network, where the scheme dominance topological network includes node dominance degree, path dominance degree, local clustering coefficient, and global centrality; Performing eigenvalue decomposition on the scheme dominance topological network by means of spectral analysis to obtain a network eigen-spectrum, and performing scheme ranking calculation based on the network eigen-spectrum to obtain a scheme ranking sequence, where the scheme ranking sequence includes a main ranking value, a secondary ranking value, a ranking stability index, and a ranking reliability index; Performing decision threshold screening on the initial Pareto solution set based on the scheme ranking sequence to obtain an optimal PLCopen instruction configuration scheme; where the optimal PLCopen instruction configuration scheme includes optimal axis group configuration parameters, optimal motion sequence parameters, optimal synchronous trigger parameters, and optimal status feedback parameters.

[0043] Specifically, based on the instruction performance data, decision analysis is performed on the initial Pareto solution set to obtain a PLCopen instruction configuration plan. The goal of this step is to select the best PLCopen instruction configuration plan from the initial Pareto solution set for final tool grinding. This selection process is not simply a comparison of magnitudes, but rather requires multi-dimensional analysis and evaluation of the instruction performance data and decision-making in combination with actual requirements. This step mainly includes four sub-steps: multi-criteria hierarchical decomposition and fuzzy hierarchical weight assignment, vector projection transformation and construction of a dominance relationship graph, spectral analysis and calculation of plan ranking, and decision threshold screening. First, multi-criteria hierarchical decomposition is performed on the instruction performance data to obtain an instruction evaluation vector system. The instruction performance data includes multiple indicators, such as machining accuracy, trajectory smoothness, energy consumption efficiency, and machining time. Multi-criteria hierarchical decomposition organizes these indicators into a hierarchical structure for weight assignment and evaluation. Then, fuzzy hierarchical weight assignment is performed on the instruction evaluation vector system to obtain an index weight vector. The index weight vector contains the weights of each index, reflecting the importance of different indexes. For example, if higher machining accuracy is required, the weight of machining accuracy will be higher; if energy consumption is desired to be reduced, the weight of energy consumption efficiency will be higher. Among them, the index weight vector includes the weight of machining accuracy, the weight of trajectory smoothness, the weight of energy consumption efficiency, and the weight of machining time. Next, based on the index weight vector, vector projection transformation is performed on the initial Pareto solution set to obtain an instruction plan scoring matrix. Vector projection transformation projects the performance data of each instruction configuration plan onto the index weight vector to obtain a comprehensive score. The instruction plan scoring matrix contains the comprehensive scores of all instruction configuration plans. Then, a dominance relationship graph is constructed for the instruction plan scoring matrix to obtain a plan dominance topological network. The plan dominance topological network describes the dominance relationship between different instruction configuration plans. For example, if the comprehensive score of plan A is higher than that of plan B, then plan A has an advantage over plan B. The plan dominance topological network includes node dominance degree, path dominance degree, local clustering coefficient, and global centrality. These indicators are used to describe the topological structure of the network and the relationship between nodes. After that, eigenvalue decomposition is performed on the plan dominance topological network through spectral analysis to obtain a network eigen-spectrum. Spectral analysis is a method for analyzing network structure, which reveals the topological characteristics of the network by calculating the eigenvalues and eigenvectors of the network. Then, based on the network eigen-spectrum, plan ranking calculation is performed to obtain a plan ranking sequence. The plan ranking sequence ranks the instruction configuration plans according to the network eigen-spectrum, reflecting the comprehensive performance of different plans. Among them, the plan ranking sequence includes a primary ranking value, a secondary ranking value, a ranking stability index, and a ranking reliability index. These indicators are used to evaluate the reliability and stability of the ranking result. Finally, based on the plan ranking sequence, decision threshold screening is performed on the initial Pareto solution set to obtain the optimal PLCopen instruction configuration plan.The decision threshold screening selects the best instruction configuration scheme according to the scheme sorting sequence and a preset threshold. For example, the scheme ranked first can be selected, or the scheme that meets specific conditions can be selected. The optimal PLCopen instruction configuration scheme includes optimal axis group configuration parameters, optimal motion sequence parameters, optimal synchronization trigger parameters, and optimal status feedback parameters. For example, for the grinding of a ball-end mill, the optimal PLCopen instruction configuration scheme may include: optimal parameters of the MC_MoveCircular instruction, such as the center coordinates, radius, rotation angle, feed rate, etc.; for the grinding of a twist drill, the optimal PLCopen instruction configuration scheme may include: optimal parameters of the MC_Drilling instruction, such as the drilling depth, feed rate, rotational speed, etc. These optimal parameters will be used to generate the final PLCopen motion control instructions to control the machine tool for tool grinding.

[0044] The above describes the open numerical control management method based on the PLCopen motion control standard in the embodiments of the present invention. Next, the open numerical control management platform based on the PLCopen motion control standard in the embodiments of the present invention will be described. Please refer to Figure 2 , an embodiment of the open numerical control management platform based on the PLCopen motion control standard in the embodiments of the present invention includes: An extraction module 21, configured to extract geometric features of an ideal tool three-dimensional CAD model to obtain tool geometric feature data; An identification module 22, configured to perform tool type identification based on the tool geometric feature data to obtain a tool type identifier; A matching module 23, configured to perform instruction matching in a preset PLCopen motion control instruction library based on the tool type identifier to obtain a candidate instruction set; A simulation module 24, configured to control a preset machine tool to perform kinematic simulation on a tool to be ground based on the candidate instruction set to obtain simulation motion trajectory data; An optimization module 25, configured to perform collision detection on the simulation motion trajectory data to obtain a collision detection result. When the collision detection result shows that there is insufficient safety distance, the candidate instruction set is parameter-optimized based on the collision detection result to obtain optimized PLCopen motion control instructions; A grinding module 26, configured to control the machine tool to grind the tool to be ground based on the optimized PLCopen motion control instructions to obtain a target tool corresponding to the ideal tool three-dimensional CAD model.

[0045] In this embodiment, for the specific implementation of each unit in the above platform embodiment, please refer to that described in the above method embodiment, and details will not be repeated here.

[0046] Refer to Figure 3, an embodiment of the present invention further provides a computer device, and its internal structure can be as Figure 3 shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface, and a database connected through a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0047] Those skilled in the art can understand that Figure 3 the structure shown in

[0048] is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0049] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium provided by the present invention and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.

[0050] It should be noted that, in this document, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article or method comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, apparatus, article or method. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, apparatus, article or method comprising such element.

[0051] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structural or equivalent process transformations made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, are similarly included in the patent protection scope of the present invention.

Claims

1. An open CNC management method based on the PLCopen motion control standard, characterized in that: The following steps are involved: Extract geometric features from the ideal tool 3D CAD model to obtain tool geometric feature data; Performing tool type identification based on the tool geometric feature data to obtain a tool type identifier; Based on the tool type identifier, command matching is performed in a preset PLCopen motion control command library to obtain a candidate command set; Based on the candidate instruction set, a preset machine tool is controlled to perform kinematic simulation on the tool to be ground to obtain simulated motion trajectory data; Performing collision detection on the simulated motion trajectory data to obtain a collision detection result, and when the collision detection result shows that the safety distance is insufficient, performing parameter optimization on the candidate instruction set based on the collision detection result to obtain an optimized PLCopen motion control instruction; Based on the optimized PLCopen motion control instruction, a machine tool is controlled to grind the tool to be ground, so as to obtain a target tool corresponding to the ideal tool three-dimensional CAD model.

2. The open CNC management method based on the PLCopen motion control standard according to claim 1, characterized in that: The geometric feature extraction of the ideal tool 3D CAD model to obtain tool geometric feature data includes: Meshing the ideal tool three-dimensional CAD model to obtain tool mesh model data, and extracting topological information from the tool mesh model data to obtain tool topological information, wherein the tool topological information includes connection relationships of various nodes in the tool mesh model and adjacency relationship information of various faces; Performing feature edge detection on the tool mesh model data based on the tool topology information to obtain a tool feature edge set, and performing feature point extraction on the tool feature edge set to obtain a tool feature point set; The geometric parameters of the tool mesh model data are calculated based on the tool feature point set to obtain tool geometric feature data.

3. The open CNC management method based on the PLCopen motion control standard according to claim 1 is characterized in that: The step of performing tool type identification based on the tool geometric feature data to obtain a tool type identifier includes: Constructing a feature vector for the tool geometric feature data to obtain a tool feature vector, and performing principal component analysis on the tool feature vector to reduce the dimension to obtain a tool feature vector after the dimension reduction; Based on the tool feature vector after dimension reduction, similarity calculation is performed on a preset tool type feature library to obtain tool type similarity data, and the tool type similarity data is sorted to obtain sorted tool type similarity data; The tool type is determined based on the sorted tool type similarity data to obtain a tool type identifier; wherein the tool type identifier includes a milling cutter, a drill bit, and a reamer.

4. The open CNC management method based on the PLCopen motion control standard according to claim 1, characterized in that: The instruction matching is performed in a preset PLCopen motion control instruction library based on the tool type identification to obtain a candidate instruction set, including: Parsing the instruction bytecode of the tool type identifier to obtain an instruction primitive set, and constructing a syntax tree for the instruction primitive set to obtain a PLCopen instruction syntax tree, wherein the PLCopen instruction syntax tree includes an instruction operation code segment, an operand segment, a status field, and a check code segment; Based on the PLCopen instruction syntax tree, a state machine is encoded to obtain a state transition table, and the state transition table is subjected to instruction stream parsing to obtain an instruction pipeline descriptor, wherein the instruction pipeline descriptor includes an instruction fetch stage code, a decoding stage code, an execution stage code, and a write-back stage code; The instruction pipeline descriptor is subjected to binary instruction generation by an instruction compiler to obtain a candidate instruction set; wherein the candidate instruction set includes an axis group enabling instruction code, a motion control instruction code, a synchronous triggering instruction code and a status query instruction code.

5. The open CNC management method based on the PLCopen motion control standard according to claim 1, characterized in that: The control of the preset machine tool based on the candidate instruction set to perform kinematic simulation on the grinding tool to obtain simulation motion trajectory data includes: Performing instruction parsing on the candidate instruction set to obtain a kinematic parameter set, and performing kinematic modeling on a preset machine tool based on the kinematic parameter set to obtain a machine tool kinematic model; wherein the machine tool kinematic model includes joint degrees of freedom, connecting rod parameters and workspace information; Performing tool path planning for the tool to be ground based on the machine tool kinematic model to obtain tool theoretical path data, and performing interpolation calculation on the tool theoretical path data to obtain tool interpolation trajectory data; The tool interpolation trajectory data is coordinate-converted by kinematics forward solution to obtain tool space posture data, and the motion of each axis of the machine tool is decomposed based on the tool space posture data to obtain an axis motion instruction sequence; Performing kinematic inverse analysis on the machine tool based on the axis motion instruction sequence to obtain a machine tool joint angle sequence, and performing dynamic analysis on the machine tool joint angle sequence to obtain joint torque data; The joint torque data is subjected to trajectory evaluation through multi-body dynamics simulation to obtain simulated motion trajectory data; wherein the simulated motion trajectory data includes axis position information, axis speed information and trajectory tracking information.

6. The open CNC management method based on the PLCopen motion control standard according to claim 1, characterized in that: The step of performing parameter optimization on the candidate instruction set based on the collision detection result to obtain an optimized PLCopen motion control instruction comprises: Performing spatial analysis on the collision detection results to obtain collision risk area data, and performing safety distance evaluation on the candidate instruction set based on the collision risk area data to obtain an instruction safety factor matrix; wherein the instruction safety factor matrix includes an execution risk value and a safety margin value of each instruction; Reconstructing the structure of the instruction safety factor matrix by a topology optimization method to obtain an optimized instruction topology structure, and rearranging the instruction sequence of the candidate instruction set based on the optimized instruction topology structure to obtain a rearranged instruction sequence; Performing parameter sensitivity analysis on the rearranged instruction sequence to obtain instruction parameter sensitivity data, and performing adaptive parameter adjustment on the rearranged instruction sequence based on the instruction parameter sensitivity data to obtain a parameter optimized instruction set; Performing a global search on the parameter optimization instruction set through a multi-objective optimization algorithm to obtain a Pareto initial solution set, and performing instruction performance evaluation based on the Pareto initial solution set to obtain instruction performance data; wherein the instruction performance data includes processing accuracy, motion stability and energy efficiency information; Based on the instruction performance data, a decision analysis is performed on the Pareto initial solution set to obtain a PLCopen instruction configuration scheme, and the PLCopen instruction configuration scheme is instruction encoded to obtain optimized PLCopen motion control instructions; wherein the optimized PLCopen motion control instructions include optimized axis group enable instructions, motion control instructions, synchronous trigger instructions and status query instructions.

7. The open CNC management method based on the PLCopen motion control standard according to claim 6 is characterized in that: The performing decision analysis on the Pareto initial solution set based on the instruction performance data to obtain a PLCopen instruction configuration scheme includes: Performing multi-criteria hierarchical decomposition on the instruction performance data to obtain an instruction evaluation vector system, and performing fuzzy hierarchical weight allocation on the instruction evaluation vector system to obtain an indicator weight vector, wherein the indicator weight vector includes a processing accuracy weight, a trajectory smoothness weight, an energy efficiency weight, and a processing time weight; Performing vector projection transformation on the Pareto initial solution set based on the indicator weight vector to obtain an instruction scheme scoring matrix, and constructing an advantage relationship graph on the instruction scheme scoring matrix to obtain a scheme advantage topology network, wherein the scheme advantage topology network includes node advantage, path advantage, local clustering coefficient and global centrality; Performing eigenvalue decomposition on the advantageous topological network of the scheme by a spectrum analysis method to obtain a network characteristic spectrum, and performing scheme ranking calculation based on the network characteristic spectrum to obtain a scheme ranking sequence, wherein the scheme ranking sequence includes a primary ranking value, a secondary ranking value, a ranking stability index, and a ranking reliability index; The Pareto initial solution set is screened by decision threshold based on the scheme sorting sequence to obtain an optimal PLCopen instruction configuration scheme; wherein the optimal PLCopen instruction configuration scheme includes optimal axis group configuration parameters, optimal motion sequence parameters, optimal synchronization trigger parameters and optimal state feedback parameters.

8. An open CNC management platform based on the PLCopen motion control standard, characterized in that: include: An extraction module is used to extract geometric features from an ideal tool 3D CAD model to obtain tool geometric feature data; An identification module, used for identifying the type of tool based on the tool geometric feature data to obtain a tool type identifier; A matching module, used for performing instruction matching in a preset PLCopen motion control instruction library based on the tool type identifier to obtain a candidate instruction set; A simulation module, used for controlling a preset machine tool to perform kinematic simulation on a grinding tool based on the candidate instruction set to obtain simulation motion trajectory data; an optimization module, configured to perform collision detection on the simulated motion trajectory data to obtain a collision detection result, and when the collision detection result shows that the safety distance is insufficient, perform parameter optimization on the candidate instruction set based on the collision detection result to obtain an optimized PLCopen motion control instruction; The grinding module is used to control the machine tool to grind the tool to be ground based on the optimized PLCopen motion control instruction to obtain a target tool corresponding to the ideal tool three-dimensional CAD model.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.