Corner cleaning machine control method and system based on teaching programming

Through the teaching-based programming method, the problems of high complexity, insufficient accuracy and poor flexibility of traditional angle-clearing programs are solved, and efficient and accurate multi-head collaborative control and path planning are achieved.

CN120178795APending Publication Date: 2025-06-20JINAN CHENHE MASCH CO LTD

Patent Information

Application Number
CN202510381587.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

Traditional angle clearing programs have low programming efficiency, insufficient accuracy, poor flexibility, and difficulty in collaborative control of multiple heads, resulting in high programming complexity, cumbersome arc interpolation calculations and difficult to achieve collaborative control of multiple tools.

Method used

Using a teaching programming method, the tool bias parameters are set through the parameter configuration interface, the profile model is fixed in the teaching interface and the tool path is generated through axial shift, the interpolation type is selected and the path coordinates are calculated, the three-point collinearity and radius legality are verified, the multi-head NC file is generated and dynamic bias variables and synchronization instructions are embedded.

Benefits of technology

It improves programming efficiency and accuracy, simplifies the program modification process, enhances the system flexibility and multi-head collaborative control capabilities, and reduces the risk of manual input errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120178795A_ABST
    Figure CN120178795A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of numerical control machining equipment, in particular to a corner cleaning machine control method and system based on teaching programming. The method comprises the following steps: setting multi-head cutter offset parameters through a parameter configuration interface; fixing the profile model on a teaching interface, and generating a tool path through shaft movement; selecting an interpolation type, calculating path coordinates according to the interpolation type, and superposing offset values; the three-point colinearity is verified in the IJ mode, and the radius legality is verified in the R mode; and generating a multi-machine-head NC file, and embedding a dynamic offset variable and a synchronization instruction. According to the method, dragging-clicking type programming is achieved through a visual interface, traditional manual compiling of G codes is replaced, visual input of a straight line / arc interpolation path is supported, and a system automatically generates a G code instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of numerical control machining equipment, and in particular to a corner cleaning machine control method and system based on teaching programming. Background Art

[0002] Traditional corner cleaning programs rely on manual writing of G codes, and there are the following problems: 1. Low programming efficiency: The path needs to be repeatedly debugged, especially for circular interpolation which requires complex calculations; 2. Insufficient accuracy: Manual input is likely to introduce errors, affecting the machining quality; 3. Poor flexibility: Modifying the program requires rewriting the code, and it is difficult to adapt to the requirements of different profiles; 4. When multiple tool heads work, each tool head needs to adjust the running distance of the tool in the G program based on the offset parameters of the local tool head, etc.; Difficult to write: It requires a high technical level of workers, which is not conducive to the popularization of automated equipment.

[0003] The technical problems existing in the prior art are summarized as follows: 1. High complexity of G code programming It is necessary to manually remember G / M codes (such as G54 coordinate system setting, G01 linear interpolation, M3 saw start), tool offset variables (R10 saw X-axis offset), and circular interpolation parameters (R / I / J / K); Programming personnel need to manually measure the tool path coordinates and write the NC file line by line, and a single debugging takes up to several hours.

[0004] Technical bottleneck: Relying on manual experience, it is easy to cause machining out-of-tolerance due to incorrect parameter input (such as tool interference caused by incorrect R value); Lacking the support of automated tools, it is impossible to quickly adapt to different profile specifications.

[0005] 2. Complicated circular interpolation calculation The traditional method requires manual calculation of the center coordinates (I / J / K) or radius (R). For example, when using the G02 X100 Y50 R20 instruction, it is necessary to verify the legality of the R value; For complex contours (such as multiple circular arcs connected), it is necessary to repeatedly verify the geometric relationship, and the debugging efficiency is low.

[0006] Technical bottleneck: Manual calculation is likely to introduce cumulative errors, and it is impossible to verify the rationality of the path in real time (such as interpolation failure caused by exceeding the limit of the R value).

[0007] 3. Difficult to control multiple tools in coordination Different tools (saw blades, milling cutters, broaches) need to independently compile NC files and coordinate the machining sequence (such as the start command of the M6 vertical milling cutter); The lack of a unified scheduling mechanism results in conflicts in the head movements or excessive waiting times.

[0008] Technical bottlenecks: Multiple tool parameters (such as offset values, speeds) need to be managed in separate files, increasing the complexity of maintenance. Summary of the Invention

[0009] To solve the above-mentioned problems, the present invention provides a corner cleaning machine control method and system based on teaching programming.

