Online teaching method and system suitable for laser cutting
Through the G-code cutting file and real-time feedback mechanism based on the blank theoretical model, the deviation of the laser cutting system is automatically adjusted, which solves the problems of low efficiency and insufficient accuracy of traditional laser cutting systems when facing errors, and achieves an efficient and accurate cutting process.
Patent Information
- Application Number
- CN202510619756.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-26
AI Technical Summary
When traditional laser cutting systems face problems such as blank placement errors, material deformation and machine accuracy, they cannot adjust in real time, resulting in cutting errors and low efficiency, requiring manual intervention or rewriting of programs.
The G-code cutting file generated based on the blank theory model is adopted, combined with the real-time feedback mechanism, and online teaching methods and systems are provided. By pausing, positioning and modifying deviations, the cutting path is automatically adjusted, and manual operations or modification of G-code instructions are supported to simplify the operation process.
Real-time detection and correction of deviations during laser cutting process is realized, processing accuracy and efficiency is improved, operating procedures are simplified, and manual intervention and errors are reduced.
Smart Images

Figure CN120533302A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of laser cutting technology, and in particular to an online teaching method and system suitable for laser cutting. Background Art
[0002] Laser cutting technology is widely used in the precision machining of materials such as metals, plastics, and ceramics. With the advancement of industrial automation, traditional cutting methods are gradually evolving towards intelligent and automated methods. To improve machining accuracy and efficiency, laser cutting systems typically rely on G-code (CNC code) for control. G-code is generated by the cutting program and is used to guide the motion of the laser cutting head.
[0003] During the actual cutting process, factors such as blank placement errors, material deformation, and machine accuracy can lead to deviations between the theoretical cutting point and the actual cutting position. Traditional laser cutting systems often require manual intervention to correct these deviations. However, traditional methods often cannot make real-time adjustments or require manual reprogramming of the cutting program, resulting in low efficiency and prone to errors.
[0004] The present invention introduces a G-code cutting file generated based on a theoretical model of the blank, and combines it with a real-time feedback mechanism and automated adjustment means to provide an online teaching method and system, which can automatically pause, locate and modify deviations during the actual cutting process to ensure the accuracy of the cutting path, while simplifying the operation process and improving cutting efficiency. Summary of the Invention
[0005] Based on the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide an online teaching method and system suitable for laser cutting to solve the above-mentioned technical problems.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an online teaching method suitable for laser cutting, comprising:
[0007] S1: Run the G-code cutting file generated based on the theoretical model of the blank, pause and record the line number at the deviation between the theoretical cutting point and the actual cutting position, select the preset operation mode for adjustment according to the displayed data, and after the adjustment is completed, the edited data will overwrite the original file and reload it. The preset operation mode includes manually moving the cutting head and recording the real-time coordinates and modifying the positioning / interpolation instructions or macro program call parameters in the G-code;
[0008] Or S2: Enter the cutting program and set the cutting parameters in the software editing interface. The cutting parameters include cutting speed and process type, and move the cutting head to the specified position to execute the cutting instructions. By inserting relevant instructions and macro programs in the display list, complete the definition and editing of each cutting contour and generate a G-code program.
[0009] The present invention is further configured such that S1 specifically includes:
[0010] S11: Run the G-code cutting file generated based on the blank theoretical model;
[0011] S12: When the deviation between the theoretical cutting point and the actual cutting position exceeds the threshold, the processing is paused and the current line number is recorded;
[0012] S13: Read the file and locate the record line and display the current line data;
[0013] S14: Modify the positioning / interpolation instruction data by manually inputting the offset or repositioning the cutting head;
[0014] S15: Modify the calling parameters of the encapsulated processing graphics macro program calling instruction;
[0015] S16: Confirm the modification and overwrite the original file data.
[0016] The present invention is further configured such that the data displayed in step S13 includes G-code positioning / interpolation instruction data or encapsulated processing graphics macro program calling instructions.
[0017] The present invention is further configured such that the macro program is an independent .CNC or .NC file, is called via the G65P_A_B_C_I_J_K... format, and parameter transfer follows macro program variable mapping rules.
[0018] The present invention is further configured such that S2 specifically includes:
[0019] S21: Create a blank editing interface and insert the program header macro;
[0020] S22: Move the cutting head to record the coordinates of the contour points and insert corresponding instructions;
[0021] S23: insert cutting speed parameters and process macro program at the designated position;
[0022] S24: Insert the cutting end macro program after completing the contour;
[0023] S25: Loop to generate multi-contour paths until all contours are loaded;
[0024] S26: Output the complete G code program after real-time preview confirmation.
[0025] The present invention is further configured such that the corresponding instruction types include G-code positioning / interpolation instructions and graphic instructions.
[0026] The present invention is further configured such that step S22 specifically includes:
[0027] Directly insert the current coordinates when clicking the positioning command;
[0028] When you click on a graphic instruction, a parameter configuration interface pops up. The graphic instruction is a pre-packaged graphic macro file.
[0029] Automatically optimize the number of path points when continuously collecting points.
[0030] The present invention is further configured such that the program header macro is only inserted into the first line of the file; the speed parameters, process macro and end macro are inserted at positions determined according to the selected line position, and are inserted at the end by default when not selected.
[0031] The present invention is further configured so that all instruction data in the generated G-code program supports secondary editing operations, including deleting specified lines, modifying positioning / interpolation instruction coordinate values, and adjusting macro program call parameters. The secondary editing operation retains the original instruction type and only modifies the parameter value.
[0032] The present invention also provides an online teaching system suitable for laser cutting, the system comprising:
[0033] Real-time adjustment module: Runs the G-code cutting file generated based on the theoretical model of the blank, pauses and records the line number at the deviation between the theoretical cutting point and the actual cutting position, and selects the preset operation mode for adjustment based on the displayed data. After the adjustment is completed, the edited data will overwrite the original file and be reloaded. The preset operation mode includes manually moving the cutting head and recording the real-time coordinates and modifying the positioning / interpolation instructions or macro program call parameters in the G-code;
[0034] Cutting program editing and generation module: used to input cutting programs and set cutting parameters in the software editing interface. The cutting parameters include cutting speed and process type, and move the cutting head to the specified position to execute the cutting instructions. By inserting relevant instructions and macro programs in the display list, the definition and editing of each cutting contour are completed and the G-code program is generated.
[0035] The present invention provides an online teaching method and system suitable for laser cutting. The method comprises the following steps: S1: running a G-code cutting file generated based on a theoretical model of a blank, pausing and recording a line number at a deviation between a theoretical cutting point and an actual cutting position, selecting a preset operation mode for adjustment according to displayed data, overwriting the original file with the edited data after the adjustment is completed, and reloading the data, wherein the preset operation mode includes manually moving a cutting head and recording real-time coordinates and modifying positioning / interpolation instructions or macro program call parameters in the G-code; or S2: inputting a cutting program and setting cutting parameters in a software editing interface, wherein the cutting parameters include a cutting speed and a process type, and moving the cutting head to a specified position to execute the cutting instruction. By inserting relevant instructions and macro programs in a display list, the definition and editing of each cutting contour are completed, and a G-code program is generated. The beneficial effects produced include:
[0036] 1. Real-time deviation adjustment: By running the G-code cutting file generated based on the theoretical model of the blank, the deviation between the theoretical cutting point and the actual cutting position can be detected in real time during the cutting process, and the machine will automatically pause and record the line number according to the preset operation mode, avoiding cutting errors caused by failure to adjust the deviation in time and ensuring processing accuracy;
[0037] 2. Flexible adjustment methods: Two adjustment methods are provided, namely, manually moving the cutting head and recording real-time coordinates, or modifying the positioning / interpolation instructions in the G code or macro program call parameters. The most appropriate adjustment method can be selected according to different cutting requirements and actual conditions;
[0038] 3. Simplify the operation process: In the software editing interface, users can easily input cutting programs, set cutting parameters, define cutting contours and generate G-code programs, reducing the complexity of manual writing and modification of G-codes, lowering the difficulty of operation, and supporting secondary editing functions, so users can flexibly modify existing cutting programs.
[0039] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. In the drawings:
[0041] Figure 1An online modification flow chart of an online teaching method applicable to laser cutting is shown as an exemplary embodiment of the present invention;
[0042] Figure 2 A flow chart of generating a G-code file for an online teaching method suitable for laser cutting is shown as an exemplary embodiment of the present invention;
[0043] Figure 3 It is the operation flow chart of teaching modification points;
[0044] Figure 4 Generate G-code file operation flow chart for teaching;
[0045] Figure 5 Edit the boundary diagram for teaching modification points;
[0046] Figure 6 Generate G code file interface for teaching;
[0047] Figure 7 It is the interface for teaching cutting speed setting;
[0048] Figure 8 Set up the interface for teaching process;
[0049] Figure 9 It is the interface for setting parameters of teaching cutting graphics;
[0050] Figure 10 The figure is a schematic structural diagram of an online teaching system suitable for laser cutting, showing an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0051] The following describes the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art will readily appreciate the other advantages and benefits of the present invention from the disclosure herein. The present invention may also be implemented or applied through various other specific embodiments, and the various details in this specification may be modified or altered based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are intended only to illustrate the present invention and are not intended to limit the scope of protection of the present invention.
[0052] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.
[0053] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention.
[0054] Example 1
[0055] An online teaching method suitable for laser cutting, such as Figure 1 、 2 Shown, including:
[0056] S1: Run the G-code cutting file generated based on the theoretical model of the blank, pause and record the line number at the deviation between the theoretical cutting point and the actual cutting position, select the preset operation mode for adjustment according to the displayed data, and after the adjustment is completed, the edited data will overwrite the original file and reload it. The preset operation mode includes manually moving the cutting head and recording the real-time coordinates and modifying the positioning / interpolation instructions or macro program call parameters in the G-code;
[0057] Or S2: Enter the cutting program and set the cutting parameters in the software editing interface. The cutting parameters include cutting speed and process type, and move the cutting head to the specified position to execute the cutting instructions. By inserting relevant instructions and macro programs in the display list, complete the definition and editing of each cutting contour and generate a G-code program;
[0058] Specifically, the G-code cutting file generated based on the theoretical model of the blank is run, and the G-code cutting file is automatically generated according to the pre-set theoretical model of the blank, including material shape, size and cutting path, etc. The G-code file contains instructions to control the cutting head to move along a specific path during the work process; during the cutting process, when the deviation between the theoretical cutting point and the actual cutting position exceeds the set processing accuracy range, the processing process is automatically paused. The pause operation helps to adjust the cutting path in time to avoid error accumulation or inaccurate cutting; the current G-code file line number when the deviation occurs is recorded, so that it is convenient to return to the position where the deviation occurs for adjustment in subsequent operations to ensure the accuracy of the modification; based on the recorded data, one of the two preset operation methods can be selected to adjust the deviation, manually move the cutting head and record the real-time coordinates and modify the positioning / interpolation instructions or macro program call parameters in the G-code; after the adjustment is completed, the relevant line data in the original G-code file will be overwritten and reset The newly loaded updated file ensures the accuracy of the cutting program and enables the modifications to take effect immediately; enter the cutting program through the software interface, set the cutting parameters, including cutting speed and process type, and control the movement of the cutting head; enter the detailed cutting program in the software interface, including specifying the cutting speed and process type parameters, which will affect the speed, accuracy and quality of the cutting process; specify the starting position of the cutting head in the software interface, and instruct the cutting head to move to the specified position and start the cutting operation by entering the cutting instruction; provide a display list, in which different instructions and macro programs can be inserted; by gradually inserting instructions in the display list, complete the definition of the cutting contour, which may include multiple cutting paths, and the start and end points, cutting method and other information of each path can be adjusted; after the contour definition is completed, a G-code program will be automatically generated, which includes all the movement instructions of the cutting head to ensure the correctness of the cutting path and cutting parameters.
[0059] The present invention is further configured such that the S1 operation process is as follows Figure 3 Specifically shown include:
[0060] S11: Run the G-code cutting file generated based on the blank theoretical model. Specifically, a G-code file is automatically generated based on the blank theoretical model. The blank theoretical model includes the size, shape and cutting path of the material. The file contains all the cutting instructions that need to be executed. These instructions will control the motion path and cutting parameters of the laser cutting machine to ensure that the processing can be carried out according to the predetermined plan.
[0061] S12: When the deviation between the theoretical cutting point and the actual cutting position exceeds a threshold, the processing is paused and the current line number is recorded. Specifically, during the processing, the deviation between the theoretical cutting point and the actual cutting position is monitored. When the deviation exceeds the set allowable error threshold, the cutting operation is automatically paused and the G code line number when the deviation occurs is recorded for subsequent positioning and adjustment.
[0062] S13: Read the file and locate the record line and display the current line data; specifically, when the cutting is paused, read and locate the recorded G code line number, and display the data of the line on the display interface. The data includes positioning instructions / interpolation instructions or encapsulated macro program call instructions, which provides clear reference information for subsequent adjustments. The display interface is as follows: Figure 5 As shown;
[0063] S14: Modify the positioning / interpolation instruction data by manually inputting an offset or repositioning the cutting head. Specifically, when there is a deviation in the positioning or interpolation data, the user can choose to manually input an offset or reposition the cutting head to make corrections.
[0064] S15: Modifying the calling parameters of the encapsulated processing graphic macro program calling instruction; specifically, in certain cases, the cutting path is completed by calling the encapsulated processing graphic macro program. The macro program is usually a predefined set of cutting instructions that can simplify the generation of complex paths. If deviations occur, the calling parameters of the macro program can be modified to adjust the path or other processing parameters to meet actual processing needs;
[0065] S16: Confirm the modification and overwrite the original file data; after the user completes the adjustment, the system will confirm the modification and overwrite the original G code file with the modified data, ensuring the update of the file. By reloading the new data, the cutting process can continue based on the modified file.
[0066] The present invention is further configured such that the data displayed in step S13 includes G-code positioning / interpolation instruction data or encapsulated processing graphics macro program call instructions; specifically, the positioning instructions in the G-code control the movement trajectory of the laser cutting machine, and the positioning instructions include G00 and G01. The positioning instructions generally include coordinate positions, such as X, Y, and Z coordinates, and other states of the cutting head, such as angle or depth. For example, G01X100Y100Z0.5F200 means that the cutting head moves from the current position to the point X=100, Y=100, Z=0.5 along a straight line, and the cutting speed is 200; the interpolation instruction is used to determine the continuity and accuracy of the path and control the movement mode of the cutting head. Interpolation is usually implemented by an interpolation algorithm, which includes linear interpolation and circular interpolation. The purpose is to make the cutting head move smoothly along the specified path. For example, G02X50Y50I25J25 means that the cutting head moves along an arc path from the current point to the coordinates of X=50, Y=50, and the offset of the center of the circle is I=25, J=25; in step S13, when the cutting is paused, the positioning and interpolation instruction data will be displayed on the user interface, so that the user can clearly see the current position, movement path and cutting requirements of the cutting head, and can adjust the movement mode and path of the cutting head according to these data to correct the actual deviation; in laser cutting, some complex cutting paths and operations, such as specific graphic shapes or process parameters, can be It is encapsulated by a macro program. A macro program is a predefined instruction set that simplifies the input of repetitive operations and makes the operation more efficient. For example, a user can perform complex cutting operations by calling a packaged macro program without having to manually enter each instruction. Macro programs are usually activated using a specific calling format, such as G65Pxxxx. For example, G65P8500A30B100C200 may mean calling a macro program numbered 8500 and passing A=30, B=100, and C=200 as parameters. The called macro program contains actual G code instructions, which will be executed during the cutting process and determine parameters such as the cutting path and speed. In step S13, when the cutting is paused and the current line data is displayed, the packaged processing graphics macro program call instruction will also be displayed. The user can see the currently executing macro program and its passed parameters, and adjust the macro program call or parameters as needed, providing the user with a more flexible control method and being able to accurately correct or adjust the cutting path, speed and process.
[0067] The present invention is further configured such that the macro program is an independent .CNC or .NC file, which is called in the format of G65P_A_B_C_I_J_K..., and parameter transfer follows the macro program variable mapping rules; specifically, .CNC or .NC files are universal numerical control file formats, which are used to store cutting instructions required for numerical control machine tools, such as laser cutting machines. The files usually contain multiple G-code instructions for controlling the movement, processing path, speed, process, etc. of the cutting head. As a specific numerical control program, the macro program performs complex operations through these instructions; its parameters are transferred by calling G65P_A_B_C_I_J_K..., and the parameter transfer method complies with the macro program parameter transfer rules, such as G65P8500A30.C2.I30.J90.K0.I0.2J9101., G65 represents the instruction for calling the macro program, G Instruction 65 is a commonly used "macro call instruction", indicating that the CNC system needs to execute a macro program. P8500 represents the number of the macro program to be called, A30 represents #1=30 in the 8500 macro program, C2 represents #3=2 in the 8500 macro program, I30 represents #4=30 in the 8500 macro program, J90 represents #5=90 in the 8500 macro program, K0 represents #6=0 in the 8500 macro program, I0.2 represents #7=0.2 in the 8500 macro program, and J9101 represents #8=9101 in the 8500 macro program. After the above parameters are passed to the macro program, the macro program will perform specific operations or calculations based on these parameters. In this way, users can flexibly modify the input of the macro program without modifying the content of the macro program itself. The order and type of parameter passing must be consistent with the predefined rules of the macro program.
[0068] The present invention is further configured such that the S2 operation process is as follows Figure 4 Specifically shown include:
[0069] S21: Create a blank editing interface and insert a program header macro program; specifically, in the software system, a new cutting program editing window is opened, providing a blank interface for inputting and editing G codes. In the blank editing interface, the software system automatically inserts a program header macro program. The macro program is usually the beginning of the cutting program and is responsible for setting the initial state of the cutting machine. The program header macro program may include laser cutting switch control, cutting machine state setting, and work coordinate system setting.
[0070] S22: Move the cutting head to record the coordinates of the contour points and insert corresponding instructions. Specifically, the user can manually or automatically guide the cutting head to move along the path to be cut and record the coordinates of each contour point. When the cutting head passes each contour point, the software system automatically generates a G-code instruction corresponding to the point and inserts it into the program. The G-code instructions here include positioning and interpolation instructions, which are used to control how the laser cutting machine moves along the path.
[0071] S23: Insert cutting speed parameters and process macro program at the specified position; Specifically, in the cutting process, cutting speed is a key process parameter that determines the accuracy and efficiency of laser cutting. The software system allows users to specify the cutting speed parameters of certain positions in the program, usually controlled by the F parameter in the G code. The speed parameter setting interface is as follows: Figure 7 As shown in the figure, specific processes may be used in the cutting process, including switching laser and coolant control. The software system allows users to insert process macro programs and execute corresponding process steps by calling pre-defined macro programs. The process parameter setting interface is shown in the figure. Figure 8 As shown;
[0072] S24: inserting a cutting end macro program after completing the contour; specifically, when the cutting program completes cutting a certain contour, the software system will automatically determine and end the definition of the current contour. Each contour may be composed of multiple path points. The software system needs to ensure that the G code instructions of all path points have been inserted. When the cutting of a contour is completed, the software system will insert a "cutting end" macro program. This macro program usually includes operations such as stopping the laser, returning to the starting position, and shutting down the cutting machine to ensure the smooth completion of the cutting process and the return of the equipment to a safe state.
[0073] S25: Loop to generate multiple contour paths until all contours are loaded; specifically, steps S22 to S24 describe the cutting process of a contour, and the software system will continue to process the next contour after each contour is completed until all cutting contours are loaded into the program;
[0074] S26: Output the complete G-code program after real-time preview confirmation; specifically, the real-time preview includes path simulation and collision detection functions; after the user completes editing the cutting program, the software system will provide a real-time preview function to display the complete cutting path and simulate the motion trajectory of the cutting head, so that the user can check whether the cutting path meets the requirements, whether there are any misoperations or path deviations, whether there are any redundant paths or unreasonable paths, etc.; through path simulation, the user can see the expected motion path of the laser cutting head on the software interface, which helps to confirm the correctness of the cutting path and avoid errors during actual cutting; during the preview process, the software system will also perform collision detection to check whether the cutting head may collide with the workpiece or machine tool. Through collision detection, the user can promptly discover potential safety hazards or path design problems to avoid damage to the equipment or poor cutting effects; after confirming that the preview is correct, the user can click the "Confirm" button, and the software system will generate and output a complete G-code cutting program. All cutting paths, parameters and macro programs are integrated into a complete cutting program that can be directly used for cutting on a laser cutting machine.
[0075] The present invention is further configured such that the corresponding instruction types include G-code positioning / interpolation instructions and graphic instructions; specifically, the positioning instructions in the G-code are used to control the precise movement of the cutting head; the interpolation instructions are used to automatically generate a path based on a given starting point and end point; and the graphic instructions refer to the use of encapsulated macro programs to achieve complex graphic shape cutting, which are used to automatically generate specific graphic paths during the cutting process, such as circles, rectangles, and complex contours, without the need for the user to manually write each G-code instruction.
[0076] The present invention is further configured such that step S22 specifically includes:
[0077] Clicking the positioning command directly inserts the current coordinates. Specifically, the positioning command is used to control the precise movement of the laser cutting head. When the user clicks the positioning command button on the interface, the software system will obtain the current position coordinates of the cutting head, and the coordinates will be automatically inserted into the generated G code. The command will control the cutting machine to quickly locate from the current position or cut at a specified speed.
[0078] When you click on a graphic instruction, a parameter configuration interface pops up. The graphic instruction is a pre-packaged graphic macro file. Specifically, when the user selects a graphic instruction, the software system pops up a parameter configuration interface. The user enters parameters such as the size, position, and direction of the graphic. The software system generates a corresponding macro program based on these parameters and inserts it into the G code to achieve cutting tasks of different sizes and shapes. The graphic parameter configuration interface is as follows: Figure 9 As shown;
[0079] Automatically optimize the number of path points when continuously collecting points; specifically, path point optimization means that when continuously collecting cutting path points, the software system automatically optimizes the number of path points based on the multiple points that have been collected. By automatically optimizing the number of path points, the cutting process is ensured to be more efficient, while reducing unnecessary calculations and movements, making the cutting process more accurate and energy-saving.
[0080] The present invention is further configured such that the program header macro is only inserted into the first line of the file; the speed parameters, process macros and end macros are inserted at a position determined by the selected line position, and are inserted at the end by default when not selected; specifically, the program header macro is the beginning part of the program, and it will only be inserted into the first line of the G-code file, usually used to initialize the cutting process and define some basic parameters or preset instructions; the insertion position of the speed parameters, process macros and end macros is determined according to the specific line selected by the user in the program. When the user does not select a specific line, these instructions will be inserted at the end of the G-code file by default, which can ensure that the settings of parameters such as speed and process during the cutting process do not affect the execution order of other instructions.
[0081] The present invention is further configured so that all instruction data in the generated G-code program supports secondary editing operations, including deleting specified lines, modifying positioning / interpolation instruction coordinate values, and adjusting macro program call parameters. The secondary editing operation retains the original instruction type and only modifies the parameter value. Specifically, the generated G-code program is not a file that is generated and executed once. The user can modify and adjust it after generation. The secondary editing operation enables the user to flexibly adjust the existing G-code. When the user performs secondary editing, the instruction type in the G-code, such as positioning / interpolation instructions and macro program call instructions, will not change. Only the parameter value in the instruction will be modified, reducing unnecessary complexity.
[0082] Example 2
[0083] See also Figure 2 , the exemplary online teaching system suitable for laser cutting includes:
[0084] Real-time adjustment module: Runs the G-code cutting file generated based on the theoretical model of the blank, pauses and records the line number at the deviation between the theoretical cutting point and the actual cutting position, and selects the preset operation mode for adjustment based on the displayed data. After the adjustment is completed, the edited data will overwrite the original file and be reloaded. The preset operation mode includes manually moving the cutting head and recording the real-time coordinates and modifying the positioning / interpolation instructions or macro program call parameters in the G-code;
[0085] Cutting program editing and generation module: used to input cutting programs and set cutting parameters in the software editing interface. The cutting parameters include cutting speed and process type, and move the cutting head to the specified position to execute the cutting instructions. By inserting relevant instructions and macro programs in the display list, the definition and editing of each cutting contour are completed and the G-code program is generated.
[0086] It should be noted that the online teaching system for laser cutting provided in the above embodiment and the online teaching method for laser cutting provided in the above embodiment are of the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here. In actual applications, the online teaching system for laser cutting provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the system into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0087] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0088] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.
[0089] In this application, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.
[0090] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0091] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0092] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0093] In the several embodiments provided in this application, it should be understood that the disclosed system can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0094] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0095] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0096] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0097] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. An online teaching method suitable for laser cutting, characterized in that: include: S1: Run the G-code cutting file generated based on the theoretical model of the blank, pause and record the line number at the deviation between the theoretical cutting point and the actual cutting position, select the preset operation mode for adjustment according to the displayed data, and after the adjustment is completed, the edited data will overwrite the original file and reload it. The preset operation mode includes manually moving the cutting head and recording the real-time coordinates and modifying the positioning / interpolation instructions or macro program call parameters in the G-code; Or S2: Enter the cutting program and set the cutting parameters in the software editing interface. The cutting parameters include cutting speed and process type, and move the cutting head to the specified position to execute the cutting instructions. By inserting relevant instructions and macro programs in the display list, complete the definition and editing of each cutting contour and generate a G-code program.
2. The online teaching method for laser cutting according to claim 1, characterized in that: Said S1 specifically includes: S11: Run the G-code cutting file generated based on the blank theoretical model; S12: When the deviation between the theoretical cutting point and the actual cutting position exceeds the threshold, the processing is paused and the current line number is recorded; S13: Read the file and locate the record line and display the current line data; S14: Modify the positioning / interpolation instruction data by manually inputting the offset or repositioning the cutting head; S15: Modify the calling parameters of the encapsulated processing graphics macro program calling instruction; S16: Confirm the modification and overwrite the original file data.
3. The online teaching method for laser cutting according to claim 2, characterized in that: The data displayed in step S13 includes G-code positioning / interpolation instruction data or encapsulated processing graphics macro program calling instructions.
4. The online teaching method for laser cutting according to claim 2, characterized in that: The macro program is an independent .CNC or .NC file, which is called through the G65P_A_B_C_I_J_K... format, and parameter transfer follows the macro program variable mapping rules.
5. The online teaching method for laser cutting according to claim 1, characterized in that: The S2 specifically includes: S21: Create a blank editing interface and insert the program header macro; S22: Move the cutting head to record the coordinates of the contour points and insert corresponding instructions; S23: insert cutting speed parameters and process macro program at the designated position; S24: Insert the cutting end macro program after completing the contour; S25: Loop to generate multi-contour paths until all contours are loaded; S26: Output the complete G code program after real-time preview confirmation.
6. The online teaching method for laser cutting according to claim 5, characterized in that: The corresponding instruction types include G-code positioning / interpolation instructions and graphic instructions.
7. The online teaching method for laser cutting according to claim 5, characterized in that: Step S22 specifically includes: Directly insert the current coordinates when clicking the positioning command; When you click on a graphic instruction, a parameter configuration interface pops up. The graphic instruction is a pre-packaged graphic macro file. Automatically optimize the number of path points when continuously collecting points.
8. The online teaching method for laser cutting according to claim 5, characterized in that: The program header macro is only inserted in the first line of the file; the speed parameter, process macro and end macro are inserted according to the selected line position. If no selection is made, they are inserted at the end by default.
9. The online teaching method for laser cutting according to claim 1, characterized in that: All instruction data in the generated G-code program supports secondary editing operations, including deleting specified lines, modifying positioning / interpolation instruction coordinate values, and adjusting macro program call parameters. The secondary editing operation retains the original instruction type and only modifies the parameter value.
10. An online teaching system suitable for laser cutting, used to implement the online teaching method suitable for laser cutting according to any one of claims 1 to 9, characterized in that: include: Real-time adjustment module: Runs the G-code cutting file generated based on the theoretical model of the blank, pauses and records the line number at the deviation between the theoretical cutting point and the actual cutting position, and selects the preset operation mode for adjustment based on the displayed data. After the adjustment is completed, the edited data will overwrite the original file and be reloaded. The preset operation mode includes manually moving the cutting head and recording the real-time coordinates and modifying the positioning / interpolation instructions or macro program call parameters in the G-code; Cutting program editing and generation module: used to input cutting programs and set cutting parameters in the software editing interface. The cutting parameters include cutting speed and process type, and move the cutting head to the specified position to execute the cutting instructions. By inserting relevant instructions and macro programs in the display list, the definition and editing of each cutting contour are completed and the G-code program is generated.
Citation Information
Cited By
Three-dimensional laser scribing and primary flanging convex hole manufacturing method for spaceflight top cover
CN121571854A