Implementation method and equipment for low-speed cutter lifting and retracting and medium
By analyzing and configuring the processing files and code segment instructions of the laser cutter, the process of starting and retracting the knife at a slow speed is realized, which solves the problem of smooth transition between the starting and retracting process and the contour processing process, and improves the processing accuracy and efficiency.
Patent Information
- Application Number
- CN202411454158.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-01-21
AI Technical Summary
In the contour processing process of laser cutters, the transformation of the cutting and cutting processes and the contour processing process is not smooth enough, resulting in improper process parameters and affecting the processing effect.
By obtaining and analyzing the processing files of the laser cutter, identifying the code segment instructions, statistically the total length of the processing contour, determine the current execution phase, and configure the process parameters according to status variables and judgment conditions to achieve the process of slowing the knife.
It improves the accuracy and stability of the processing process, reduces cutting impact and vibration caused by rapid exit or emergency stop, and improves processing quality and efficiency.
Smart Images

Figure CN119335951A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital control technology, and in particular to a method, device and medium for implementing slow knife raising and lowering. Background Art
[0002] In the CNC system, the processing of the contour of the graphic element generally needs to go through three stages: the contour processing start section, the contour processing middle section and the contour processing end section. In the contour processing middle section, the light path and airflow are relatively stable, which will have a relatively ideal processing effect. However, there are often some abnormal problems in the contour processing start section and the contour processing end section, such as the light path and airflow instability in the contour processing start section leading to incomplete cutting and the slag caused by excessive temperature in the contour processing end section. Therefore, the process control of the start and end of the knife realization process during the contour processing of the laser cutter affects the processing effect.
[0003] At present, in order to solve the problem of unstable light path and airflow in the contour processing process, a lower initial cutting speed is generally set automatically or manually according to the characteristics, thickness and complexity of the processing material. This speed is set slow enough to ensure that the laser beam can stably penetrate the surface of the material and avoid the phenomenon of incomplete cutting due to too fast speed. In the contour processing stage, advanced sensors and algorithms are used to monitor the processing quality in real time, such as cutting depth, edge roughness, etc., and automatically adjust the process parameters according to the monitoring results to ensure the best processing effect. In the knife closing stage, some special processing strategies are introduced, such as increasing the flow rate of cooling gas, changing the scanning path of the laser beam, etc., to further optimize the knife closing effect. However, the existing process generally optimizes the processing effect by adjusting parameters, without considering the transformation process of the knife starting process, knife closing process and contour processing process, which makes it difficult to smoothly complete the processing of each workpiece based on the instruction processing process alone, which is easy to cause the knife starting process to be too long and too low or the knife closing process to be too long and too low, which leads to the use of process parameters that do not belong to the processing stage, resulting in poor processing effect. Summary of the invention
[0004] In order to solve the above technical problems, one or more embodiments of the present specification provide a method, device and medium for implementing slow knife raising and lowering.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of this specification provide a method for implementing slow knife raising and lowering, the method comprising:
[0007] Obtaining a processing file corresponding to the task to be processed by the current laser cutter, parsing the content of the processing file, and obtaining the code segment instructions contained in the processing file;
[0008] Identify the content of each of the code segment instructions, obtain the contour code segment instruction, and perform statistics on the total length of the processing contour corresponding to the task to be processed based on the contour code segment instruction;
[0009] Determine the current execution stage of the task to be processed based on the state variable and type corresponding to the contour code segment instruction, and configure the process parameters corresponding to the current execution stage based on the setting process corresponding to the current execution stage;
[0010] The configured contour code segment instructions are converted into motion instructions that can be recognized by the motion control layer to complete the slow tool starting and closing process of the task to be processed.
[0011] Optionally, in one or more embodiments of the present specification, obtaining a processing file corresponding to a task to be processed by the current laser cutter to parse the content of the processing file and obtain the code segment instructions contained in the processing file specifically includes:
[0012] Acquire the processing file of the task to be processed by the current laser cutter based on the designated storage location to read the content information of the processing file; wherein the content information includes: a contour start mark, a contour end mark and contour trajectory instruction information;
[0013] Reading the content information line by line to identify the code segment instruction data structure contained in the content information according to the field identifier of each line of the content information;
[0014] Based on the type identifier of the code segment instruction data structure, identifying the type of the code segment instruction; wherein the type identifier includes: a contour start identifier, a straight line segment identifier, an arc segment identifier, and a contour end identifier;
[0015] According to the code segment instruction data structure, the processing information contained in each type of code segment instruction is determined so as to realize the processing of each type of code segment instruction process.
[0016] Optionally, in one or more embodiments of the present specification, identifying the content of each of the code segment instructions, obtaining the contour code segment instruction, and performing statistics on the total length of the machining contour corresponding to the task to be processed based on the contour code segment instruction, specifically includes:
[0017] Determine a cache start position and a cache end position of the code segment instruction according to the type identifier of the code instruction, so as to cache the code segment instruction between the cache start position and the cache end position as the outline code segment instruction into an instruction queue;
[0018] Initializing a variable of the total length of the machining contour, traversing the instruction queue to sequentially obtain contour code segment instructions in the instruction queue as current contour code segment instructions;
[0019] Determining a corresponding length addition strategy according to the type of the current contour code segment instruction, and adding the length of the current contour code segment instruction to the variable of the total length of the machining contour based on the corresponding length addition strategy;
[0020] Looping the addition of the variable of the total length of the machining contour to obtain the total length of the machining contour counted by the variable of the total length of the machining contour;
[0021] The corresponding setting parameters are determined according to the type of the current contour code segment instruction to perform a second traversal of the instruction queue, and the total length of the machining contour is assigned to each contour code segment instruction according to the setting parameters.
[0022] Optionally, in one or more embodiments of the present specification, based on the state variable and type corresponding to the contour code segment instruction, the current execution stage of the task to be processed is determined, so as to configure the process parameters corresponding to the current execution stage based on the setting process corresponding to the current execution stage, specifically including:
[0023] Initialize the state variables of the slow start and end of the tool at each stage and the length of the processed contour corresponding to the task to be processed;
[0024] Obtaining the type corresponding to the outline code segment instruction to determine whether to convert the initialization state variable based on the initialization state variable and the type;
[0025] If it is determined that the initialization state variable of the contour code segment instruction is transformed, then the current state variable is obtained to determine the current execution stage of the task to be processed based on the current state variable;
[0026] According to the type corresponding to the current execution stage and the outline code segment instruction, a corresponding judgment condition is determined to configure the process parameters corresponding to the current execution stage based on the judgment condition.
[0027] Optionally, in one or more embodiments of the present specification, if it is determined that the initialization state variable of the contour code segment instruction is transformed, obtaining the current state variable to determine the current execution stage of the task to be processed based on the current state variable, specifically includes:
[0028] If it is determined that the initialization state variable of the outline code segment instruction is transformed, obtaining the current state variable;
[0029] If it is determined that the current state variable is a start state variable, then the current execution stage of the task to be processed is determined to be a slow tool start stage;
[0030] If it is determined that the current state variable is a normal state variable, then determining that the current execution stage of the task to be processed is a contour processing stage;
[0031] If it is determined that the current state variable is an end state variable, then the current execution phase of the task to be processed is determined to be a tool closing phase.
[0032] Optionally, in one or more embodiments of the present specification, according to the current execution stage and the type corresponding to the profile code segment instruction, a corresponding judgment condition is determined to configure the process parameters corresponding to the current execution stage based on the judgment condition, specifically including:
[0033] If the current execution stage is the slow-speed tool start stage, and it is determined that the type corresponding to the contour code segment instruction is contour start, the process parameters of the slow-speed tool start stage are assigned to the contour code segment instruction, and the current state variable is converted to a start state variable;
[0034] If it is determined that the type is a straight line segment or an arc segment, the current processing contour length corresponding to the current contour code segment instruction is obtained according to the type, and it is determined whether the sum of the current processing contour length and the processed contour length is greater than the preset slow tool starting distance;
[0035] If it is greater than the preset slow tool start distance, the contour code segment instruction is segmented based on the slow tool start distance to obtain the contour code segment instruction of the slow tool start stage and the contour code segment instruction of the contour processing stage;
[0036] Assigning the process parameters of the slow cutting segment corresponding to the slow cutting stage to the contour code segment instruction of the slow cutting stage;
[0037] The process parameters of the contour processing segment corresponding to the contour processing stage are assigned to the contour code segment instruction of the contour processing stage.
[0038] Optionally, in one or more embodiments of the present specification, according to the current execution stage and the type corresponding to the profile code segment instruction, a corresponding judgment condition is determined to configure the process parameters corresponding to the current execution stage based on the judgment condition, specifically including:
[0039] If the current execution stage is a contour processing stage, and the type is determined to be a straight line segment or an arc segment, then the current processing contour length, the processed contour length, and the total processing contour length corresponding to the current contour code segment instruction are obtained according to the type;
[0040] Determine the difference between the total length of the processed contour and the length of the current processed contour and the length of the processed contour, and judge whether the difference is less than a preset slow tool retracting distance;
[0041] If it is less than the preset slow tool retracting distance, segmenting the contour code segment instruction based on the slow tool retracting distance to obtain the contour code segment instruction of the contour processing stage and the contour code segment instruction of the slow tool retracting stage;
[0042] Assigning the process parameters of the contour processing segment corresponding to the contour processing stage to the contour code segment instruction of the contour processing stage;
[0043] The process parameters of the slow tool starting segment corresponding to the slow tool starting stage are assigned to the contour code segment instruction of the slow tool starting stage.
[0044] Optionally, in one or more embodiments of the present specification, after determining the difference between the total length of the processed contour and the current processing contour length and the processed contour length, and judging whether the difference is less than a preset slow tool retracting distance, the method further comprises:
[0045] If the difference is greater than or equal to the preset slow knife retracting distance, it is determined that the slow knife retracting section condition is not met;
[0046] Obtaining the type of the contour code segment instruction, and if it is determined that the type is a straight line segment or an arc segment, obtaining the current machining contour length corresponding to the current contour code segment instruction according to the type;
[0047] According to the current processing contour length and the processed contour length, the current processed contour length is determined to be updated, and each contour code segment instruction in the instruction queue is executed cyclically.
[0048] One or more embodiments of this specification provide a device for implementing slow knife raising and lowering, the device comprising:
[0049] at least one processor; and,
[0050] a memory communicatively connected to the at least one processor; wherein,
[0051] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.
[0052] One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute any of the above-described methods.
[0053] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0054] By obtaining the processing file corresponding to the task to be processed by the current laser cutter and parsing it, the code segment instructions contained therein can be extracted. This process is automated, reducing manual intervention and improving efficiency. In addition, identifying the contour code segment instructions in each code segment instruction and counting the total length of the processing contour based on these instructions can help to accurately calculate the position of the start and end stages of the tool, so as to formulate a suitable slow start and end strategy. Through the transformation of state variables and conditional judgment, the system can flexibly respond to various processing situations. Even if an abnormal situation or processing interruption occurs, the system can reconfigure the process parameters and continue processing according to the current state variables and the type of contour code segment instructions, thereby enhancing the robustness and fault tolerance of the system. And through the transformation of state variables and conditional judgment, different process parameters are used in different stages of contour processing to adjust the processing speed, power, frequency and duty cycle in real time, reduce the cutting shock and vibration caused by rapid exit or emergency stop, and thus achieve more efficient and ideal processing effect and processing quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:
[0056] Figure 1 A schematic flow chart of a method for implementing a slow knife raising and lowering provided in an embodiment of this specification;
[0057] Figure 2 A schematic diagram of the content organization of a processing file provided in an embodiment of this specification;
[0058] Figure 3A schematic diagram of a contour processing stage provided in an embodiment of this specification;
[0059] Figure 4 A code segment instruction data structure diagram provided in an embodiment of this specification;
[0060] Figure 5 A schematic diagram of a slow knife raising and lowering process method provided in an embodiment of this specification;
[0061] Figure 6 A schematic diagram of the structure of a device for implementing a slow knife raising and lowering provided in an embodiment of this specification;
[0062] Figure 7 A schematic diagram of the structure of a non-volatile storage medium provided in an embodiment of this specification. DETAILED DESCRIPTION
[0063] The embodiments of this specification provide a method, device and medium for implementing slow knife raising and lowering.
[0064] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0065] like Figure 1 As shown, the embodiment of this specification provides a flowchart of a method for implementing a slow knife raising and lowering. Figure 1 It can be seen that in one or more embodiments of this specification, a method for implementing slow knife raising and lowering includes the following process:
[0066] S101: Acquire a processing file corresponding to a task to be processed by a current laser cutter, parse the processing content of the file, and obtain code segment instructions contained in the processing file.
[0067] like Figure 5 As shown, in order to realize the automatic contour processing process, the embodiment of this specification will first obtain the processing file corresponding to the task to be processed by the current laser cutter, and then parse the content of the file processing to obtain the code segment instructions contained in the processing file. Figure 2In the content composition of the processing file shown, a complete profile consists of a profile start mark, a profile end mark and a profile trajectory instruction information, where PROFILE is the profile start mark, END_PROFILE is the profile end mark, and the profile trajectory instruction information consists of motion instructions G01 / G02 / G03.
[0068] Specifically, in one or more embodiments of the present specification, obtaining a processing file corresponding to a task to be processed by the current laser cutter to parse the content of the file processing and obtain the code segment instructions contained in the processing file specifically includes the following process:
[0069] First, obtain the processing file of the current laser cutter's processing task by specifying the storage location to read the content information of the processing file. Among them, it should be noted that the content information includes: contour start identifier, contour end identifier and contour trajectory instruction information. Then, read the content information line by line to identify the code segment instruction data structure contained in the content information according to the field identifier of each line of content information. At the same time, based on the type identifier of the code segment instruction data structure, identify the type of code segment instruction. Among them, it should be noted that the type identifier includes: contour start identifier, straight line segment identifier, arc segment identifier, contour end identifier. Then, according to the code segment instruction data structure, determine the processing information contained in each type of code segment instruction, so as to realize the processing of each type of code segment instruction process. The processing file can be obtained by parsing. Figure 4 The code segment instruction data shown in FIG. Figure 5 The decoding module shown in the figure, when parsing the content information of the processing file in a certain application scenario, will read and translate the content information of the processing file line by line into code segment instructions, wherein the processing file File is usually generated by computer-aided manufacturing. The code segment instructions of the contour are generally composed of the contour start identification instruction, the straight line segment instruction or the arc segment instruction, and the contour end identification instruction. The corresponding data structure is as follows Figure 3As shown, CodeSegment is a code segment instruction data structure, and its key field Type is a code segment instruction type identifier, which can be any one of the contour start identifier BEGIN, the contour end identifier END, the straight line segment LINE, and the arc segment ARC. The data structure LineData in the code segment instruction CodeSegment corresponding to the straight line segment identifies the composition of the straight line segment information, including the starting point StartPoint, the end point EndPoint and the length Length of the straight line segment. The data structure ArcData in the code segment instruction CodeSegment corresponding to the arc segment identifies the composition of the arc segment information, including the starting point StartPoint, the end point EndPoint, the center Center, the length Length and the radius Radius of the arc segment. In order to process the subsequent slow tool start and end process flow, the data structures LineData and ArcData contain information on the total length ProfileLength of the contour, and also contain the starting point ratio From and the ending point ratio To of the straight line segment or arc segment interpolation, and the starting point ratio From of the straight line segment or arc segment interpolation is set to 0 and the ending point ratio To is set to 1 by default.
[0070] In this process, the content information in the processing file is read line by line and accurately parsed, including the contour start mark, contour end mark and contour trajectory instruction information, to ensure that each processing instruction is accurately identified and executed, thereby improving the precision and accuracy of laser cutting. Automatically parsing the processing file and extracting the processing information can greatly reduce manual intervention and errors, improve production efficiency and automation level, and help reduce material waste and repeated processing costs caused by errors.
[0071] S102: Identify the content of each of the code segment instructions, obtain the contour code segment instruction, and perform statistics on the total length of the processing contour corresponding to the task to be processed based on the contour code segment instruction.
[0072] By accurately counting the total length of the processing contour, the motion trajectory and speed of the laser cutter during the processing can be more accurately controlled. Especially in the starting and closing stages, more sophisticated control is required to ensure the processing quality and avoid errors and defective products in the cutting process. Therefore, in the embodiment of this specification, after the parsing of the code segment instructions is realized based on step S101, the content of each code segment instruction will be identified to obtain the contour code segment instruction, and then the total length of the processing contour corresponding to the processing task will be counted according to the contour code segment instruction. During the processing, the cutting speed often needs to be reduced in the starting and closing stages to avoid material damage or too obvious cutting marks. By counting the total length of the processing contour, it is helpful to accurately calculate the position of the starting and closing stages, so as to formulate a suitable slow starting and closing strategy. In addition, by accurately controlling the length and position of the processing contour, invalid processing time can be reduced, such as unnecessary empty strokes or repeated processing.
[0073] Specifically, in one or more embodiments of the present specification, identifying the content of each code segment instruction, obtaining the contour code segment instruction, and performing statistics on the total length of the machining contour corresponding to the task to be machined based on the contour code segment instruction, specifically includes the following process:
[0074] First, the cache start position and cache end position of the code segment instruction are determined according to the type identifier of the code instruction, so that the code segment instruction between the cache start position and the cache end position is cached in the instruction queue as the outline code segment instruction. Figure 5 In a certain scenario, the contour information statistics module in the contour information statistics module uses a queue to cache the code segment instructions output by the decoding module. If the Type of the code segment instruction output by the decoding module is the contour start identifier BEGIN, the caching of the contour code segment instruction begins until the Type of the code segment instruction output by the decoding module is the contour end identifier END, then the caching of the contour code segment instruction ends. After the contour code segment instruction is cached in the instruction queue, in order to be able to count the total length of the cached contour code segment instructions, the embodiment of this specification will initialize the variable of the total length of the processing contour, so as to traverse the instruction queue to sequentially obtain the contour code segment instructions in the instruction queue as the current contour code segment instruction. Then, the corresponding length addition strategy is determined according to the type of the current contour code segment instruction, and the length of the current contour code segment instruction is added to the variable of the total length of the processing contour based on the corresponding length addition strategy. Then, the variable of the total length of the processing contour is added in a loop to obtain the total length of the processing contour counted by the variable of the total length of the processing contour;
[0075] That is, if the variable for the total length of the machining profile is ProfileLength and the current code segment instruction is CurSegment, the process is:
[0076] S1: Initialize the variable ProfileLength of the total length of the profile trajectory to 0;
[0077] S2: Take a code segment instruction from the queue of cached outline code segment instructions and use the instruction as the current code segment instruction CurSegment;
[0078] S3: If the current code segment instruction CurSegment type is LINE, perform the following operations:
[0079] ProfileLength+=CurSegment.Data.Line.Length;
[0080] S4: If the current code segment instruction CurSegment type Type is ARC, perform the following operations:
[0081] ProfileLength+=CurSegment.Data.Arc.Length;
[0082] S5: Steps S2-S4 are repeatedly executed in a loop until the type of the contour processing current code segment instruction CurSegment is END to end the statistics of the contour trajectory length.
[0083] According to the type of the current contour code segment instruction, the corresponding setting parameters are determined to traverse the instruction queue twice, and the total length of the machining contour is assigned to each contour code segment instruction according to the setting parameters. That is, if the current code segment instruction is CurSegment, the process of assigning the total length of the machining contour to each contour code segment instruction according to the setting parameters is as follows:
[0084] S1: Take a code segment instruction from the queue of cached outline code segment instructions and use the instruction as the current code segment instruction CurSegment;
[0085] S2: If the current code segment instruction CurSegment type is LINE, perform the following operations:
[0086] CurSegment.Data.Line.ProfileLength=ProfileLength;
[0087] S3: If the current code segment instruction CurSegment type Type is ARC, perform the following operations:
[0088] CurSegment.Data.Arc.ProfileLength=ProfileLength;
[0089] S4: The loop repeatedly executes steps S1-S3 in the process until the type of the contour machining current code segment instruction CurSegment is END, ending the above loop operation.
[0090] In the above process of obtaining the total length of the machining contour, the contour code segment instructions are parsed one by one, and their lengths are accurately calculated according to the instruction type such as straight line LINE or arc ARC, and then these lengths are accumulated into the machining contour total length variable ProfileLength, thereby ensuring the accurate statistics of the contour length. Compared with methods such as image recognition or manual measurement, this method directly extracts data from the machining file, reduces the errors in the intermediate links, and improves the accuracy of the data. And through queue caching and loop traversal, a large number of code segment instructions can be quickly responded to and processed, shortening the processing time. In the process of assigning the total length of the machining contour to each contour code segment instruction, each instruction carries the information of the total length of the contour, which makes the data in the machining process traceable. When a problem occurs during the machining process, the cause of the problem can be quickly located by viewing the total length of the contour carried in the instruction, which is convenient for problem troubleshooting and resolution. By accurately counting the total length of the machining contour, accurate data support can be provided for the slow start and end tool strategy, thereby optimizing the start and end tool speeds during the machining process and improving the machining quality.
[0091] S103: Determine the current execution stage of the task to be processed based on the state variable and type corresponding to the contour code segment instruction, and configure the process parameters corresponding to the current execution stage based on the setting process corresponding to the current execution stage.
[0092] According to the state variables and types corresponding to the contour code segment instructions, the current execution stage of the task to be processed is determined, so that the process parameters corresponding to the current execution stage are configured according to the setting process corresponding to the current execution stage. Specifically, in one or more embodiments of the present specification, the current execution stage of the task to be processed is determined based on the state variables and types corresponding to the contour code segment instructions, so that the process parameters corresponding to the current execution stage are configured based on the setting process corresponding to the current execution stage, specifically including:
[0093] Initialize the state variables and processed contour length of the slow start and end of the tool at each stage corresponding to the task to be processed. Then, obtain the type corresponding to the contour code segment instruction, and determine whether to convert the initialization state variable according to the initialization state variable and type. If it is determined that the initialization state variable of the contour code segment instruction has been converted, then obtain the current state variable, and determine the current execution stage of the task to be processed according to the current state variable. Then, determine the corresponding judgment condition according to the current execution stage and the type corresponding to the contour code segment instruction, so as to configure the process parameters corresponding to the current execution stage based on the judgment condition. That is, the slow start and end module processes the contour code segment instructions and assigns the contour processing information of speed, power, frequency, and duty cycle in each processing stage. If the length of the contour that has been processed is the variable CurLength, the slow start segment distance is SlowStartDis, the slow end segment distance is SlowEndDis, and the current code segment instruction is CurSegment. At the same time, the state variable that identifies the various stages of slow start and end is defined as State, and its value can be any one of INIT (initial state), START (starting state), NORMAL (normal state), and END (end state).
[0094] During the machining process, different machining stages (such as tool start, conventional machining, tool end) often require different process parameters (such as speed, power, frequency, duty cycle, etc.). By accurately controlling these parameters, a smooth transition of the machining process can be ensured, machining errors caused by parameter mutations can be reduced, and machining accuracy can be improved. Slow machining in the tool start and tool end stages helps reduce shock and vibration and protect the tool and workpiece. In the conventional machining stage, a higher machining speed is used to improve machining efficiency. This method optimizes machining efficiency by reasonably allocating machining time and speed in each stage. Slow machining in the tool start and tool end stages helps reduce shock and vibration and protect the tool and workpiece. In the conventional machining stage, a higher machining speed is used to improve machining efficiency. This method optimizes machining efficiency by reasonably allocating machining time and speed in each stage.
[0095] Further, in one or more embodiments of the present specification, when the initialization state variable of the contour code segment instruction is transformed, the current state variable is obtained to determine the current execution stage of the task to be processed based on the current state variable, specifically including:
[0096] If it is determined that the initialization state variable of the contour code segment instruction is transformed, the current state variable is obtained. Before that, if it is an initialization state variable, a contour code segment instruction is taken out from the contour information statistics module, and the instruction is used as the current code segment instruction CurSegment. If the initialization state variable has not changed at this time, it is determined that if the type Type of the current code segment instruction CurSegment is BEGIN, the condition for the start of the slow start segment is met, and the processing information of the speed, power, frequency, and duty cycle of the contour processing slow start segment is given, the start of the slow start segment action is marked, and the state variable State is set to START (starting state).
[0097] Similarly, if the current state variable is determined to be a start state variable, the current execution stage of the task to be processed is determined to be a slow start stage. If the current state variable is determined to be a normal state variable, the current execution stage of the task to be processed is determined to be a contour processing stage. If the current state variable is determined to be an end state variable, the current execution stage of the task to be processed is determined to be a tool closing stage.
[0098] Through clear state variables (such as INIT, START, NORMAL, END) and corresponding processing stages (slow tool start, contour processing, tool end), the system can accurately control the entire processing process. Each stage has clear start and end conditions, as well as corresponding process parameter configurations, which ensures the accuracy and controllability of the processing process. In the slow tool start and tool end stages, by reducing the speed and adjusting parameters such as power, the impact on the tool and workpiece can be reduced and protected from damage. In the contour processing stage, parameters suitable for high-speed processing are used to improve processing efficiency. This staged control method helps to improve processing efficiency while ensuring processing quality. Through the conversion of state variables and conditional judgment, the system can flexibly respond to various processing situations. Even if an abnormal situation or processing interruption is encountered, the system can reconfigure the process parameters and continue processing according to the current state variables and the type of contour code segment instructions, thereby enhancing the robustness and fault tolerance of the system. In addition, this method is not only applicable to simple straight line or arc processing, but also to complex contour processing. By processing contour code segment instructions segment by segment and configuring process parameters according to current state variables and instruction type, the system can achieve precise processing of complex contours.
[0099] Further, in one or more embodiments of the present specification, according to the type corresponding to the current execution stage and the outline code segment instruction, a corresponding judgment condition is determined to configure the process parameters corresponding to the current execution stage based on the judgment condition, specifically including:
[0100] If the current execution stage is the slow start stage, and the type corresponding to the contour code segment instruction is determined to be the contour start, the process parameters of the slow start segment are assigned to the contour code segment instruction, and the current state variable is converted to the start state variable START. At this time, if the type is determined to be a straight line segment or an arc segment, the current processing contour length corresponding to the current contour code segment instruction is obtained according to the type, and it is determined whether the sum of the current processing contour length and the processed contour length is greater than the preset slow start distance. That is, if the current code segment instruction CurSegment type Type is LINE, the update operation is executed as: CurLength+CurSegment.Data.Line.Length>SlowStartDis; if the current code segment instruction CurSegment type Type is ARC, the update operation is executed as: CurLength+CurSegment.Data.Arc.Length>SlowStartDis.
[0101] If it is greater than the preset slow-start distance, the condition for the end of the slow-start segment is met, indicating the end of the slow-start segment action, and the contour processing is about to enter the conventional contour segment, so it is necessary to segment the contour code segment instructions according to the slow-start distance to obtain the contour code segment instructions of the slow-start stage and the contour code segment instructions of the contour processing stage. At the same time, the process parameters of the slow-start segment corresponding to the slow-start stage are assigned to the contour code segment instructions of the slow-start stage, and the process parameters of the contour processing segment corresponding to the contour processing stage are assigned to the contour code segment instructions of the contour processing stage. In other words, if the current code segment instruction CurSegment type Type is a straight line segment LINE, then in the slow-start stage, the starting point ratio and the ending point ratio of the processing information of the speed, power, frequency, and duty cycle of the contour processing slow-start segment assigned to the current code segment instruction CurSegment are respectively:
[0102] CurSegment.Data.Line.From=0;
[0103] CurSegment.Data.Line.To=(SlowStartDis-CurLength) / CurSegment.Data.Line.Length.
[0104] In the contour processing stage, the starting point ratio and ending point ratio of the processing information of speed, power, frequency and duty cycle of the contour processing segment given to the current code segment instruction CurSegment are as follows:
[0105] CurSegment.Data.Line.From=(SlowStartDis-CurLength) / CurSegment.Data.Line.Length;
[0106] CurSegment.Data.Line.To=1.
[0107] If the current code segment instruction CurSegment type Type is arc segment ARC, then in the slow start stage, the starting point ratio and ending point ratio of the processing information of speed, power, frequency, and duty cycle of the contour processing slow start segment are given to the current code segment instruction CurSegment respectively:
[0108] CurSegment.Data.Arc.From=0;
[0109] CurSegment.Data.Arc.To=(SlowStartDis-CurLength) / CurSegment.Data.Arc.Length.
[0110] In the contour processing stage, the starting point ratio and ending point ratio of the processing information of speed, power, frequency and duty cycle of the conventional contour segment of the contour processing are given to the current code segment instruction CurSegment respectively:
[0111] CurSegment.Data.Arc.From=(SlowStartDis-CurLength) / CurSegment.Data.Arc.Length;
[0112] CurSegment.Data.Arc.To=1.
[0113] In addition, it can be understood that if the current code segment instruction CurSegment does not meet the condition for the end of the slow start segment, the variable CurLength of the completed contour length is updated, and the update operation is as follows:
[0114] If the current code segment instruction CurSegment type Type is a straight line segment LINE, the condition is:
[0115] CurLength+=CurSegment.Data.Line.Length;
[0116] If the current code segment instruction CurSegment type Type is arc segment ARC, the conditions are:
[0117] CurLength+=CurSegment.Data.Arc.Length.
[0118] In this process, unnecessary inefficient processing time can be reduced by switching to the process parameters of the conventional contour processing stage in time after the slow tool start stage. In addition, by accurately controlling the slow tool start distance, the time consumption of this stage can be minimized while ensuring the processing quality, thereby improving the overall processing efficiency. And reasonable process parameter configuration helps to reduce tool wear and reduce cutting heat generation, thereby reducing the risk of possible failures during the processing process. For example, too fast feed speed or excessive cutting force may cause tool chipping or workpiece deformation, and these problems can be avoided through this implementation method. In addition, by associating different types of contour code segment instructions with corresponding judgment conditions and process parameters, the processing program can be made clearer and easier to understand. This not only facilitates the programming work of programmers, but also facilitates subsequent personnel to read, modify and maintain the program.
[0119] Further, in one or more embodiments of the present specification, according to the type corresponding to the current execution stage and the outline code segment instruction, a corresponding judgment condition is determined to configure the process parameters corresponding to the current execution stage based on the judgment condition, specifically including:
[0120] If the current execution stage is the contour processing stage, and the type is determined to be a straight line segment or an arc segment, the current processing contour length, the processed contour length, and the total processing contour length corresponding to the current contour code segment instruction are obtained according to the type. If the difference between the total processing contour length and the current processing contour length and the processed contour length is determined, it is determined whether the difference is less than the preset slow tool retraction distance. That is, if the current code segment instruction CurSegment type Type is a straight line segment LINE, the judgment condition is: CurSegment.Data.Line.ProfileLength-CurLength-CurSegment.Data.Line.Length
[0121] <SlowEndDis;
[0122] If the current code segment instruction CurSegment type Type is arc segment ARC, the judgment condition is:
[0123] CurSegment.Data.Arc.ProfileLength - CurLength - CurSegment.Data.Arc.Length < SlowEndDis. If it is less than the preset slow tool retraction distance, it means that the determination condition is met. At this time, the contour code segment instructions are segmented based on the slow tool retraction distance to obtain the contour code segment instructions in the contour machining stage and the contour code segment instructions in the slow tool retraction stage. Meanwhile, the process parameters of the contour machining segment corresponding to the contour machining stage are assigned to the contour code segment instructions in the contour machining stage. The process parameters of the slow tool starting segment corresponding to the slow tool starting stage are assigned to the contour code segment instructions in the slow tool starting stage.
[0124] That is, if the type of the current code segment instruction CurSegment is a line segment LINE, then in the contour machining stage, the starting point ratio and the ending point ratio of the machining information of the speed, power, frequency, and duty cycle of the conventional contour segment in the contour machining for the current code segment instruction CurSegment are respectively:
[0125] CurSegment.Data.Line.From = 0;
[0126] CurSegment.Data.Line.To = (CurSegment.Data.Line.ProfileLength - CurLength - SlowEndDis) / CurSegment.Data.Line.Length.
[0127] In the slow tool retraction stage, the starting point ratio and the ending point ratio of the machining information of the speed, power, frequency, and duty cycle of the slow tool retraction segment in the contour machining for the current code segment instruction CurSegment are respectively:
[0128] CurSegment.Data.Line.From = (CurSegment.Data.Line.ProfileLength - CurLength - SlowEndDis) / CurSegment.Data.Line.Length;
[0129] CurSegment.Data.Line.To = 1.
[0130] And if the type of the current code segment instruction CurSegment is an arc segment ARC, then in the contour machining stage, the starting point ratio and the ending point ratio of the machining information of the speed, power, frequency, and duty cycle of the conventional contour segment in the contour machining for the current code segment instruction CurSegment are respectively:
[0131] CurSegment.Data.Arc.From=0;
[0132] CurSegment.Data.Arc.To=(CurSegment.Data.Arc.ProfileLength-CurLength-SlowEndDis) / CurSegment.Data.Arc.Length.
[0133] In the slow tool closing stage, the current code segment instruction CurSegment gives the speed, power, frequency, and duty cycle of the contour machining slow tool closing segment. The starting point ratio and the ending point ratio are as follows:
[0134] CurSegment.Data.Arc.From=(CurSegment.Data.Arc.ProfileLength-CurLength-SlowEndDis) / CurSegment.Data.Arc.Length;
[0135] CurSegment.Data.Arc.To=1.
[0136] In the above process, the process parameters are automatically switched between the contour processing stage and the slow tool collection stage to avoid unnecessary and inefficient processing time. Higher processing speed and power are used in the conventional contour processing stage, while lower parameters are used in the slow tool collection stage to ensure processing quality and tool safety. This dynamic adjustment helps to optimize the entire processing process and improve processing efficiency. The process parameters are automatically switched between the contour processing stage and the slow tool collection stage to avoid unnecessary and inefficient processing time. Higher processing speed and power are used in the conventional contour processing stage, while lower parameters are used in the slow tool collection stage to ensure processing quality and tool safety. This dynamic adjustment helps to optimize the entire processing process and improve processing efficiency.
[0137] Further, in one or more embodiments of the present specification, after determining the difference between the total length of the processed contour and the length of the current processed contour and the length of the processed contour, thereby judging whether the difference is less than the preset slow tool retraction distance, the method further includes the following process:
[0138] If the difference is greater than or equal to the preset slow tool closing distance, it can be determined that the slow tool closing segment condition is not met. At this time, the type of the contour code segment instruction is obtained. If the type is determined to be a straight line segment or an arc segment, the current processing contour length corresponding to the current contour code segment instruction is obtained according to the type, and the current processed contour length is determined to be updated based on the current processing contour length and the processed contour length. Then, each contour code segment instruction in the instruction queue is executed cyclically, that is, the processing of the next instruction is entered. That is, if the current code segment instruction CurSegment does not meet the slow tool closing segment condition, the variable CurLength of the completed contour length is updated, and the update operation is as follows: If the current code segment instruction CurSegment type Type is a straight line segment LINE, the judgment condition is: CurLength+=CurSegment.Data.Line.Length; and if the current code segment instruction CurSegment type Type is an arc segment ARC, the judgment condition is: CurLength+=CurSegment.Data.Arc.Length.
[0139] During this process, by continuously updating the processed contour length (CurLength), the system can continuously track the processing progress and re-evaluate whether the conditions for entering the slow tool closing stage are met when each new contour code segment instruction is executed. This ensures the continuity and accuracy of the processing process and avoids processing quality problems caused by a single misjudgment. It avoids unnecessary intervention in the slow tool closing stage, thereby improving processing efficiency while ensuring processing quality. Because the system will only enter the slow tool closing stage when the processing is really close to completion, unnecessary inefficient processing time is reduced. By accurately calculating the difference between the current processing contour length, the processed contour length and the total processing contour length, and comparing it with the preset slow tool closing distance, the system can more accurately control when to enter the slow tool closing stage. This precise control helps to reduce the cutting shock and vibration caused by rapid exit or emergency stop, thereby improving processing accuracy and surface quality.
[0140] S104: Convert the configured contour code segment instructions into motion instructions that can be recognized by the motion control layer to complete the slow tool starting and closing process of the task to be processed.
[0141] After completing the parameter configuration of each stage based on the above process, it is necessary to convert the configured contour code segment instructions into motion instructions that can be recognized by the motion control layer to complete the slow start and end process of the task to be processed. Specifically, if the contour code segment instructions are straight lines or arcs, they need to be converted into motion instructions that can be recognized by the motion control layer. The slow start and end process ends with the end of contour processing. That is, the code segment instructions CodeSegment flowing into the slow start and end module are further converted and processed, and the code segment instructions CodeSegment are converted into motion commands Motion Command that can be recognized by the motion control layer. At this point, the process of the technical implementation level of the slow start and end process is explained. By converting high-level code segment instructions into motion instructions that can be directly recognized by the motion control layer, the system can interact with different types of motion control hardware more flexibly. This conversion mechanism enables the system to be compatible with motion controllers of various brands and models, improving the compatibility and scalability of the system. Accurately converting code segment instructions into motion instructions can ensure that the machine tool or processing equipment moves according to the predetermined trajectory and parameters, thereby improving the accuracy and stability of the processing process.
[0142] like Figure 6 As shown, the embodiment of this specification provides a schematic diagram of the structure of a device for implementing a slow knife raising and lowering. Figure 6 It can be seen that in one or more embodiments of this specification, a device for implementing slow knife raising and lowering includes:
[0143] at least one processor; and,
[0144] a memory communicatively connected to the at least one processor; wherein,
[0145] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.
[0146] like Figure 7 As shown, the present specification provides a schematic diagram of the structure of a non-volatile storage medium. Figure 7 It can be seen that in one or more embodiments of the present specification, a non-volatile storage medium stores computer-executable instructions, and the computer-executable instructions can: execute any of the methods described above.
[0147] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0148] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0149] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A method for slowly raising and lowering a knife, characterized in that: The method comprises: Obtaining a processing file corresponding to the task to be processed by the current laser cutter, parsing the content of the processing file, and obtaining the code segment instructions contained in the processing file; Identify the content of each of the code segment instructions, obtain the contour code segment instruction, and perform statistics on the total length of the processing contour corresponding to the task to be processed based on the contour code segment instruction; Determine the current execution stage of the task to be processed based on the state variable and type corresponding to the contour code segment instruction, and configure the process parameters corresponding to the current execution stage based on the setting process corresponding to the current execution stage; The configured contour code segment instructions are converted into motion instructions that can be recognized by the motion control layer to complete the slow tool starting and closing process of the task to be processed.
2. A method for realizing slow knife raising and lowering according to claim 1, characterized in that: The obtaining of the processing file corresponding to the task to be processed by the current laser cutter to parse the content of the processing file and obtain the code segment instructions contained in the processing file specifically includes: Acquire the processing file of the task to be processed by the current laser cutter based on the designated storage location to read the content information of the processing file; wherein the content information includes: a contour start mark, a contour end mark and contour trajectory instruction information; Reading the content information line by line to identify the code segment instruction data structure contained in the content information according to the field identifier of each line of the content information; Based on the type identifier of the code segment instruction data structure, identifying the type of the code segment instruction; wherein the type identifier includes: a contour start identifier, a straight line segment identifier, an arc segment identifier, and a contour end identifier; According to the code segment instruction data structure, the processing information contained in each type of code segment instruction is determined so as to realize the processing of each type of code segment instruction process.
3. The method for slowly raising and lowering a knife according to claim 1, characterized in that: The identifying the content of each of the code segment instructions to obtain the contour code segment instruction, and performing statistics on the total length of the machining contour corresponding to the task to be processed based on the contour code segment instruction, specifically includes: Determine a cache start position and a cache end position of the code segment instruction according to the type identifier of the code instruction, so as to cache the code segment instruction between the cache start position and the cache end position as the outline code segment instruction into an instruction queue; Initializing a variable of the total length of the machining contour, traversing the instruction queue to sequentially obtain contour code segment instructions in the instruction queue as current contour code segment instructions; Determining a corresponding length addition strategy according to the type of the current contour code segment instruction, and adding the length of the current contour code segment instruction to the variable of the total length of the machining contour based on the corresponding length addition strategy; Looping the addition of the variable of the total length of the machining contour to obtain the total length of the machining contour counted by the variable of the total length of the machining contour; The corresponding setting parameters are determined according to the type of the current contour code segment instruction to perform a second traversal of the instruction queue, and the total length of the machining contour is assigned to each contour code segment instruction according to the setting parameters.
4. A method for slowly raising and lowering a knife according to claim 1, characterized in that: Based on the state variables and types corresponding to the contour code segment instructions, the current execution stage of the task to be processed is determined, and based on the setting process corresponding to the current execution stage, the process parameters corresponding to the current execution stage are configured, specifically including: Initialize the state variables of the slow start and end of the tool at each stage and the length of the processed contour corresponding to the task to be processed; Obtaining the type corresponding to the outline code segment instruction to determine whether to convert the initialization state variable based on the initialization state variable and the type; If it is determined that the initialization state variable of the contour code segment instruction is transformed, then the current state variable is obtained to determine the current execution stage of the task to be processed based on the current state variable; According to the type corresponding to the current execution stage and the outline code segment instruction, a corresponding judgment condition is determined to configure the process parameters corresponding to the current execution stage based on the judgment condition.
5. A method for slowly raising and lowering a knife according to claim 4, characterized in that: If it is determined that the initialization state variable of the contour code segment instruction is transformed, the current state variable is obtained to determine the current execution stage of the task to be processed based on the current state variable, specifically including: If it is determined that the initialization state variable of the outline code segment instruction is transformed, obtaining the current state variable; If it is determined that the current state variable is a start state variable, then the current execution stage of the task to be processed is determined to be a slow tool start stage; If it is determined that the current state variable is a normal state variable, then determining that the current execution stage of the task to be processed is a contour processing stage; If it is determined that the current state variable is an end state variable, then the current execution phase of the task to be processed is determined to be a tool closing phase.
6. A method for slowly raising and lowering a knife according to claim 5, characterized in that: The determining of the corresponding judgment condition according to the type corresponding to the current execution stage and the outline code segment instruction, so as to configure the process parameters corresponding to the current execution stage based on the judgment condition, specifically includes: If the current execution stage is the slow-speed tool start stage, and it is determined that the type corresponding to the contour code segment instruction is contour start, the process parameters of the slow-speed tool start stage are assigned to the contour code segment instruction, and the current state variable is converted to a start state variable; If it is determined that the type is a straight line segment or an arc segment, the current processing contour length corresponding to the current contour code segment instruction is obtained according to the type, and it is determined whether the sum of the current processing contour length and the processed contour length is greater than the preset slow tool starting distance; If it is greater than the preset slow tool start distance, the contour code segment instruction is segmented based on the slow tool start distance to obtain the contour code segment instruction of the slow tool start stage and the contour code segment instruction of the contour processing stage; Assigning the process parameters of the slow cutting segment corresponding to the slow cutting stage to the contour code segment instruction of the slow cutting stage; The process parameters of the contour processing segment corresponding to the contour processing stage are assigned to the contour code segment instruction of the contour processing stage.
7. A method for slowly raising and lowering a knife according to claim 6, characterized in that: The determining of the corresponding judgment condition according to the type corresponding to the current execution stage and the outline code segment instruction, so as to configure the process parameters corresponding to the current execution stage based on the judgment condition, specifically includes: If the current execution stage is a contour processing stage, and the type is determined to be a straight line segment or an arc segment, then the current processing contour length, the processed contour length, and the total processing contour length corresponding to the current contour code segment instruction are obtained according to the type; Determine the difference between the total length of the processed contour and the length of the current processed contour and the length of the processed contour, and judge whether the difference is less than a preset slow tool retracting distance; If it is less than the preset slow tool retracting distance, segmenting the contour code segment instruction based on the slow tool retracting distance to obtain the contour code segment instruction of the contour processing stage and the contour code segment instruction of the slow tool retracting stage; Assigning the process parameters of the contour processing segment corresponding to the contour processing stage to the contour code segment instruction of the contour processing stage; The process parameters of the slow cutting segment corresponding to the slow cutting stage are assigned to the contour code segment instruction of the slow cutting stage.
8. A method for slowly raising and lowering a knife according to claim 5, characterized in that: After determining the difference between the total length of the processed contour and the length of the current processed contour and the length of the processed contour, and judging whether the difference is less than a preset slow tool retracting distance, the method further comprises: If the difference is greater than or equal to the preset slow knife retracting distance, it is determined that the slow knife retracting section condition is not met; Obtaining the type of the contour code segment instruction, and if it is determined that the type is a straight line segment or an arc segment, obtaining the current machining contour length corresponding to the current contour code segment instruction according to the type; According to the current processing contour length and the processed contour length, the current processed contour length is determined to be updated, and each contour code segment instruction in the instruction queue is executed cyclically.
9. A device for slowly raising and lowering a knife, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: execute any of the methods described in claims 1-8.
10. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions can: execute the method described in any one of claims 1 to 8.