[0010] In a first aspect, a corner cleaning machine control method based on teaching programming provided by the present invention adopts the following technical solutions: A corner cleaning machine control method based on teaching programming includes: Setting multi-head tool offset parameters through a parameter configuration interface; Fixing the profile model on the teaching interface and generating a tool path by moving the axes; Selecting an interpolation type, calculating path coordinates according to the interpolation type, and superimposing offset values; Verifying the collinearity of three points in the IJ mode and verifying the radius legality in the R mode; Generating multi-head NC files and embedding dynamic offset variables and synchronization instructions.

[0011] Further, the fixing of the profile model on the teaching interface and generating a tool path by moving the axes includes creating a new program on the teaching interface and entering the profile code, placing the window and fixing it by clicking the material holding and pressing, selecting the tool to be operated, moving the tool position through the X-axis or Y-axis on the interface, and starting the tool to work through the tool action button.

[0012] Further, the selecting of an interpolation type, calculating path coordinates according to the interpolation type, and superimposing offset values includes selecting linear interpolation or circular interpolation as the interpolation type. When linear interpolation is selected, the step length of the tool reaching the working point after subtracting the offset from the XY axes of the tool is displayed in real time using the interface; controlling the tool to move separately through the XY axes, including the preparation working position, the start working position, and the working end position, and recording them into the teaching program list through line insertion; when circular interpolation is selected, first modifying the circular interpolation speed; and setting the circular interpolation method and the interpolation direction.

[0013] Further, the setting of the circular interpolation method and interpolation direction includes setting the R-mode interpolation. In this case, the starting point and the ending point are selected on the interface, and the axis and the tool are operated to the starting point and the ending point positions. The starting point, the ending point, and the R value of the circular interpolation are recorded. The distance between the two points is calculated by defining the starting point (x1, y1), the ending point (x2, y2), and the radius radius of the circular arc.

[0014] Further, the verification of the radius legality in the R mode includes, after calculating the distance between the two points, determining whether the radius is equal to half of the chord length. If radius and d / 2 are equal, it means that this circular arc is a semi-circle, and the center of the circle and the ending point are at the position of ((x1 + x2) / 2, (y1 + y2) / 2); and it is determined whether it is a vertical chord (x1 == x2): center_x = x1 ± sqrt(radius² - ((y1 - y2) / 2)²); for clockwise: take the negative root -sqrt(...), for counterclockwise: take the positive root +sqrt(...); and by combining and deriving equations, the equation of the perpendicular bisector of the chord is constructed: y = c2 * (x - (x1 + x2) / 2) + (y1 + y2) / 2, where c2 is the slope; combined with the circle equation: (x - x1)^2 + (y - y1)^2 = radius², after eliminating the elements, a quadratic equation is obtained; the center coordinates (x, y) are obtained by solving the quadratic equation.

[0015] Further, the setting of the circular interpolation method and interpolation direction also includes setting the IJ circular interpolation. In this case, the starting point coordinates, the midpoint coordinates, the ending point coordinates, the axis, and the tool are respectively used on the interface to reach the positions of the circular arc points during machining, and the positions of three points on a circular arc are obtained. The center of the circle and the radius are calculated. Among them, the collinearity verification of three points is carried out by defining the starting point (x1, y1), the midpoint (x2, y2), and the ending point (x3, y3) of the circular arc. Furthermore, the three-point collinearity check in the IJ mode includes defining the arc start point (x1, y1), midpoint (x2, y2) and end point (x3, y3), a=x1-x2; b=y1-y2; c=x1-x2; d=y1-y2; three-point collinearity check: det=b*ca*d; det<0 means that the three points are collinear and a circle cannot be generated; simultaneous equation derivation e = ((x1² - x2²) + (y1²- y2²)) / 2; constant term of the perpendicular bisector equation of the chord from the start point to the end point; ‌f = ((x1² - x3²) + (y1² - y3²)) / 2; constant term of the perpendicular bisector equation of the chord from the start point to the end point; Cramer's rule solves the coordinates of the center of the circle: the X-axis coordinate of the center of the circle x0 = -(d * e -b * f) / det; the Y coordinate of the center of the circle y0 = -(a * f - c * e) / det; Radius calculation R=hypot(x1 - x0, y1 -y0); hypot calculates the distance from the center of the circle to any point as the radius.

[0016] Furthermore, the generation of multi-head NC files, embedding dynamic offset variables and synchronization instructions, includes generating G code based on the entered tool action data, wherein tool management and start-stop control are achieved through tool definition and M code mapping, action sequences are generated through interpolation type disks and path generation rules, and G code is generated by traversing teaching data.

[0017] Furthermore, the generation of multi-head NC files, embedding dynamic offset variables and synchronization instructions, also includes selecting profile codes, loading the angle clearing program entered in the teaching interface, directly modifying the linear interpolation command, but not modifying the interpolation type; for circular interpolation, only the interpolation direction and speed are modified, and other information modifications are performed by adding new circular interpolation operations, which is convenient for verifying the legitimacy of circular interpolation data; finally, the database information is updated by saving and a new NC file is generated.

