Method and System for Generating Machining Codes Based on Spreadsheets
Through the spreadsheet-based machining code generation method, the problem of machining information cannot be calibrated in the machine tool is solved, the accuracy and work efficiency of the machining code are improved, and the processing quality is ensured through virtual processing and abnormal node optimization.
Patent Information
- Application Number
- CN202510345236.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The prior art cannot effectively calibrate the processing information of the workpiece to be processed in machine tools, which affects the accuracy of the machining code.
The machining code generation method based on the spreadsheet is adopted, and the machining filling area, parameter selection column and processing information module are determined, and the corresponding machining code is generated.
The accuracy of the machining code is achieved, the working efficiency of machining is improved, and the machining quality is further guaranteed through virtual processing and abnormal node optimization.
Smart Images

Figure CN119862866B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machining codes, and particularly to a method and system for generating machining codes based on a spreadsheet. Background Art
[0002] With the development of technology, the workpiece to be machined is autonomously machined in a machine tool, and the machining code is input into the machine tool. The machine tool performs targeted machining on the workpiece to be machined under the execution of the machining code. Optionally, the machining code is generally formed in the machine tool and utilizes the data center of the machine tool. However, the machining information of the workpiece to be machined cannot be calibrated in the machine tool, which affects the accuracy of the machining code. Summary of the Invention
[0003] The purpose of the present invention is to overcome the deficiencies of the prior art, and the present invention provides a method and system for generating machining codes based on a spreadsheet.
[0004] An embodiment of the present invention provides a method for generating a machining code based on a spreadsheet, including:
[0005] Determining a machining filling area based on a spreadsheet, a machining module, and user information;
[0006] Determining a plurality of parameter selection columns according to the machining filling area and the types of machining parameters;
[0007] Determining coherent machining information based on the machining parameters selected in each parameter selection column, the information of the workpiece to be machined, and the information of the machine tool, and autonomously calibrating the machining information;
[0008] Generating a corresponding machining code according to the autonomously calibrated machining information and a machining program model, and presenting the machining code in a machining output column in the spreadsheet;
[0009] Determining the virtual machining of the workpiece to be machined based on the machining code, the three-dimensional model of the workpiece to be machined, and the virtual scene of the machine tool;
[0010] Determining the machining abnormal nodes of the workpiece to be machined according to the real-time detection of the virtual machining of the workpiece to be machined, and outputting an optimized machining code based on the local optimization of the machining abnormal nodes.
[0011] An embodiment of the present invention provides a system for generating a machining code based on a spreadsheet. The system for generating a machining code based on a spreadsheet is applied to the method for generating a machining code based on a spreadsheet described above. The system for generating a machining code based on a spreadsheet includes:
[0012] The machining filling area module is used to determine the machining filling area based on a spreadsheet, a machining module, and user information;
[0013] The parameter selection bar module is used to determine multiple parameter selection bars according to the machining filling area and the types of machining parameters;
[0014] The machining information module is used to determine coherent machining information based on the machining parameters selected in each parameter selection bar, the information of the workpiece to be machined, and the information of the machine tool, and perform autonomous calibration on the machining information;
[0015] The machining code module is used to generate corresponding machining codes according to the autonomously calibrated machining information and the machining program model, and the machining codes are presented in the machining output column of the spreadsheet;
[0016] The virtual machining module is used to determine the virtual machining of the workpiece to be machined based on the machining code, the three-dimensional model of the workpiece to be machined, and the virtual scene of the machine tool;
[0017] The optimization module is used to determine the machining abnormal nodes of the workpiece to be machined according to the real-time detection of the virtual machining of the workpiece to be machined, and output the optimized machining code based on the local optimization of the machining abnormal nodes.
[0018] In the embodiments of the present invention, by the method in the embodiments of the present invention, the machining filling area is determined based on a spreadsheet, a machining module, and user information; multiple parameter selection bars are determined according to the machining filling area and the types of machining parameters; coherent machining information is determined based on the machining parameters selected in each parameter selection bar, the information of the workpiece to be machined, and the information of the machine tool, and autonomous calibration is performed on the machining information; corresponding machining codes are generated according to the autonomously calibrated machining information and the machining program model, taking into account the overall situation of the autonomously calibrated machining information and the machining program model, making full use of the machining information output by the spreadsheet and the coding of the machining information in the spreadsheet, and ensuring the accuracy of the machining codes.
[0019] Therefore, the virtual machining of the workpiece to be machined is determined based on the machining code, the three-dimensional model of the workpiece to be machined, and the virtual scene of the machine tool; the machining abnormal nodes of the workpiece to be machined are determined according to the real-time detection of the virtual machining of the workpiece to be machined, and the optimized machining code is output based on the local optimization of the machining abnormal nodes, realizing the virtual machining of the workpiece to be machined, ensuring the overall control of the machining code and the local optimization of the machining abnormal nodes, further ensuring the accuracy of the machining code, and thus improving the working efficiency of machining. Description of the Drawings
[0020] Figure 1It is a schematic flowchart of the method for generating machining codes based on spreadsheets in an embodiment of the present invention;
[0021] Figure 2 It is a schematic flowchart of step S11 of the method for generating machining codes based on spreadsheets in an embodiment of the present invention;
[0022] Figure 3 It is a schematic flowchart of step S12 of the method for generating machining codes based on spreadsheets in an embodiment of the present invention;
[0023] Figure 4 It is a schematic flowchart of step S13 of the method for generating machining codes based on spreadsheets in an embodiment of the present invention;
[0024] Figure 5 It is a schematic flowchart of step S14 of the method for generating machining codes based on spreadsheets in an embodiment of the present invention;
[0025] Figure 6 It is a schematic flowchart of step S15 of the method for generating machining codes based on spreadsheets in an embodiment of the present invention;
[0026] Figure 7 It is a schematic flowchart of step S16 of the method for generating machining codes based on spreadsheets in an embodiment of the present invention;
[0027] Figure 8 It is a schematic diagram of the structural composition of the system for generating machining codes based on spreadsheets in an embodiment of the present invention. Detailed implementation manners
[0028] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.
[0029] Please refer to Figures 1 to 8 , a method for generating machining codes based on spreadsheets, which is applied to the scenario of generating machining codes based on spreadsheets; the method for generating machining codes based on spreadsheets includes:
[0030] Step S11: Determine the machining filling area based on the spreadsheet, the machining module, and the user's information;
[0031] Step S12: Determine a plurality of parameter selection columns according to the machining filling area and the types of machining parameters;
[0032] Step S13: Determine coherent machining information based on the machining parameters selected in each parameter selection column, the information of the workpiece to be machined, and the information of the machine tool, and perform autonomous calibration on the machining information;
[0033] Step S14: Generate corresponding machining codes according to the autonomously calibrated machining information and the machining program model, and the machining codes are presented in the machining output column of the spreadsheet.
[0034] Step S15: Determine the virtual machining of the workpiece to be machined based on the machining codes, the three-dimensional model of the workpiece to be machined, and the virtual scene of the machine tool.
[0035] Step S16: Determine the machining abnormal nodes of the workpiece to be machined according to the real-time detection of the virtual machining of the workpiece to be machined, and output the optimized machining codes based on the local optimization of the machining abnormal nodes.
[0036] Reference Figure 2 , in step S11, determine the machining filling area based on the spreadsheet, the machining module, and the user's information.
[0037] In the specific implementation process of the present invention, the specific steps are as follows:
[0038] S111: Collect the spreadsheet and determine the corresponding plug-in space based on the plug-in detection of the spreadsheet.
[0039] S112: Determine the corresponding machining module according to the plug-in space, the machining type, and the model of the machine tool. At this time, the machining module is embedded in the spreadsheet in the form of a plug-in.
[0040] S113: Determine the previous machining events according to the traceability of the user's information, and determine the machining filling area according to the spreadsheet, the machining module, and the previous machining events. The machining filling area is a part of the spreadsheet and is used for the user to fill in parameters.
[0041] In the embodiment of the present application, the spreadsheet is collected, and the corresponding plug-in space is determined based on the plug-in detection of the spreadsheet, and the plug-in space of the spreadsheet is introduced.
[0042] At this time, collect the spreadsheet to obtain the spreadsheet file currently used by the user for subsequent plug-in installation and configuration; the user selects or opens a spreadsheet file through the software interface; the system reads the file, checks its format, version, and compatibility to ensure support for subsequent plug-in operations; if the file does not meet the requirements, the system prompts the user to make necessary adjustments or select other files.
[0043] The system checks whether the spreadsheet supports add-in functions (such as VBA macros, COM add-ins, etc.); if it does, the system further detects whether there is already other add-ins occupying space in the current spreadsheet and whether the remaining space is sufficient to install a new add-in; according to the detection results, the system determines one or more suitable add-in installation locations and prepares the corresponding installation environment, and this add-in installation location serves as the add-in space.
[0044] Furthermore, according to the add-in space, machining type, and the model of the machine tool, the corresponding machining module is determined. At this time, the machining module is embedded in the spreadsheet in the form of an add-in, taking into account the overall considerations of the add-in space, machining type, and the model of the machine tool, ensuring the accuracy of the machining module.
[0045] At this time, the system analyzes the capacity, compatibility of the add-in space, and the mutual influence of the installed add-ins; according to the machining type (such as turning, milling, drilling, etc.) and the model of the machine tool (such as CNC lathe, machining center, etc.) selected by the user, the required machining module function set is determined; ensure that the selected module matches the technical requirements of the add-in space and does not conflict with other add-ins.
[0046] According to the machining requirements and the analysis results of the add-in space, one or more machining modules that meet the requirements are selected from the module library; the selected modules are installed in the add-in space of the spreadsheet to ensure that the modules can be correctly loaded and run; if necessary, the modules are configured and adjusted as required to adapt to specific machining tasks and the model of the machine tool.
[0047] Specifically, assume that the user has determined the add-in installation space in the VBA macro environment of the Excel file named "Machining_Projects.xlsx" through step S111 and hopes to install a machining module suitable for a CNC lathe; the system detects that the VBA macro environment has sufficient space to install a new machining module and that the currently installed add-ins will not conflict with the new module; the user selects turning as the machining type and specifies the model of the CNC lathe (such as Fanuc Series 0i-Mate); based on this information, the system determines that the required machining module should include functions such as turning parameter calculation, tool path generation, and CNC code output.
[0048] From a predefined module library, the system selected a machining module named "CNC Lathe Machining Module", which is designed for CNC lathes and supports code output for common control systems such as Fanuc; the system installed this module into the VBA macro environment of the "Machining_Projects.xlsx" file and ensured that it could be correctly loaded and run; during the installation process, the system also made necessary configuration adjustments to the module according to the CNC lathe model specified by the user, such as setting specific G-code formats and post-processors.
[0049] Therefore, based on the traceability of the user's information, past machining events are determined, and based on the spreadsheet, machining module, and past machining events, a machining filling area is determined. This machining filling area is part of the spreadsheet and is provided for the user to fill in parameters, taking into account the overall consideration of the spreadsheet, machining module, and past machining events, ensuring the accuracy of the machining filling area.
[0050] At this time, the system accesses the user account or database to retrieve historical machining records associated with the user; these records are parsed and sorted to extract the user's commonly used machining parameter combinations, successful machining cases, and existing machining problems; based on the extracted information, a profile of the user's machining preferences and behavior patterns is constructed.
[0051] Analyze the input parameters required by the machining module to ensure that the filling area contains all necessary parameter fields; based on the user's historical machining events, optimize the layout and parameter order of the filling area so that the user can find and fill in commonly used parameters more quickly; embed intelligent prompts or recommendation functions in the filling area to automatically fill in or suggest reasonable parameter values based on the user's selection; ensure seamless integration of the filling area with other parts of the spreadsheet and the machining module to provide a smooth user experience.
[0052] In an embodiment of the present application, in the spreadsheet, for the milling machining and XYZ-123 machine tool model selected by the user, the filling area is as follows:
[0053] Among them, the spindle speed field has a recommended value of 1500 rpm preset according to the weighted average of the user's historical machining events, and a reasonable adjustment range of 1400 - 1600 rpm is provided; the tool selection, feed rate, and cutting depth fields are waiting for the user to fill in according to the specific requirements of the current task; through such a design, the user can quickly set reasonable machining parameters based on past successful experiences while retaining a certain degree of flexibility to adapt to different machining tasks.
[0054] Reference Figure 3, in step S12, determine multiple parameter selection columns according to the machining filling area and the types of machining parameters;
[0055] In the specific implementation process of the present invention, the specific steps are as follows:
[0056] S121: Collect the position where the machining filling area is located, and interact with the position where the machining filling area is located, the area of the machining filling area, and the types of machining parameters;
[0057] S122: Determine the first selection column parameters based on the position where the machining filling area is located and the area of the machining filling area, determine the second selection column parameters according to the position where the machining filling area is located and the types of machining parameters, and determine multiple parameter selection columns based on the first selection column parameters, the second selection column parameters, and the machining filling area.
[0058] In the embodiment of the present application, collecting the position where the machining filling area is located and interacting with the position where the machining filling area is located, the area of the machining filling area, and the types of machining parameters realizes multiple interactions of the position where the machining filling area is located, the area of the machining filling area, and the types of machining parameters.
[0059] At this time, use the API or built-in functions provided by the spreadsheet software, such as the VBA (Visual Basic for Applications) programming interface of Excel, to locate the starting cell and ending cell of the machining filling area; record the row numbers and column numbers of the starting cell and ending cell, which is represented as a range in the form of (starting row, starting column) to (ending row, ending column); based on the position information collected in the previous step, calculate the number of rows (ending row - starting row + 1) and the number of columns (ending column - starting column + 1) of the machining filling area; multiply the number of rows and the number of columns to obtain the area of the machining filling area (the number of cells).
[0060] Analyze the cell content in the machining filling area, especially the title row or parameter name fields, to identify the types of machining parameters involved; create a list or dictionary to associate each parameter type with its position (such as column number) in the filling area; design a user interface, such as a dialog box or a sidebar panel, to display the position, area, and parameter type information of the machining filling area; provide an editing function that allows users to manually adjust this information, such as entering new position coordinates through a text box, adjusting the area size through a slider, or selecting / deselecting parameter types through check boxes; after the user makes edits, update the displayed information in real time and verify the legality of the input (such as ensuring that the position coordinates are within the valid range of the spreadsheet).
[0061] Therefore, determine the first selection column parameters based on the location of the machining filling area and the area of the machining filling area, determine the second selection column parameters according to the location of the machining filling area and the types of machining parameters, and determine multiple parameter selection columns based on the first selection column parameters, the second selection column parameters, and the machining filling area, which takes into account the overall consideration of the first selection column parameters, the second selection column parameters, and the machining filling area, and ensures the accuracy of the multiple parameter selection columns.
[0062] At this time, determine the first selection column parameters based on the location of the machining filling area and the area of the machining filling area, and introduce the first selection column parameters.
[0063] Analyze the layout of the machining filling area, considering its location (such as whether it is close to the top or left side of the spreadsheet) and area (such as whether the size of the filling area allows the placement of multiple parameter selection columns); according to the importance and usage frequency of the machining parameters, select one or two parameters as the first selection column parameters; these parameters are key factors affecting the machining process, such as rotational speed and feed rate; ensure that the display position of the first selection column parameters is easy for users to view and operate within the filling area.
[0064] Determine the second selection column parameters according to the location of the machining filling area and the types of machining parameters, and introduce the second selection column parameters; at this time, after selecting the first selection column parameters, select other important parameters as the second selection column parameters according to the types of machining parameters and the remaining space in the filling area.
[0065] List all the identified types of machining parameters, excluding the options that have been used as the first selection column parameters; according to the importance of the parameters and the needs of the users, select one or two from the remaining parameters as the second selection column parameters; these parameters are cutting depth, tool diameter, etc.; consider the layout and remaining space of the filling area to ensure that the second selection column parameters can be reasonably placed within the filling area.
[0066] Based on the overall layout of the first selection column parameters, the second selection column parameters, and the machining filling area, design and determine multiple parameter selection columns so that users can conveniently select and input machining parameters; design a parameter selection column for each selected parameter (the first selection column parameters and the second selection column parameters); these selection columns are controls such as drop-down menus, text boxes, sliders, etc., depending on the type of parameter and the needs of the users; ensure that the layout of the parameter selection columns is reasonable and easy for users to understand and operate; for example, place the selection columns of related parameters together, or add labels and instructions to improve readability; consider the boundaries of the filling area and the space limitations to ensure that all parameter selection columns can be completely displayed within the filling area without overlapping or exceeding the boundaries.
[0067] Reference Figure 4, in step S13, determine coherent machining information based on the machining parameters selected in each parameter selection bar, the information of the workpiece to be machined, and the information of the machine tool, and perform autonomous calibration on the machining information;
[0068] In the specific implementation process of the present invention, the specific steps are as follows:
[0069] S131: The user sequentially selects machining parameters in each parameter selection bar and determines the machining parameters selected in each parameter selection bar;
[0070] S132: Obtain the solid model of the workpiece to be machined, and determine the information of the workpiece to be machined according to the solid model of the workpiece to be machined, the material of the workpiece to be machined, and the shape of the workpiece to be machined;
[0071] S133: Determine the corresponding machine tool based on the equipment detection at the machining site, and collect the information of the machine tool;
[0072] S134: Determine coherent machining information based on the interaction of the machining parameters selected in each parameter selection bar, the information of the workpiece to be machined, and the information of the machine tool;
[0073] S135: Collect the machining information, determine the abnormal fields according to the detection of the machining information, and trigger the autonomous calibration of the machining information based on the abnormal fields to output the autonomously calibrated machining information.
[0074] In the embodiment of the present application, the user sequentially selects machining parameters in each parameter selection bar and determines the machining parameters selected in each parameter selection bar, ensuring the accuracy of the machining parameters selected in each parameter selection bar.
[0075] At this time, the system clearly displays each parameter selection bar on the user interface; these selection bars are presented in the form of drop-down menus, sliders, text boxes, etc., depending on the type of parameter and the user's preference; each parameter selection bar is marked with a clear label indicating the name of the machining parameter corresponding to the selection bar, such as "rotation speed", "feed rate", "cutting depth", etc.
[0076] The user sequentially browses each parameter selection bar according to the machining requirements and workpiece characteristics; for the drop-down menu, the user selects a suitable parameter value from the predefined option list; these options are based on the common machining parameter range or user-defined settings; for the slider, the user adjusts the parameter value by dragging the slider; the slider is accompanied by a numerical display so that the user can accurately know the currently selected parameter value; for the text box, the user directly enters the required parameter value; the system provides input verification to ensure that the value entered by the user is within a reasonable range.
[0077] After the user selects each parameter, the system immediately records the value of the parameter. There is a data structure (such as a dictionary or an object) inside the system to store all the selected machining parameters and their corresponding values. After the user finishes selecting all the parameters, there will be a "Confirm" or "Submit" button for the user to click. After the user clicks the button, the system verifies whether all the parameters have been correctly selected and displays a confirmation dialog box listing all the selected parameters and their values for the user to confirm finally. Once the user confirms the selection, the system combines all the selected machining parameters and their values into a parameter set. Once the user confirms the selection, the system combines all the selected machining parameters and their values into a parameter set.
[0078] Furthermore, obtain the solid model of the workpiece to be machined, and determine the information of the workpiece to be machined based on the solid model of the workpiece to be machined, the material of the workpiece to be machined, and the shape of the workpiece to be machined. It takes into account the overall aspects of the solid model of the workpiece to be machined, the material of the workpiece to be machined, and the shape of the workpiece to be machined, ensuring the accuracy of the information of the workpiece to be machined.
[0079] At this time, the system obtains the solid model of the workpiece to be machined by means of user upload, database retrieval, or integration with other CAD software. The system obtains the solid model of the workpiece to be machined by means of user upload, database retrieval, or integration with other CAD software. The system analyzes the obtained solid model and extracts the geometric features of the workpiece, such as dimensions, shapes, surfaces, etc. This involves complex geometric calculations, such as surface fitting, volume calculation, etc., to ensure an accurate understanding of the workpiece shape.
[0080] The user inputs or selects the material information of the workpiece to be machined through the user interface. The material information includes the type of the material (such as metal, plastic, wood, etc.), physical properties such as density, hardness, thermal conductivity, etc. These properties are crucial for subsequent machining process planning, tool selection, and cutting parameter setting.
[0081] Based on the solid model and the material information, the system further analyzes the morphological characteristics of the workpiece. This includes identifying the key features of the workpiece (such as holes, grooves, bosses, etc.), evaluating the machining difficulty (such as thin-walled areas, complex surfaces, etc.), and determining the machining sequence and strategy. The system integrates the geometric features, material properties, and morphological characteristics obtained in the above steps to form the comprehensive information of the workpiece to be machined. This information set can then be used to generate machining instructions, perform machining simulations, evaluate machining costs, etc.
[0082] Furthermore, based on the equipment detection in the machining site, the corresponding machine tool is determined, and the information of the machine tool is collected. The information of the machine tool is introduced. At the same time, based on the interaction of the machining parameters selected in each parameter selection column, the information of the workpiece to be machined, and the information of the machine tool, coherent machining information is determined; the interaction of the machining parameters selected in each parameter selection column, the information of the workpiece to be machined, and the information of the machine tool is realized, and the coherent machining information is further accurately controlled.
[0083] At this time, the system automatically detects the machine tools in the machining site through the built-in sensor network or external device interface; the detection process involves inspections of multiple aspects such as the power state, operating state, and network connection state of the machine tool; the system ensures that only the machine tools in the available state and meeting the machining requirements are included in the consideration range.
[0084] At the same time, for each detected machine tool, the system identifies its model and specifications by reading the label on the machine tool, scanning the QR code, or querying the machine tool database, etc.; the machine tool model and specification information is crucial for subsequent machining process planning, tool selection, and cutting parameter setting; the system collects the detailed information of the machine tool, including but not limited to the workbench size, stroke range, spindle power, speed range, feed speed range, etc. of the machine tool; based on the collected machine tool information, the system evaluates the machining ability of the machine tool, that is, whether the machine tool can meet the machining requirements of the workpiece to be machined; according to the evaluation results, the system selects one or more machine tools most suitable for the workpiece to be machined.
[0085] Furthermore, according to the evaluation results, the system selects one or more machine tools most suitable for the workpiece to be machined; the system integrates the information of the workpiece to be machined, such as the solid model, material, morphological characteristics, etc.; the system integrates the information of the machine tool, including the machine tool model, specifications, workbench size, spindle power, etc.; the system performs matching verification between the machining parameters, the machine tool, and the workpiece based on the integrated data; this includes checking whether the selected parameters are within the specification range of the machine tool and whether they are suitable for the material and morphology of the workpiece to be machined; the system also performs more in-depth verification, such as considering the compatibility between the tool and the workpiece material, thermal deformation during the cutting process, etc.
[0086] Based on the results of the matching verification, the system starts to generate the machining path; this involves converting the solid model of the workpiece into a series of tool path points, which define the movement trajectory of the tool during the machining process; the system further optimizes the tool path to reduce the machining time, improve the machining accuracy, and reduce the tool wear.
[0087] The system determines the processing sequence and strategy based on the morphological characteristics and processing path of the workpiece; this includes selecting the optimal feed direction, determining the roughing and finishing steps, arranging tool changes, etc.; the system also considers potential challenges during the processing, such as avoiding vibration, controlling cutting temperature, etc., and formulates corresponding strategies to address these challenges; based on the results of the above steps, the system generates coherent processing instructions; these instructions include the operation codes of the machine tool (such as G codes or M codes) for controlling the movement of the machine tool, tool change, coolant injection, etc.; the processing instructions also contain other information, such as estimated processing time, tool life prediction, etc.
[0088] Therefore, the processing information is collected, and the abnormal fields are determined based on the detection of the processing information. Based on the abnormal fields, the autonomous calibration of the processing information is triggered to output the autonomously calibrated processing information, achieving the control of the abnormal fields of the processing information and ensuring the accuracy of the autonomously calibrated processing information.
[0089] At this time, the processing information is collected, and the collected processing information is comprehensively detected to identify any abnormal fields; the abnormal fields include parameters exceeding the machine tool specifications, tool selections incompatible with the workpiece material, logically inconsistent processing sequences, etc.
[0090] Once an abnormal field is detected, the system immediately triggers the autonomous calibration mechanism; the autonomous calibration mechanism includes adjusting machining parameters to conform to the machine tool specifications, replacing tools compatible with the workpiece material, re-planning the processing sequence, etc.; the autonomous calibration mechanism includes adjusting machining parameters to conform to the machine tool specifications, replacing tools compatible with the workpiece material, re-planning the processing sequence, etc.
[0091] The system makes corresponding adjustments and optimizations to the processing information according to the triggered autonomous calibration mechanism; this involves modifying the processing instructions, updating the machine tool settings, adjusting the tool library, etc.; the autonomous calibration process ensures the consistency and feasibility of the processing information; the system outputs the processed information after autonomous calibration for use in subsequent processing; the output information includes updated processing instructions, machine tool settings, tool selections, etc.; the user views and confirms the calibrated information through the user interface to ensure that it meets the processing requirements.
[0092] Specifically, assume that the user is machining an engine component made of aluminum alloy for an automobile manufacturing plant. This component has complex curved surfaces and precise hole position requirements. The system has collected the machining information integrated in the previous steps, including machining parameters such as a rotational speed of 4000 RPM and a feed rate of 0.2 mm / rev, aluminum alloy workpiece information, and Y6000 machine tool information, etc. During the detection process, the system found that the selected feed rate of 0.2 mm / rev is too high for the aluminum alloy material and the Y6000 machine tool, which results in excessive cutting force and a decline in the surface quality of the workpiece. At the same time, the system also detected a logical error in the machining instructions, that is, the order of tool replacement is inconsistent with the machining order.
[0093] The system triggers the autonomous calibration mechanism, decides to adjust the feed rate to reduce the cutting force, and re-plans the tool replacement order to ensure the continuity of the machining process. The system adjusts the feed rate to 0.15 mm / rev, which is a parameter more suitable for the aluminum alloy material and the Y6000 machine tool. At the same time, the system re-plans the tool replacement order to ensure that the tool can be replaced in a timely manner when needed without affecting the progress of the machining process. The system outputs the machining information after autonomous calibration, including the updated machining instructions, machine tool settings, and tool selection, etc. The user views the calibrated information through the user interface and confirms that it meets the machining requirements. Subsequently, the system sends this information to the Y6000 machine tool to guide the machining of the engine component.
[0094] Reference Figure 5 , in step S14, according to the machining information after autonomous calibration and the machining program model, the corresponding machining code is generated, and this machining code is presented in the machining output column of the spreadsheet.
[0095] In the specific implementation process of the present invention, the specific steps are as follows:
[0096] S141: Determine multiple machining modules according to the traceability of the spreadsheet, and determine the machining program model according to the multiple trainings of the multiple machining modules;
[0097] S142: Associate the machining program model with the machining information after autonomous calibration, and divide the machining information after autonomous calibration into multiple sub-machining information;
[0098] S143: Generate the corresponding sub-machining code based on the synchronous interaction of the multiple sub-machining information and the machining program model, and generate the corresponding machining code based on the synthesis of the multiple sub-machining codes;
[0099] S144: Locate the machining output column in the spreadsheet and present the corresponding machining code in the machining output column of the spreadsheet.
[0100] In the embodiments of the present application, multiple machining modules are determined according to the traceability of spreadsheets, and a machining program model is determined according to the multiple trainings of the multiple machining modules, ensuring the accuracy of the machining program model.
[0101] At this time, the system first collects and organizes the historical machining data stored in the spreadsheet; this data includes different types of workpieces, machining parameters (such as rotational speed, feed rate, cutting depth), tool information, machining time, machining quality feedback, etc.; the system traces the collected data and identifies multiple modules related to machining; these modules are divided based on workpiece type, machining stage, tool type, etc.; for each identified module, the system extracts key features; these features include the range of machining parameters, the selection criteria of tools, the evaluation indicators of machining quality, etc.
[0102] The collected historical data is divided into a training set and a test set; the training set is used to build the model, and the test set is used to evaluate the performance of the model; the data in the training set is used to train the selected method; during the training process, the method learns how to predict the output (such as machining quality, machining time, etc.) from the input features (such as workpiece type, machining parameters, etc.); the trained model is verified using the test set to evaluate its prediction performance; according to the verification results, the model is adjusted and optimized to improve its accuracy and generalization ability; after multiple iterations of training and optimization, the final machining program model is determined; this model can generate optimized machining strategies according to different input features.
[0103] Furthermore, the machining program model is associated with the autonomously calibrated machining information, and the autonomously calibrated machining information is divided into multiple sub-machining information; corresponding sub-machining codes are generated based on the synchronous interaction of the multiple sub-machining information and the machining program model, and corresponding machining codes are generated based on the synthesis of the multiple sub-machining codes, realizing the synthesis of the multiple sub-machining codes and ensuring the accuracy of the machining codes.
[0104] At this time, the previously built and trained machining program model is loaded; this model has learned how to predict the output from the input features, such as machining parameters, tool selection, etc.; the autonomously calibrated machining information is obtained from the previous steps; this information includes workpiece type, size, material, initial machining parameters, etc.; the system matches and associates the autonomously calibrated machining information with the machining program model; this involves inputting the features in the machining information into the model to obtain optimized machining strategies or parameters.
[0105] The system deeply analyzes the processed information after self-calibration to understand the requirements and steps of the entire processing process; this involves considering the shape, size, and material properties of the workpiece, as well as evaluating requirements such as machining accuracy and surface quality; based on the analysis of the processing requirements, the system determines to divide the entire processing process into multiple sub-processing stages; each sub-stage represents a specific task or step in the processing process, such as rough machining, semi-finishing, finishing, etc.; the system divides the processed information after self-calibration into multiple sub-processing information according to the determined sub-processing stages; each sub-information contains processing parameters, tool selection, machining path, and other information required for the corresponding sub-stage.
[0106] The system first ensures that all sub-processing information has been correctly divided and is ready; this information should include detailed information such as processing parameters, tool selection, and machining path required for each sub-processing stage; the system inputs each sub-processing information into the machining program model and starts the synchronous interaction process; this means that the model will generate or adjust processing parameters and strategies in real time according to the characteristics of the sub-processing information; based on the results of the synchronous interaction, the system generates corresponding sub-machining codes for each sub-processing information; these codes are an instruction set for guiding the machine tool to perform specific machining operations, including parameters such as tool path, machining speed, and feed rate; the system verifies each generated sub-machining code to ensure that it meets the processing requirements and the capabilities of the machine tool; if necessary, the system will optimize the code to improve machining efficiency and accuracy.
[0107] The system integrates all the generated sub-machining codes to form a complete machining code; this process involves arranging the sub-codes in sequence and adding necessary transition instructions or connection instructions to ensure the coherence and smoothness of the entire processing process; the system performs a logical check on the integrated machining code to ensure that it conforms to the machining logic and the operating sequence of the machine tool; this includes checking tool change points, the continuity of the machining path, the rationality of the processing parameters, etc.; finally, the system outputs the integrated and verified machining code to a specified location (such as a machine tool controller, spreadsheet, file system, etc.) and saves it in an executable format; in this way, the machine tool performs machining operations according to this code.
[0108] Therefore, locate the machining output column in the spreadsheet and present the corresponding machining code in the machining output column of the spreadsheet.
[0109] At this time, the system first opens the spreadsheet file containing machining data; this file is in Excel, CSV, or other compatible formats, depending on the system implementation and user preferences; the system analyzes the structure of the spreadsheet, including the layout of rows and columns, the presence of a header row or column, and the range of the data area; this process involves parsing the metadata or content of the spreadsheet to understand its organization method.
[0110] After identifying the table structure, the system searches for specific columns or cell ranges that are labeled or named "machining output", "processing code", or similar terms; this process involves string matching, regular expression searching, or other text processing techniques; once a potential machining output column is found, the system verifies whether it meets the expectations; this includes checking whether the column is in the correct position in the data area, whether it contains valid data types (such as text or code), and whether it has a logical association with other relevant columns (such as workpiece number, processing stage, etc.).
[0111] After locating the machining output column, the system ensures that the corresponding processing code has been generated; these codes are the complete machining codes synthesized from the sub-machining codes generated by the machining program model in the previous steps; the system inserts the prepared processing code into the designated machining output column in the spreadsheet; this process involves copy and paste operations, text formatting (such as alignment, line break handling, etc.), and ensuring that the code is correctly displayed within the cell without being truncated or distorted; the system verifies the rendering result of the processing code in the spreadsheet; this includes checking whether the code is completely displayed, readable, and has a consistent format and style with the content of other columns; finally, the system saves the changes made to the spreadsheet to ensure that the processing code is correctly recorded and can be used for subsequent analysis, reporting, or machine tool execution.
[0112] In an embodiment of the present application, assume the following spreadsheet content (simplified version):
[0113] And the processing codes have been generated for these two workpieces as follows:
[0114] Processing code for workpiece 001: G0 X0 Y0 Z-10 M3 S2000 F0.2 (this is a simplified example of a numerical control machining code); processing code for workpiece 002: G1 X50 Y50 F0.1 (also a simplified example).
[0115] After inserting the processing code into the spreadsheet, the table content will become:
[0116] Reference Figure 6 , in step S15, determine the virtual machining of the workpiece to be machined based on the machining code, the solid model of the workpiece to be machined, and the virtual scene of the machine tool;
[0117] In the specific implementation process of the present invention, the specific steps are as follows:
[0118] S151: Take multi-dimensional photos of the workpiece to be machined and output multiple images at different positions;
[0119] S152: Determine the three-dimensional model of the workpiece to be machined based on multiple images, the drawing of the workpiece to be machined, and the model number of the workpiece to be machined;
[0120] S153: Collect the model number of the machine tool, and determine the virtual scene of the machine tool based on the model number of the machine tool and the machining information of the workpiece to be machined;
[0121] S154: Interact with the machining code, the three-dimensional model of the workpiece to be machined, and the virtual scene of the machine tool; determine the virtual machining of the workpiece to be machined based on the interaction of the machining code, the three-dimensional model of the workpiece to be machined, and the virtual scene of the machine tool.
[0122] In the embodiment of the present application, the workpiece to be machined is photographed in multiple dimensions, and multiple images at different positions are output; the three-dimensional model of the workpiece to be machined is determined based on multiple images, the drawing of the workpiece to be machined, and the model number of the workpiece to be machined, which takes into account multiple images, the drawing of the workpiece to be machined, and the model number of the workpiece to be machined as a whole, and ensures the accuracy of the three-dimensional model of the workpiece to be machined.
[0123] At this time, the workpiece to be machined is photographed in multiple dimensions, and multiple images at different positions are output. During the photographing process, pay attention to keeping the camera stable to avoid blurring and shaking; at the same time, pay attention to the detailed parts of the workpiece, such as edges, holes, textures, etc., to ensure that these parts are clearly visible in the images.
[0124] Export the photographed images from the camera or photographic equipment to the computer and save them in a common image format (such as JPEG, PNG, etc.); organize the exported images, name and classify them according to the photographing position and order; at the same time, check the clarity and integrity of the images to ensure that there are no missing or damaged images; back up and store the organized images to prevent data loss or damage.
[0125] Furthermore, obtain multiple images, which should cover different angles and key features of the workpiece; obtain the detailed design drawings of the workpiece to be machined, including two-dimensional drawings and three-dimensional CAD models (if any); the drawings should contain information such as the dimensions, shape, and material of the workpiece; understand the model number of the workpiece to be machined, which includes the standard dimensions, material specifications, machining requirements, etc. of the workpiece; the model number information helps to verify the accuracy of the drawings and images and supplement missing details.
[0126] Calibrate the captured images, including removing distortion, adjusting color balance and contrast, to ensure the accuracy and consistency of the images; Use image processing software (such as Photoshop, GIMP or specialized image measurement software) to extract key feature points, edges and contours in the images; These features will be used for subsequent 3D reconstruction; Based on the preprocessed images and the extracted features, use 3D reconstruction software (such as Agisoft PhotoScan, Meshroom, Autodesk ReCap, etc.) to generate a point cloud model of the workpiece; The point cloud model is composed of a large number of points in 3D space, and these points represent the shape of the workpiece surface; Convert the point cloud model into a triangular mesh model; The meshing process involves connecting the points in the point cloud to form triangular patches, thereby constructing the 3D surface of the workpiece; Smooth the mesh model to remove noise and uneven parts, and obtain a smoother and more realistic workpiece surface; Compare the reconstructed 3D model with the drawing to check the accuracy of dimensions, shape and features; If there are differences, adjustments need to be made; Convert the finally verified and adjusted 3D model into a format suitable for subsequent processing and simulation (such as STL, OBJ, IGES, etc.); Save the solid model file to the specified location for use in subsequent steps.
[0127] Furthermore, collect the model number of the machine tool, and determine the virtual scene of the machine tool according to the model number of the machine tool and the processing information of the workpiece to be processed, ensuring the accuracy of the virtual scene of the machine tool.
[0128] At this time, obtain the detailed documents of the machine tool from the machine tool manufacturer, including technical manuals, operation guides and specification sheets; These documents should contain information such as the model number, dimensions, functions, performance parameters, etc. of the machine tool; Carefully record the model number, manufacturer, production date, main technical parameters (such as maximum processing size, spindle power, feed speed, etc.) of the machine tool, as well as any special functions or configurations.
[0129] Carefully review the drawings and process documents of the workpiece to be processed, understand the dimensions, shape, material, processing requirements (such as accuracy, surface roughness, etc.) of the workpiece, as well as the required processing procedures and tools; Based on the processing information of the workpiece, formulate a processing strategy, including selecting appropriate processing techniques (such as turning, milling, grinding, etc.), determining the processing sequence, selecting tools and cutting parameters, etc.; Evaluate whether the machine tool meets the processing requirements according to the model information of the machine tool and the processing information of the workpiece to be processed; This includes aspects such as the processing range, accuracy, power, etc. of the machine tool.
[0130] Select software suitable for machine tool simulation and virtual manufacturing, such as CATIA, SolidWorks, NX (Unigraphics), Vericut, etc.; these software should support 3D modeling, motion simulation, and machining process simulation of machine tools; create a 3D model of the machine tool in the simulation software according to the model information of the machine tool and on-site inspection (if any); this includes parts such as the bed, spindle, feed mechanism, fixture, etc. of the machine tool; configure the machining environment in the virtual scene, including setting up the workbench, fixture, tool library, etc. of the machine tool; select appropriate tools and cutting parameters according to the machining information of the workpiece to be machined and add them to the virtual scene; verify and adjust the virtual scene to ensure the correctness of the machine tool model, machining environment, and tool configuration; this is done by simulating the motion and machining process of the machine tool.
[0131] According to the results of the simulation, optimize the performance of the virtual scene, such as adjusting the motion parameters of the machine tool, optimizing the tool path, reducing the machining time, etc.; utilize the visualization function of the simulation software to display the motion, machining process, and results of the machine tool in the virtual scene; generate a detailed report to record the key parameters and results during the simulation process for subsequent analysis and improvement.
[0132] Furthermore, interact with the machining code, the solid model of the workpiece to be machined, and the virtual scene of the machine tool; determine the virtual machining of the workpiece to be machined based on the interaction of the machining code, the solid model of the workpiece to be machined, and the virtual scene of the machine tool; realize the interaction of the machining code, the solid model of the workpiece to be machined, and the virtual scene of the machine tool, and further accurately control the virtual machining of the workpiece to be machined.
[0133] At this time, select a software platform that can integrate machining code (G code or M code), workpiece solid model (such as STL file), and machine tool virtual scene; this is a CAM (Computer Aided Manufacturing) software or simulation software, such as Mastercam, NX CAM, Vericut, etc.; import the machining code, workpiece solid model, and machine tool virtual scene into the selected software platform; ensure that the formats of all data are compatible and can be correctly identified and loaded.
[0134] In the software platform, associate the machining code with the solid model of the workpiece; this involves specifying the corresponding relationship between the tool path, cutting parameters, and the model surface; ensure that the machine tool configuration, fixture, tool, etc. in the machine tool virtual scene match the instructions in the machining code; this includes the synchronization of parameters such as the motion range, spindle speed, and feed speed of the machine tool.
[0135] Run the simulation in the software platform to simulate the process of the machine tool machining the workpiece according to the machining code; observe key elements such as tool paths, cutting depths, and collision detections; during the simulation process, the software platform should provide real-time feedback, such as machining time, material removal rate, tool wear prediction, etc.; this feedback helps to evaluate machining efficiency and quality; analyze the simulation results to check for potential problems, such as tool collisions, undercuts, unqualified machining quality, etc.; according to the analysis results, optimize and adjust the machining code, the solid model of the workpiece, or the virtual scene of the machine tool; this involves modifying tool paths, adjusting cutting parameters, improving fixture design, etc.; run the simulation again to verify the effect after optimization and adjustment; ensure that the machining process is stable, efficient, and meets quality requirements; output the verified virtual machining plan as a report or file, including information such as machining code, machining parameters, tool selection, and fixture configuration; this information will be used to guide the actual machining process.
[0136] Specifically, assume there is an aluminum alloy part to be machined, and a five-axis linkage CNC machine tool is required for complex surface machining; the machining code (G-code), the solid model of the part (STL file), and the virtual scene of the machine tool (created in NX CAM) have been prepared; now, the following steps will be carried out to determine the virtual machining plan:.
[0137] Select NX CAM as the integrated software platform because it supports the integration of G-code, STL files, and the virtual scene of the machine tool; import all relevant data into NX CAM; in NX CAM, associate the G-code with the solid model of the part and specify the tool path and cutting parameters; at the same time, ensure that the machine tool configuration, fixture, and tool in the virtual scene of the machine tool match the instructions in the G-code; run the simulation function in NX CAM to simulate the process of the machine tool machining the part according to the G-code.
[0138] During the simulation process, it is observed that the tool path is smooth, the cutting depth is reasonable, and there are no collisions or undercuts; analyzing the simulation results, it is found that the machining efficiency is slightly lower than expected; to optimize the machining process, the cutting parameters (such as feed rate and spindle speed) are adjusted and the simulation is run again for verification; after several iterations of optimization, a more efficient and quality-compliant machining plan is obtained; finally, the verified virtual machining plan is determined and output as a report file; the report contains information such as the optimized G-code, machining parameters, tool selection, and fixture configuration; this information will be used to guide the actual machining process to ensure that the machining quality and efficiency meet the expected goals.
[0139] Specifically, create a matching table to record the corresponding relationships between the machining code, the solid model of the workpiece, and the virtual scene of the machine tool; this table includes the following key fields:.
[0140] Machine processing code: List specific G-code or M-code instructions and their corresponding processing operations (such as cutting, drilling, etc.); Solid model features of the workpiece: Describe the key features in the solid model of the workpiece, such as dimensions, shape, material, surface roughness, etc.; Virtual machine tool scene configuration: List the key configurations in the virtual machine tool scene, such as machine tool model, fixture type, tool selection, cutting parameters, etc.; Matching status: Indicate whether there is a match between the machine processing code, the solid model of the workpiece, and the virtual machine tool scene; if there is a match, mark it as "Yes"; if there is no match, mark it as "No" and indicate the reason for the non-match.
[0141] By filling in the matching table, the corresponding relationship between the machine processing code, the solid model of the workpiece, and the virtual machine tool scene can be visually seen, so as to determine which codes and configurations are applicable to the virtual processing of the current workpiece.
[0142] Reference Figure 7 , in step S16, based on the real-time detection of the virtual processing of the workpiece to be processed, determine the machining abnormal nodes of the workpiece to be processed, and output the optimized machine processing code based on the local optimization of the machining abnormal nodes;
[0143] In the specific implementation process of the present invention, the specific steps are as follows:
[0144] S161: Perform real-time detection on the virtual processing of the workpiece to be processed and output the corresponding abnormal area;
[0145] S162: Determine the machining abnormal nodes of the workpiece to be processed according to the position of the abnormal area and the fields of the machine processing code corresponding to the abnormal area;
[0146] S163: If there are multiple machining abnormal nodes of the workpiece to be processed, determine the corresponding machining abnormal part according to the multiple machining abnormal nodes and the shape of the workpiece to be processed, and trigger the optimization of the machine processing code according to the machining abnormal part;
[0147] S164: In the optimization of the machine processing code, perform local optimization on the multiple machining abnormal nodes, update the real-time shape of the machining abnormal part under the local optimization of the machining abnormal nodes, determine the optimized machine processing code according to the real-time shape of the machining abnormal part, the optimization progress of each machining abnormal node, and the coherence of the machine processing code, and output the optimized machine processing code based on the spreadsheet.
[0148] In an embodiment of the present application, real-time detection is performed on the virtual machining of a workpiece to be machined, and a corresponding abnormal area is output; according to the position of the abnormal area and the fields of the machining code corresponding to the abnormal area, a machining abnormal node of the workpiece to be machined is determined, which takes into account the overall consideration of the position of the abnormal area and the fields of the machining code corresponding to the abnormal area, ensuring the accuracy of the machining abnormal node of the workpiece to be machined.
[0149] At this time, the three-dimensional model (such as an STL file) of the workpiece to be machined, the machining code (such as G code), and the configuration information of the machine tool are imported into the simulation software; according to the actual machining conditions, simulation parameters are configured, such as tool type, cutting speed, feed rate, etc.
[0150] Start virtual machining simulation in the simulation software to simulate the process of the machine tool machining the workpiece according to the machining code; during the simulation process, real-time monitor the tool path, cutting depth, changes in the workpiece surface, and the operating state of the machine tool; according to the machining requirements and workpiece material characteristics, set the thresholds for abnormal detection, such as cutting force, temperature, surface roughness, etc.; compare the data monitored during the simulation process with the set thresholds to analyze whether there are abnormal situations; when an abnormal situation is detected, automatically mark the abnormal area and record information such as the type, position, and degree of the abnormality; organize the detected abnormal area information into a report, including graphical representation of the abnormal area, specific location, abnormal type, cause, and recommended solutions, etc.; save the report to a specified location and export it in a format that is easy to view and share, such as PDF, Excel, etc.
[0151] Specifically, assume there is an aluminum alloy workpiece that needs to be machined using a CNC milling machine; the three-dimensional model of the workpiece, the machining code, and the configuration information of the machine tool have been prepared, and a suitable simulation software has been selected for virtual machining simulation.
[0152] During the simulation process, the tool path and cutting depth were monitored in real time, and the abnormal thresholds for cutting force and surface roughness were set; when the simulation reached a certain stage, it was found that the tool generated a large cutting force at a corner of the workpiece, and the surface roughness of this area also exceeded the set threshold.
[0153] Based on this information, this abnormal area was automatically marked, and information such as the type of abnormality (excessive cutting force, excessive surface roughness), position (at the corner of the workpiece), and degree (cutting force exceeding the threshold by XX%, surface roughness exceeding the threshold by YY%) was recorded.
[0154] Finally, a detailed report on the abnormal area was generated, and solutions such as adjusting cutting parameters, optimizing tool paths, or replacing tools more suitable for the current machining conditions were recommended in the report; this report was saved to the specified location and exported in PDF format for subsequent analysis and tracking.
[0155] Furthermore, first, consult the abnormal area report generated in step S161 to understand information such as the specific location, type, and degree of the abnormality; familiarize yourself with the 3D model and structural design of the workpiece to be machined, and understand the position of the abnormal area in the overall structure of the workpiece and its importance; open the machining code file, and based on the location information of the abnormal area, locate the code segment related to the machining of this area; this involves parts such as tool path planning and cutting parameter settings; carefully analyze the located code segment, especially the tool movement instructions (such as G01, G02, etc.), cutting parameters (such as F, S, M, etc.), and any special instructions that affect machining quality that are directly related to the abnormal area.
[0156] Match the information such as the location and type of the abnormal area with the instructions in the machining code to find the code nodes that cause the abnormality; these nodes can be single instructions or combinations of multiple instructions; record the determined machining abnormal nodes, including their positions in the code (line numbers, segment numbers, etc.), instruction contents, and the reasons for the abnormality; if necessary, trace back the process of virtual machining simulation to observe the behavior of the tool, the deformation of the workpiece, and any abnormal signs at the machining abnormal nodes.
[0157] Specifically, assume that in step S161, an abnormal area with excessive surface roughness was found during the machining of an aluminum alloy workpiece, and this area is located on an inclined surface of the workpiece; now, it is necessary to determine the machining abnormal nodes based on the location of this abnormal area.
[0158] First, consult the abnormal area report to understand the specific location and degree of the abnormality; then, open the machining code file and locate the code segment related to the machining of the inclined surface.
[0159] When analyzing the code segment, a G01 instruction was found, which controls the tool to cut downward along the inclined surface; note that before this instruction, the cutting parameter F (feed rate) was set to a relatively high value, and after this instruction, the tool directly jumps to the next machining position without setting any deceleration or smooth transition instructions.
[0160] Combining the location and type of the abnormal area (excessive surface roughness), it is judged that this G01 instruction and the cutting parameter settings before and after it are the reasons for the abnormality; therefore, record this G01 instruction and its related cutting parameter settings as machining abnormal nodes.
[0161] For the verification judgment, the process of virtual machining simulation was traced back, and the behavior of the tool at this node during machining was observed. It was found that when the tool cut to the bottom of the inclined plane at a high feed rate, due to the lack of smooth transition, the tool produced obvious vibrations, resulting in the surface roughness of the workpiece exceeding the standard.
[0162] Furthermore, if there are multiple machining abnormal nodes for the workpiece to be machined, the corresponding machining abnormal parts are determined according to the multiple machining abnormal nodes and the shape of the workpiece to be machined, and the optimization of the machining code is triggered according to the machining abnormal parts, realizing the optimization of the machining code.
[0163] At this time, collect all the machining abnormal node information determined in step S162, including node position, instruction content, abnormal type and reason, etc.; organize the collected abnormal node information into a clear list for subsequent analysis and processing.
[0164] According to the position and instruction content of the abnormal nodes, try to associate them with specific areas or features of the workpiece to be machined; this requires referring to the three-dimensional model of the workpiece to understand the positional relationship of each abnormal node in the overall structure of the workpiece; through comprehensive analysis, determine which areas or features constitute the machining abnormal parts due to the existence of multiple abnormal nodes; these parts are a specific surface, hole position, edge or complex structure on the workpiece.
[0165] For the determined machining abnormal parts, formulate specific machining code optimization strategies; this includes adjusting cutting parameters, optimizing tool paths, replacing tools or fixtures, adding or reducing machining steps, etc.; assign the optimization tasks to relevant CNC programmers or machining experts to ensure that they understand the specific situation and optimization requirements of the abnormal parts; set a reasonable schedule for the optimization tasks, including start time, key milestones and estimated completion time.
[0166] Specifically, assume that three machining abnormal nodes are determined in step S162, and they are located at different positions of an aluminum alloy workpiece respectively: one is a sharp turn of the tool path, resulting in excessive cutting force; another is a sudden increase in cutting depth, resulting in too fast tool wear; and the other is that the tool vibrates when exiting the hole position, resulting in the surface roughness exceeding the standard.
[0167] Now, it is necessary to determine the machining abnormal parts according to these three abnormal nodes and trigger the optimization of the machining code. The information of all abnormal nodes was collected and organized into a list; then, referring to the three-dimensional model of the workpiece, the positional relationship of these nodes on the workpiece was analyzed; through comprehensive analysis, it was found that these three abnormal nodes are all concentrated in a complex structure area of the workpiece, and this area contains multiple hole positions and curved surfaces;
[0168] For this part of the machining anomaly, the following optimization strategies have been formulated: for sharp turns in the tool path, a smoother transition path is decided to be adopted to reduce sudden changes in cutting force; for the problem of sudden increase in cutting depth, the cutting parameters are planned to be adjusted, such as reducing the feed rate or increasing the number of cutting passes, to relieve the burden on the tool; for the vibration problem when the tool exits the hole position, some buffer instructions are considered to be added to the exit path, such as decelerating or changing the moving direction of the tool, to reduce vibration.
[0169] Furthermore, in the optimization of the machining code, local optimization is carried out on multiple such machining anomaly nodes, and the real-time form of the machining anomaly part is updated under the local optimization of the machining anomaly nodes. The optimized machining code is determined according to the real-time form of the machining anomaly part, the optimization progress of each such machining anomaly node, and the coherence of the machining code, and the optimized machining code is output based on a spreadsheet, realizing the interaction of the real-time form of the machining anomaly part, the optimization progress of each such machining anomaly node, and the coherence of the machining code, ensuring the accuracy of the optimized machining code.
[0170] At this time, a detailed analysis is carried out on each machining anomaly node determined in step S163, including its position, instruction type, cause of anomaly and its influence; for each anomaly node, specific optimization measures are formulated; this involves adjusting cutting parameters (such as feed rate, spindle speed), modifying the tool path, adding or reducing specific instructions, etc.; in the machining code, local modification is carried out on the corresponding anomaly nodes to implement the optimization measures; ensure that the modified code is compatible with other parts of the original code.
[0171] Run virtual machining simulation on the modified machining code to observe the real-time form change of the machining anomaly part; during the simulation process, closely monitor the cutting process of the machining anomaly part to ensure that the optimization measures effectively reduce the anomaly; iterate and optimize the simulation results as needed; record the real-time form data of the machining anomaly part during the simulation process, including key indicators such as cutting force, temperature, surface roughness, etc.
[0172] Evaluate the effect of the optimization measures according to the real-time form data of the machining anomaly part; ensure that the optimized code can significantly improve the machining quality and efficiency; check the optimized machining code to ensure its overall coherence; this includes checking the order of instructions, the consistency of parameters, and the overall logic of the code; finally determine: after confirming that the optimization measures are effective and the code coherence is correct, finally determine the optimized machining code; create a spreadsheet (such as Excel) to store the optimized machining code; import the optimized machining code into the spreadsheet to ensure that the code format is correct and easy to read; add necessary notes to the spreadsheet to explain the specific content, location and effect of the optimization measures; this helps with subsequent code review and maintenance.
[0173] Specifically, assume that in step S163, a machining abnormal part on the aluminum alloy workpiece is determined, and this part contains three machining abnormal nodes: one is that the sharp turn of the tool path causes excessive cutting force, another is that the uneven cutting depth causes tool wear, and the other is that the vibration when the tool exits causes the surface roughness to exceed the standard.
[0174] Local optimization:
[0175] For the sharp turn of the tool path, the tool path is adjusted to be smoother, reducing the sudden change of cutting force; for the problem of uneven cutting depth, the cutting parameters are optimized, such as reducing the feed rate and increasing the number of cutting passes to ensure that the cutting depth is more uniform; for the vibration when the tool exits, a deceleration instruction is added to the exit path to reduce vibration and improve the surface quality.
[0176] Running the virtual machining simulation on the modified machining code, it is found that the cutting process of the machining abnormal part becomes smoother, the cutting force and temperature are within a reasonable range, and the surface roughness is also significantly improved; after multiple iterations and optimizations, the effectiveness of the optimization measures is confirmed, and the coherence of the code is checked; finally, the optimized machining code is determined.
[0177] Please refer to Figure 8 , Figure 8 which is a schematic structural composition diagram of the spreadsheet-based machining code generation system in an embodiment of the present invention; the spreadsheet-based machining code generation system includes:
[0178] The machining filling area module 21 is used to determine the machining filling area based on the spreadsheet, the machining module, and the user's information;
[0179] The parameter selection bar module 22 is used to determine a plurality of parameter selection bars according to the machining filling area and the types of machining parameters;
[0180] The machining information module 23 is used to determine coherent machining information based on the machining parameters selected in each parameter selection bar, the information of the workpiece to be machined, and the information of the machine tool, and perform autonomous calibration on the machining information;
[0181] The machining code module 24 is used to generate the corresponding machining code according to the autonomously calibrated machining information and the machining program model, and this machining code is presented in the machining output column in the spreadsheet;
[0182] The virtual machining module 25 is used to determine the virtual machining of the workpiece to be machined based on the machining code, the solid model of the workpiece to be machined, and the virtual scene of the machine tool;
[0183] Optimization module 26 is configured to determine machining abnormal nodes of a workpiece to be machined based on real-time detection of virtual machining of the workpiece to be machined, and output optimized machining code based on local optimization of the machining abnormal nodes.
[0184] For any combination of the technical features of the above embodiments, for the sake of brevity of description, not all combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.
Claims
1. A method for generating machining codes based on electronic spreadsheets, characterized in that: include: Determining a machining filling area based on the electronic form, the machining module and the user's information includes: collecting the electronic form, and determining the corresponding plug-in space based on the plug-in detection of the electronic form; determining the corresponding machining module according to the plug-in space, the machining type and the model of the machine tool, at this time, the machining module is embedded in the electronic form in the form of a plug-in; determining the previous machining events based on the tracing of the user's information, and determining the machining filling area based on the electronic form, the machining module and the previous machining events, the machining filling area is used as a part of the electronic form, and the user is provided with parameters to fill in; Determine multiple parameter selection columns according to the machining filling area and the type of machining parameters; Determine coherent processing information based on the machining parameters selected in each parameter selection column, information of the workpiece to be processed and information of the machine tool, and autonomously calibrate the processing information; Generate corresponding machining codes according to the self-calibrated machining information and the machining program model, and the machining codes are presented in the machining output column in the electronic form; Determining virtual machining of the workpiece to be machined based on the machining code, the three-dimensional model of the workpiece to be machined, and the virtual scene of the machine tool; According to the real-time detection of virtual machining of the workpiece to be machined, a machining abnormal node of the workpiece to be machined is determined, and an optimized machining code is output based on local optimization of the machining abnormal node.
2. The method for generating machining codes based on electronic spreadsheet according to claim 1, characterized in that: The multiple parameter selection columns are determined according to the machining filling area and the machining parameter type, including: Collect the location of the machining filling area, and interact with the location of the machining filling area, the area of the machining filling area, and the type of machining parameters; The first selection column parameters are determined based on the location of the machining filling area and the area of the machining filling area, the second selection column parameters are determined based on the location of the machining filling area and the type of machining parameters, and multiple parameter selection columns are determined based on the first selection column parameters, the second selection column parameters and the machining filling area.
3. The method for generating machining codes based on electronic spreadsheet according to claim 1, characterized in that: The method of determining the coherent machining information based on the machining parameters selected in each parameter selection column, the information of the workpiece to be machined and the information of the machine tool, and autonomously calibrating the machining information includes: The user selects machining parameters for each parameter selection column in turn, and confirms the machining parameters selected for each parameter selection column; Acquire a three-dimensional model of the workpiece to be processed, and determine information of the workpiece to be processed according to the three-dimensional model of the workpiece to be processed, the material of the workpiece to be processed, and the shape of the workpiece to be processed; Determine the corresponding machine tool based on the equipment detection at the machining site and collect the information of the machine tool; Determining coherent machining information based on the interaction of the machining parameters selected in each parameter selection column, the information of the workpiece to be machined, and the information of the machine tool; The processing information is collected, and an abnormal field is determined according to the detection of the processing information, and an autonomous calibration of the processing information is triggered based on the abnormal field to output the processing information after autonomous calibration.
4. The method for generating machining codes based on electronic spreadsheet according to any one of claims 1 to 3, characterized in that: The corresponding machining code is generated according to the machining information after the self-calibration and the machining program model, and the machining code is presented in the machining output column in the electronic form, including: Determine a plurality of machining modules based on the tracing of the electronic form, and determine a machining program model based on multiple training of the plurality of machining modules; Associating the machining program model with the self-calibrated machining information, and dividing the self-calibrated machining information into a plurality of sub-machining information; Generate corresponding sub-machining codes based on the synchronous interaction of the plurality of sub-machining information and the machining program model, and generate corresponding machining codes based on the synthesis of the plurality of sub-machining codes; The machining output column in the spreadsheet is located, and the corresponding machining code is presented in the machining output column in the spreadsheet.
5. The method for generating machining codes based on electronic spreadsheet according to claim 1, characterized in that: The method of determining virtual machining of the workpiece to be machined based on the machining code, the three-dimensional model of the workpiece to be machined and the virtual scene of the machine tool comprises: Take multi-dimensional photos of the workpiece to be processed and output multiple images at different positions; Determine a three-dimensional model of the workpiece to be processed according to the plurality of images, the drawing of the workpiece to be processed, and the model of the workpiece to be processed; The model of the machine tool is collected, and the virtual scene of the machine tool is determined according to the model of the machine tool and the processing information of the workpiece to be processed.
6. The method for generating machining codes based on electronic forms according to claim 5, characterized in that: The method of determining virtual machining of the workpiece to be machined based on the machining code, the three-dimensional model of the workpiece to be machined and the virtual scene of the machine tool further includes: The machining code, the three-dimensional model of the workpiece to be machined and the virtual scene of the machine tool are interacted; and the virtual machining of the workpiece to be machined is determined based on the interaction of the machining code, the three-dimensional model of the workpiece to be machined and the virtual scene of the machine tool.
7. The method for generating machining codes based on electronic forms according to claim 1, characterized in that: The method of determining the abnormal machining node of the workpiece to be machined according to the real-time detection of the virtual machining of the workpiece to be machined, and outputting the optimized machining code based on the local optimization of the abnormal machining node, comprises: Perform real-time detection on the virtual processing of the workpiece to be processed and output the corresponding abnormal area; The machining abnormal node of the workpiece to be machined is determined according to the position of the abnormal area and the field of the machining code corresponding to the abnormal area.
8. The method for generating machining codes based on electronic forms according to claim 7, characterized in that: The method of determining the abnormal machining node of the workpiece to be machined according to the real-time detection of the virtual machining of the workpiece to be machined, and outputting the optimized machining code based on the local optimization of the abnormal machining node, further includes: If the workpiece to be processed has multiple machining abnormal nodes, the corresponding machining abnormal parts are determined according to the multiple machining abnormal nodes and the shape of the workpiece to be processed, and the optimization of the machining code is triggered according to the machining abnormal parts; In the optimization of the machining code, multiple machining abnormal nodes are locally optimized, and the real-time form of the machining abnormal part is updated under the local optimization of the machining abnormal node. The optimized machining code is determined according to the real-time form of the machining abnormal part, the optimization progress of each machining abnormal node and the continuity of the machining code, and the optimized machining code is output based on a spreadsheet.
9. A system for generating machining codes based on electronic spreadsheets, characterized in that: The electronic form-based machining code generation system is applied to the electronic form-based machining code generation method as claimed in any one of claims 1 to 8, and the electronic form-based machining code generation system comprises: The machining filling area module is used to determine the machining filling area based on the electronic form, the machining module and the user's information, including: collecting the electronic form, and determining the corresponding plug-in space based on the plug-in detection of the electronic form; determining the corresponding machining module according to the plug-in space, the machining type and the model of the machine tool, at this time, the machining module is embedded in the electronic form in the form of a plug-in; determining the previous machining events based on the tracing of the user's information, and determining the machining filling area based on the electronic form, the machining module and the previous machining events, and the machining filling area is used as a part of the electronic form for the user to fill in parameters; A parameter selection bar module is used to determine multiple parameter selection bars according to the machining filling area and the machining parameter type; A processing information module, used to determine coherent processing information based on the machining parameters selected in each parameter selection column, information of the workpiece to be processed and information of the machine tool, and to autonomously calibrate the processing information; A machining code module, used for generating corresponding machining codes according to the machining information after self-calibration and the machining program model, and the machining codes are presented in the machining output column in the electronic form; A virtual machining module, used for determining virtual machining of the workpiece to be machined based on the machining code, the three-dimensional model of the workpiece to be machined and the virtual scene of the machine tool; The optimization module is used to determine the abnormal machining node of the workpiece to be processed according to the real-time detection of the virtual machining of the workpiece to be processed, and output the optimized machining code based on the local optimization of the abnormal machining node.
Citation Information
Patent Citations
High-speed precision machining system and method for complex curved surface machining
CN111413923A
Automatic checking method, device and equipment for numerical control machine tool code and storage medium
CN115994099A