[0018] In the second aspect, a corner cleaning machine control system based on teaching programming includes: Parameter configuration interface module, used to set tool offset parameters of multiple machine heads and dynamically associate them with tool types; Graphical teaching interface module, which generates tool paths by dragging profile models and clicking axis movement buttons, and automatically records coordinates and interpolation types; The arc interpolation calculation module integrates R mode and IJ mode algorithms to automatically deduce the center and radius of the circle based on the starting point, end point or three-point coordinates selected by the user; The multi-machine head collaborative control module generates independent NC files based on the tool motion queue and coordinates the processing sequence of the four machines through synchronization instructions (M61); Dynamic offset compensation module, which embeds the tool offset value into the G-code variable and adapts to different head coordinate systems.

[0019] In summary, the present invention has the following beneficial technical effects: 1. Through the visual interface, "drag-and-click" programming is realized, replacing the traditional manual writing of G-code, supporting the intuitive input of linear / arc interpolation paths, and the system automatically generates G-code instructions. The programming efficiency is increased by 80%: the operator does not need to memorize G / M codes and completes path planning through interface interaction; real-time path verification: automatically verifies the legality of the arc radius (R≥tool radius + safety margin) and collinearity of three points (IJ mode), avoiding the risk of tool interference.

[0020] 2. Establish a dynamic association database between the tool offset parameters and M codes, support the automatic matching of "tool type - offset amount - start / stop instruction", and realize parameter templatized configuration and version management. The debugging cycle is shortened by 90%: the profile processing parameters (speed, offset) are called with one key and adapted to different specifications; the fault tolerance is enhanced: parameter modification is automatically synchronized to all associated NC files, avoiding manual input errors.

[0021] 3. Generate multi-head NC files based on the distributed task queue, and realize four-head collaborative processing through synchronization instructions and independent coordinate systems. The head utilization rate is increased by 40%: tasks are dynamically allocated, and the processing beat error ≤ 0.1 second; rapid response to exceptions: faults such as tool breakage trigger a global emergency stop and record the fault point coordinates for recovery.

[0022] 4. Propose an R / IJ dual-mode arc calculation algorithm, which supports: R mode: automatically deduce the center coordinates of the starting point / ending point, and solve the rapid calculation of special scenarios such as semi-circles and vertical chords; IJ mode: collinearity verification of three points and solving the center of the circle by Cramer's rule to ensure geometric rationality. The calculation error is reduced by 95%: eliminate the cumulative error of manual calculation; real-time feedback: pop-up prompts for illegal parameters (such as three points collinear, R value too small) and prevent entry.

[0023] 5. Embed the head offset variable in the G-code, and adapt to different head coordinate systems through dynamic parameter loading, realizing "one teaching, multi-machine reuse". The processing accuracy is improved: the offset value is automatically added to the actual coordinates (X actual = X taught + R10); the maintenance cost is reduced: when modifying the head offset, only the variable value needs to be updated, and there is no need to rewrite the NC file.

[0024] 6. A C++ host computer tool based on the Qt framework, integrating teaching programming, path generation, and multi-machine control functions, and being independent of CAD / CAM. Autonomous and controllable: It does not require third-party software authorization, reducing development and maintenance costs; Cross-platform compatible: It supports deployment on Windows / Linux systems and adapts to industrial field environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of the teaching-to-G code model in Embodiment 1 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] The present invention will be further described in detail below with reference to the accompanying drawings.

[0027] Embodiment 1 Referring to Figure 1 , a corner cleaning machine control method based on teaching programming in this embodiment includes: Setting the tool offset parameters of multiple tool heads through the parameter configuration interface; Fixing the profile model on the teaching interface and generating a tool path by moving the axis; Selecting the interpolation type and calculating the path coordinates according to the interpolation type and superimposing the offset value; Verifying the collinearity of three points in the IJ mode and verifying the radius legality in the R mode; Generating an NC file for multiple tool heads and embedding dynamic offset variables and synchronization instructions.

[0028] Specifically: The first step: Parameter configuration interface: Set the offset of each tool on each tool head for subsequent generation of the corner cleaning program.

[0029] The second step: Teaching interface: Create a new program and input the profile code.

[0030] The third step: Teaching interface: Place the window and fix it by clicking the hook material to press it tightly, etc.

[0031] The fourth step: Teaching interface: Select the tool to be operated, move the tool position by clicking the X-axis or Y-axis on the interface, and start the tool to work by clicking the tool action button.

[0032] The fifth step: Select the interpolation type, such as linear interpolation, and the interface will display in real time the step length of this tool reaching the working point after subtracting the offset from the XY axis of this tool.

[0033] The sixth step: Control the tool to move to the tool preparation working position, the start working position, and the working end position respectively through the axis, and click the line insertion to record it in the teaching program list; Step 7: Select circular interpolation and modify the circular interpolation speed; set the circular interpolation method (R\IJ) and the interpolation direction (clockwise, counterclockwise); Step 8: R-mode interpolation: It is necessary to select the starting point and the ending point on the interface and operate the axis and the tool to the starting point and the ending point positions, so that the starting point, the ending point and the R value of this circular interpolation can be recorded. The calculation steps are as follows: a. Definition: Circular arc starting point (x1, y1), ending point (x2, y2) and radius (radius); b. Calculate the distance d between two points: d = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)); pow is for squaring and sqrt is for square root; c. Determine whether the radius is equal to half of the chord length. If radius and d / 2 are equal, it means this circular arc is a semi-circle, and the center and the ending point are at the position of ((x1+x2) / 2, (y1+y2) / 2); d. Determine whether it is a vertical chord (x1 == x2): center_x = x1 ± sqrt(radius² - ((y1-y2) / 2)²); Clockwise: take the negative root -sqrt(...), Counterclockwise: take the positive root +sqrt(...) Origin coordinates: (center_x, (y1+y2) / 2) e. Derivation by simultaneous equations: Construct the equation of the perpendicular bisector of the chord: y = c2 * (x - (x1+x2) / 2) + (y1+y2) / 2, where c2 is the slope; Combine with the circle equation: (x - x1)^2 + (y - y1)^2 = radius², and obtain a quadratic equation after eliminating the variable; Solve the quadratic equation to obtain the center coordinates (x, y); Step 9: IJ circular interpolation: Click on the starting point coordinates, the midpoint coordinates, and the ending point coordinates on the interface respectively, and operate the axis and the tool to the positions of the circular arc points during machining to obtain the positions of three points on a circular arc, and calculate the center and the radius. The calculation steps are as follows: a. Definition: Circular arc starting point (x1, y1), midpoint (x2, y2) and ending point (x3, y3); a=x1-x2; b=y1-y2;c=x1-x2;d=y1-y2; b. Collinearity check of three points: det = b*c - a*d; det < 0 means the three points are collinear and a circle cannot be generated; c. Derive the simultaneous equations: e = ((x1² - x2²) + (y1² - y2²)) / 2; the constant term of the perpendicular bisector equation of the chord from the starting point to the ending point; f = ((x1² - x3²) + (y1² - y3²)) / 2; the constant term of the perpendicular bisector equation of the chord from the starting point to the ending point d. Solve the center coordinates using Cramer's rule: the x-axis coordinate of the center x0 = -(d * e - b * f) / det; the y-axis coordinate of the center y0 = -(a * f - c * e) / det; e. Calculate the radius R = hypot(x1 - x0, y1 - y0); hypot calculates the distance from the center to any point, which is the radius; Step 10: After entering the tool movements required for processing, click Save. Record the tool code, x-axis coordinate, y-axis coordinate, interpolation type, interpolation direction, speed, interpolation method, x-axis and y-axis coordinates of the circle point during circular interpolation, x-axis and y-axis coordinates of the end point, I, J, and R for each line under the profile code corresponding to this profile in the database; Step 11: Steps to generate G code from the entered teaching data: 1. Tool management and start / stop control Tool definition and M code mapping Tool type: Define iRun to identify the tool ID activated by the teaching information of the current line (1 = saw, 2 = upper milling cutter, 3 = upper broaching tool, 5 = horizontal milling cutter, etc.).

[0034] Start / stop instruction mapStopComm: Tool stop command mapping table (e.g., iRun = 2 → M7 stops the upper milling cutter).

[0035] mapStartComm: Tool start command mapping table (e.g., iRun = 5 → M8 starts the horizontal milling cutter).

[0036] Tool change logic Same tool: Only update the motion instruction (e.g., G01 continuous interpolation), without triggering start / stop.

[0037] Different tools Send the M instruction to stop the previous tool (mapStopComm[iRun]); Send the M instruction to start the current tool (mapStartComm[new tool ID]); Update the global status iRun to the current tool ID.

[0038] 2. Interpolation type and path generation Interpolation type judgment First-line judgment: Determine the initial motion type according to the first-line instruction (G01 / G02 / G03) of the teaching data.

[0039] Linear interpolation (G01): Connect the paths directly without additional calculation.

[0040] Circular interpolation (G02 / G03): IJ mode: Calculate the center of the circle through three-point coordinates (call the tcircle function), and check the collinearity of the three points (report an error when the determinant det < 1e-5).

[0041] R mode: Calculate the center of the circle through the radius and direction (call the tcircleByR function), and check the legality of the radius (R ≥ tool radius + safety margin).

[0042] Path generation rules Rapid positioning (G00): Used for non-machining movements (such as resetting to a safe height after tool change).

[0043] Machining movement (G01 / G02 / G03): Generate a continuous path according to the teaching data and dynamically optimize the feed rate (F value).

[0044] 3. G-code generation process Writing the file header Fixed instructions: Initialize the machine coordinate system (G53), position at the safe height (G00 Z10).

[0045] Example code: gcode Copy Code N501 G53 ; Reset the machine coordinate system N502 G00 X170 Y15 ; Position at the initial position Logic of the material picking module (optional) Action sequence: Material picking up (M10) → Clamping (M12) → Machining → Loosening (M13) → Material picking down (M11).

[0046] Generate G-code by traversing the teaching data Parse the teaching data model (pModelProgram) line by line: Column index Content 1 Tool ID (iRun) 2 X coordinate 3 Y coordinate 4 Speed (F value) Dynamically switch tools: cpp Copy Code if (iRun != newToolID) { out << "M" << mapStopComm[iRun] << "\n"; / / Stop the previous tool out << "M" << mapStartComm[newToolID] << "\n"; / / Start the current tool iRun = newToolID; / / Update the current tool } Interpolation command generation: #set paramZeroShift(G54;R10;R11;0)# Set the offset (e.g., R10 is the offset of the saw milling X-axis. In different heads, this offset variable is the specific offset value of this head). G01 X100 Y200 F600 ; Linear interpolation G02 X150 Y150 I25 J0 ; Circular interpolation (IJ mode) Multi-head support: Since the actions of the tools in each head are the same, although the position offsets of each head are different, the variable definitions used are the same. Therefore, by copying the NC file generated by teaching to the other three heads' NC files and modifying the file name and the content of the first line, independent NC files for different heads can be generated (such as L1P100.NC, L2P100.NC) to adapt to distributed processing.

[0047] Dynamic parameter loading: Real-time adjustment of offsets and speeds is achieved through the parameter interface.

[0048] The process model of generating G-code in the above steps by teaching is shown in the appendix Figure 1 。

[0049] Step 12: Editing interface operation: After selecting the profile code, the corner cleaning program entered in the teaching interface is automatically loaded. The commands for linear interpolation can be directly double-clicked to modify, but the interpolation type cannot be modified; for circular interpolation, only the interpolation direction and speed can be modified during operation. Other information modification requires adding a new circular interpolation operation to facilitate verifying the legality of the circular interpolation data; after clicking Save, the database information will be updated and a new NC file will be generated. The present invention is further configured such that the definition of the M function, the definition of the R variable, and the circular interpolation command in the G-code are agreed upon with the PLC side; The present invention is further configured as an optimization and improvement based on the original corner cleaning machine processing technology; The present invention is further configured such that the upper computer tool is a software program in C++ language based on the QT framework; The present invention is further configured to replace the process of relying on companies such as CAD and CAM to generate G-code by means of teaching, which facilitates self-control of the development rhythm and reduces the maintenance cost. In summary, the advantages of this technical solution are as follows: 1. Operational convenience 1.1 Graphical interface interaction: a. Tool offset is set through the parameter configuration interface, simplifying the generation process of the corner cleaning program and reducing the operation threshold.

[0050] b. The teaching interface supports operations such as clicking to select tools, moving axes, and fixing profiles, which is intuitive and easy to use, reducing the complexity of manual programming.

[0051] 1.2 Real-time feedback and dynamic adjustment: a. When selecting the interpolation type, the actual tool step (the value after subtracting the offset from the XY axis) is displayed in real time on the interface, facilitating the operator to immediately verify the rationality of the path (the fifth step).

[0052] b. The editing interface allows direct double-clicking to modify linear interpolation parameters (such as coordinates and speeds), improving the debugging efficiency (the twelfth step).

[0053] 2. Algorithm accuracy and flexibility 2.1 Support for multiple interpolation modes a. Supports linear interpolation (G01) and two circular interpolation methods (R / IJ modes), covering complex machining requirements (the fifth and seventh steps).

[0054] b. R mode: Automatically calculates the center of the circle through the starting point, ending point, and radius, supporting clockwise / counterclockwise directions (the eighth step).

[0055] c. IJ mode: Calculates the center of the circle and radius through three-point coordinates, and uses Cramer's rule to solve equations to ensure the mathematical rigor of the center calculation (the ninth step).

[0056] 2.2 Intelligent verification mechanism a. Performs three-point collinearity verification before circular interpolation (reports an error when det<0), avoiding the generation of invalid paths (the ninth step b).

[0057] b. Restricts the editing interface to only allow modification of the circular interpolation direction and speed, and forces re-operation for newly added illegal data to ensure data legality (the twelfth step).

[0058] 3. System intelligence and automation 3.1 Automatic G-code generation a. Automatically generates G-code based on the teaching data, dynamically manages the start and stop of the tool (M-code mapping) and path connection (the eleventh step 1).

[0059] b. Support independent generation of NC files for multiple heads (such as L1P100.NC), adapting to distributed processing scenarios (Step 11-3).

[0060] 3.2 Dynamic Parameter Loading and Optimization a. Adjust offset and speed parameters in real time through the parameter interface file without recompiling the program (Step 11-3).

[0061] b. Automatically optimize the feed rate (F value) of the machining path to balance efficiency and accuracy (Step 11-2).

[0062] 4. Expandability and Compatibility 4.1 Database Integration and Standardization a. All machining parameters (tool code, coordinates, interpolation method, etc.) are stored in the database, classified and managed by profile code, supporting quick call (Step 10).

[0063] b. When generating G code, it is compatible with the initialization of the machine coordinate system (G53) and the safety height positioning (G00 Z10) to ensure device compatibility (Step 11-3).

[0064] 4.2 Multi-Tool Cooperative Control The tool change logic intelligently processes start and stop commands. For the same tool, only the path is updated. For different tools, the M code is automatically triggered for switching, reducing the idle time (Step 11-1).

[0065] As a further implementation method, 1. Parameter Interface: Support the input of tool parameters for multiple heads. Each tool defines offset variables (such as R10 for the saw milling X-axis offset and R11 for the saw milling Y-axis offset), and support dynamic modification and saving to the PLC; 2. Set Offset: Measure the offset of each tool according to the actual tool installation position of the physical head and complete the input in the parameter interface; 3. Teach Interface: Support the input of tool code, X-axis coordinate, Y-axis coordinate, interpolation type, interpolation direction, speed, interpolation method, X-axis coordinate and Y-axis coordinate of the center point during circular interpolation, end point X-axis coordinate and Y-axis coordinate, and calculate R, I, and J information according to the scenario; 4. Teach Input Operation: Place the window to be taught on the operating table and click the material picking and material pressing buttons to fix the window; 5. Enter the profile code and click New Program; 6. Select different tools to clean the weld seams on the upper, lower, inner, and outer sides of the multi-window welding surface; First step, select saw milling to clean the outer weld. Select a starting position for the saw milling tool, click the new line button, move the X-axis and Y-axis to the uppermost position of the outer weld, and click the new line button; Second step, operate the Y-axis downward until reaching the inflection point of the other X-axis or the lowermost position of the window side, and click insert; if there are changes in X or Y during this process, a teaching record should be inserted; Third step, when arc interpolation is required for saw milling, select the arc interpolation type on the interface and set the interpolation to R mode or IJ mode; Fourth step, select clockwise arc interpolation in R mode, then move X and Y to the starting position of the arc interpolation, click the starting coordinate radio button on the interface. At this time, the values obtained by subtracting the saw milling offsets R10\R11 from the saw milling X and Y axis coordinates will be recorded at the starting coordinate on the interface; move the XY axis to the end coordinate of the arc interpolation again, click the end coordinate radio button. At this time, the values obtained by subtracting the saw milling offsets R10\R11 from the saw milling X and Y axis coordinates will be recorded at the end coordinate; Fifth step, after entering the R length, click the new line button. If it is determined to be arc interpolation, legal verification of the coordinates and R is required to determine whether an arc can be generated; calculate the center position and record it in the teaching list; Sixth step, select counterclockwise arc interpolation in IJ mode, then move X and Y to the starting position of the arc interpolation, click the starting coordinate radio button on the interface. At this time, the values obtained by subtracting the saw milling offsets R10\R11 from the saw milling X and Y axis coordinates will be recorded at the starting coordinate on the interface; click the midpoint coordinate radio button on the interface. At this time, the values obtained by subtracting the saw milling offsets R10\R11 from the saw milling X and Y axis coordinates will be recorded at the midpoint coordinate on the interface; move the XY axis to the end coordinate of the arc interpolation again, click the end coordinate radio button. At this time, the values obtained by subtracting the saw milling offsets R10\R11 from the saw milling XY will be recorded at the end coordinate; click the new line button. It is necessary to verify whether the three points in IJ mode are on the same arc, calculate the center position and the length of the radius R, and record them in the teaching list; Seventh step, select other tools to perform the above cleaning operation on the welds at other positions to complete the cleaning action of one corner of the window; Eighth step, click to generate the program, and it will prompt that the teaching program has been successfully generated. At this time, G code files of this profile code for four machine heads will be added to the NC program folder on the PLC side; Ninth step, return to the debugging interface, select the machine head that needs to verify the corner cleaning program, check whether the input program can achieve the expected effect. Click the form positioning to fix the window, select the profile code that the machine head to work needs to be parented, click the parent program and start it. It will inform the PLC that it needs to load a file such as L1P100.NC. Click the cycle start, and the device will process according to the teaching sequence; Step 10: If the debugging effect is not satisfactory, return to the editing interface to adjust the moving position of the tool, save the program, and then return to the debugging interface to continue debugging; Step 11: Automatic interface: Select the profile code for each corner (with memory function), set the window width, click the parent program and start it. The four-head cleaner will open M1 to the position of the window width + the feeding allowance; After placing the window, M1 will move to the window width position to fix the window; After fixing, the head 1 and head 2 will start to perform the corner cleaning actions recorded by teaching at the same time; after the work of head 1 and 2 is completed, when head 3 and 4 are idle, open the M2 axis to the position of the window width + the feeding allowance, and move the window to the positions of head 3 and 4 through the conveyor belt for fixing and processing; finally, the four-corner cleaning completes the processing of one window and outputs it. As Figure 1 shown in the distribution diagram of the four-head cleaner, head 1#2# and head 3#4# work back to back; When a window comes, it is head 1#2# that completes the corner cleaning operations on the upper left and upper right corners of the window. Head 3#4# completes the corner cleaning operations on the lower left and lower right corners of the window.

[0066] Embodiment 2 This embodiment provides a corner cleaning machine control system based on teaching programming, including: A parameter configuration interface module for setting the tool offset parameters of multiple heads and dynamically associating them with the tool types; A graphical teaching interface module that generates a tool path by dragging the profile model and clicking the axis movement button, and automatically records the coordinates and interpolation types; An arc interpolation calculation module that integrates the R mode and IJ mode algorithms, and automatically derives the center and radius according to the starting point, ending point or three-point coordinates selected by the user; A multi-head cooperative control module that generates independent NC files based on the tool action queue and coordinates the processing timing of the four heads through a synchronization instruction (M61); A dynamic offset compensation module that embeds the tool offset value into the G code variable and adapts to different head coordinate systems.

[0067] A computer-readable storage medium in which multiple instructions are stored, and the instructions are adapted to be loaded and executed by the processor of the terminal device to perform the method.

[0068] A terminal device includes a processor and a computer-readable storage medium. The processor is used to implement each instruction; the computer-readable storage medium is used to store multiple instructions, and the instructions are adapted to be loaded and executed by the processor to perform the method.

[0069] The above are all preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of the present invention shall be covered within the protection scope of the present invention.

Claims

1. A control method for an angle cleaning machine based on teaching programming, characterized in that: include: Set the multi-head tool offset parameters through the parameter configuration interface; Fix the profile model in the teaching interface and generate the tool path by moving the axis; Select the interpolation type, calculate the path coordinates and superimpose the offset value according to the interpolation type; Check the collinearity of three points in IJ mode and the legitimacy of radius in R mode; Generate multi-head NC files and embed dynamic offset variables and synchronization instructions.

2. According to the teaching programming-based control method of the angle cleaning machine of claim 1, it is characterized in that: The profile model is fixed on the teaching interface, and the tool path is generated by axis movement, including creating a new program and entering the profile code on the teaching interface, placing the window and fixing it by clicking the hook and pressing it, selecting the tool to be operated, moving the tool position through the X-axis or Y-axis on the interface, and starting the tool to work through the tool action button.

3. The control method of the angle cleaning machine based on teaching programming according to claim 2 is characterized in that: The interpolation type is selected, and the path coordinates are calculated and the offset value is superimposed according to the interpolation type, including selecting linear interpolation or circular interpolation as the interpolation type. When linear interpolation is selected, the step length of the tool reaching the working point after the tool XY axis minus the offset is displayed in real time using the interface; the tool is controlled by the XY axis to move the tool separately, including the preparation working position, the starting working position and the working end position, and recorded in the teaching program list by line insertion; When circular interpolation is selected, first modify the circular interpolation speed; And set the arc interpolation mode and interpolation direction.

4. The control method of the angle cleaning machine based on teaching programming according to claim 3 is characterized in that: The setting of the arc interpolation mode and interpolation direction includes setting R mode interpolation, wherein the starting point and the end point are selected in the interface and the axis and the tool are operated to the starting point and the end point positions, and the starting point, the end point and the R size of the arc interpolation are recorded, and the distance between the two points is calculated by defining the arc starting point (x1, y1), the end point (x2, y2) and the radius.

5. The control method of the angle cleaning machine based on teaching programming according to claim 1 is characterized in that: The verification of radius legitimacy in R mode includes, after calculating the distance between the two points, determining whether the radius is equal to the half-chord length. If radius and d / 2 are equal, it means that the arc is a semicircle, and the center end point is at ((x1+x2) / 2, (y1+y2) / 2); and determining whether it is a perpendicular chord (x1 == x2): center_x = x1 ± sqrt(radius² - ((y1-y2) / 2)²); clockwise: take the negative root -sqrt(...), counterclockwise: take the positive root +sqrt(...); derive the equations together and construct the perpendicular bisector equation: y = c2 * (x- (x1+x2) / 2) + (y1+y2) / 2, where c2 is the slope; combine the circle equation: (x - x1)^2 + (y - y1)^2 = radius², and get the quadratic equation after elimination; solve the quadratic equation to obtain the coordinates of the center of the circle (x, y).

6. The control method of the angle cleaning machine based on teaching programming according to claim 1 is characterized in that: The setting of the arc interpolation mode and interpolation direction also includes setting IJ arc interpolation, wherein the positions of three points on an arc are obtained by using the starting point coordinates, midpoint coordinates, end point coordinates, operation axis and tool to the position of the arc point during processing in the interface, and the center and radius of the arc are calculated, wherein the three-point collinearity check is performed by defining the arc starting point (x1, y1), midpoint (x2, y2) and end point (x3, y3).

7. The control method of the angle cleaning machine based on teaching programming according to claim 1 is characterized in that: The three-point collinearity check in the IJ mode includes defining the arc start point (x1, y1), midpoint (x2, y2) and end point (x3, y3), a=x1-x2; b=y1-y2; c=x1-x2; d=y1-y2; three-point collinearity check: det=b*ca*d; det<0 means that the three points are collinear and a circle cannot be generated; simultaneous equation derivation e = ((x1² - x2²) + (y1² - y2²)) / 2; constant term of the perpendicular bisector equation of the chord from the start point to the end point; ‌f = ((x1² - x3²) + (y1² - y3²)) / 2; constant term of the perpendicular bisector equation of the chord from the start point to the end point; Cramer's rule solves the coordinates of the center of the circle: the X-axis coordinate of the center of the circle x0 = -(d * e - b * f) / det; the Y-axis coordinate of the center of the circle y0 = -(a * f - c * e) / det; Radius calculation R=hypot(x1 - x0, y1 - y0); hypot calculates the distance from the center of the circle to any point as the radius.

8. The control method of the angle cleaning machine based on teaching programming according to claim 1 is characterized in that: The method generates a multi-head NC file, embeds dynamic offset variables and synchronization instructions, and generates G code according to the input tool action data, wherein tool management and start-stop control are realized through tool definition and M code mapping, action sequences are generated through interpolation type disks and path generation rules, and G code is generated by traversing teaching data.

9. The control method of an angle cleaning machine based on teaching programming according to claim 1 is characterized in that: The method of generating a multi-machine head NC file, embedding dynamic offset variables and synchronization instructions, also includes selecting a profile code, loading a corner clearing program entered in a teaching interface, directly modifying the command for linear interpolation, but not modifying the interpolation type; for circular interpolation, only the interpolation direction and speed are modified, and other information is modified by adding a circular interpolation operation, so as to facilitate verification of the legality of the circular interpolation data; finally, the database information is updated by saving and a new NC file is generated.

10. A control system for an angle cleaning machine based on teaching programming, characterized in that: include: Parameter configuration interface module, used to set tool offset parameters of multiple machine heads and dynamically associate them with tool types; Graphical teaching interface module, which generates tool paths by dragging profile models and clicking axis movement buttons, and automatically records coordinates and interpolation types; The arc interpolation calculation module integrates R mode and IJ mode algorithms to automatically deduce the center and radius of the circle based on the starting point, end point or three-point coordinates selected by the user; The multi-machine head collaborative control module generates independent NC files based on the tool motion queue and coordinates the processing sequence of the four machines through synchronization instructions (M61); The dynamic offset compensation module embeds the tool offset value into the G code variable and adapts it to different machine head coordinate systems.

Citation Information

Patent Citations

  • Wheel hub irregular curved surface polishing method based on CAD / CAM technologies

    CN104875104A

  • Four corner cleaning machine and method

    CN104890166A

  • Teaching programming method of six-axis linkage grinding equipment control system

    CN117681076A

  • Open numerical control system for numerical control corner cleaning machine based on PC (personal computer)

    CN202433738U

Cited By

  • Method and system for quickly defining motion coordinates in numerical control multi-axis machine tool simulation system

    CN121069905A