A method for establishing a workpiece coordinate system based on a numerical control system and related equipment
Through the workpiece coordinate system establishment method based on CNC system, the problem of the difficulty of programming and low coordinate system correction efficiency of the three-dimensional five-axis laser cutting machine when processing complex special-shaped parts is solved, achieving more efficient workpiece processing and lower programming complexity.
Patent Information
- Application Number
- CN202110271772.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-12
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2041-03-12
AI Technical Summary
When processing complex special-shaped parts, the existing three-dimensional five-axis laser cutting machines are difficult to program, have high technical thresholds, and the workpiece coordinate system correction process is cumbersome and has low efficiency.
The workpiece coordinate system establishment method based on the CNC system is adopted. By obtaining the characteristic point coordinates of three-dimensional digital-mode workpieces, the initial workpiece coordinate system is established, the workpiece coordinate system is judged and calibrated, the Euler angle is calculated, the coordinate system is adjusted, and the target workpiece coordinate system is obtained.
It improves the calibration efficiency of the workpiece coordinate system, reduces programming difficulty, reduces programming time and chance of error, and is suitable for complex special-shaped workpieces.
Smart Images

Figure CN115079636B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D laser processing technology, and particularly to a method for establishing a workpiece coordinate system based on a numerical control system and related equipment. Background Art
[0002] Currently, in order to increase the user's optionality for the three-dimensional machine tool cutting system, the prior art has developed a three-dimensional five-axis laser cutting machine based on the Rexroth MTX numerical control system. However, the three-dimensional five-axis laser cutting machine has the disadvantages of high difficulty in numerical control (NC) programming for processing complex shaped parts, high technical threshold for programmers, and at the same time, teaching programming with a teach pendant increases the programming time and the probability of errors, and it is difficult to detect problems. And currently, the calibration process of the workpiece coordinate system is relatively cumbersome, resulting in low efficiency. Summary of the Invention
[0003] The purpose of the embodiments of this application is to propose a method for establishing a workpiece coordinate system based on a numerical control system and related equipment, which can effectively improve efficiency.
[0004] To solve the above technical problems, the embodiments of this application provide a method for establishing a workpiece coordinate system based on a numerical control system, and adopt the following technical solutions:
[0005] A method for establishing a workpiece coordinate system based on a numerical control system includes the following steps:
[0006] The numerical control system obtains the coordinates of three feature points of a three-dimensional digital model workpiece pre-drawn in a drafting numerical control software as digital model coordinates respectively, where the three feature points are three points specified in advance on the three-dimensional digital model workpiece;
[0007] An initial workpiece coordinate system is established, and three workpiece coordinates input by the user are received. The workpiece coordinates are the coordinates corresponding to the feature points obtained by the user measuring the actual workpiece based on the initial workpiece coordinate system;
[0008] It is judged whether the digital model coordinates and the workpiece coordinates meet the calibration conditions. When the digital model coordinates and the workpiece coordinates meet the calibration conditions, the workpiece coordinates are calibrated to obtain calibrated coordinates;
[0009] The Euler angles between each of the digital model coordinates and the corresponding calibrated coordinates are calculated to obtain target Euler angles;
[0010] The initial workpiece coordinate system is adjusted based on the target Euler angles to obtain a target workpiece coordinate system.
[0011] Further, the step of judging whether the digital model coordinates and the workpiece coordinates meet the calibration conditions includes:
[0012] Calculate the error between the digital model coordinates and the workpiece coordinates to obtain a first error value;
[0013] Determine whether the first error value is greater than or equal to a first error threshold;
[0014] When the first error value is greater than or equal to the first error threshold, determine that the digital model coordinates and the workpiece coordinates do not meet the calibration conditions;
[0015] When the first error value is less than the first error threshold, determine that the digital model coordinates and the workpiece coordinates meet the calibration conditions.
[0016] Furthermore, the step of calibrating the workpiece coordinates to obtain calibrated coordinates includes:
[0017] Connect the three coordinate points corresponding to the digital model coordinates to obtain a digital model triangle, and connect the three coordinate points corresponding to the workpiece coordinates to obtain a workpiece triangle;
[0018] Adjust the workpiece triangle based on a compensation algorithm to obtain a calibrated triangle, and use the coordinates of the three vertices of the calibrated triangle as the calibrated coordinates respectively.
[0019] Furthermore, the step of adjusting the workpiece triangle based on the compensation algorithm to obtain a calibrated triangle includes:
[0020] Move any one of the coordinate points corresponding to the workpiece coordinates to obtain an initial triangle, and use the coordinates of the three vertices of the initial triangle as initial coordinates respectively;
[0021] Calculate the error between the initial coordinates and the digital model coordinates to obtain a second error value;
[0022] Determine whether the second error value is greater than or equal to a second error threshold;
[0023] When the second error value is greater than or equal to the second error threshold, move any one of the remaining coordinate points corresponding to the workpiece coordinates until the second error value is less than the second error threshold;
[0024] When the second error value is less than the second error threshold, obtain the calibrated triangle.
[0025] Furthermore, after the step of determining whether the digital model coordinates and the workpiece coordinates meet the calibration conditions, it further includes:
[0026] When the digital model coordinates and the workpiece coordinates do not meet the calibration conditions, send an error alert to a designated person by email or text message, where the error alert includes the digital model coordinates and the workpiece coordinates.
[0027] Further, the step of adjusting the initial workpiece coordinate system based on the target Euler angles to obtain a target workpiece coordinate system includes:
[0028] Calculate the average value of the target Euler angles to obtain an average Euler angle;
[0029] Adjust the initial workpiece coordinate system based on the average Euler angle to obtain the target workpiece coordinate system.
[0030] Further, the step of adjusting the initial workpiece coordinate system based on the target Euler angles to obtain a target workpiece coordinate system includes:
[0031] Rotate and offset the initial workpiece coordinate system based on the target Euler angles to obtain the target workpiece coordinate system.
[0032] To solve the above technical problems, an embodiment of the present application further provides a workpiece coordinate system establishment device based on a numerical control system, which adopts the following technical solutions:
[0033] A numerical control system includes a workpiece coordinate system establishment device based on a numerical control system, wherein the workpiece coordinate system establishment device based on a numerical control system includes:
[0034] An acquisition module, configured to acquire the coordinates of three feature points of a three-dimensional digital model workpiece pre-drawn in a drafting numerical control software as digital model coordinates respectively, wherein the three feature points are three points on the pre-specified three-dimensional digital model workpiece;
[0035] A receiving module, configured to establish an initial workpiece coordinate system and receive three workpiece coordinates input by a user, where the workpiece coordinates are coordinates corresponding to the feature points obtained by the user measuring an actual workpiece based on the initial workpiece coordinate system;
[0036] A calibration module, configured to determine whether the digital model coordinates and the workpiece coordinates meet the calibration conditions, and calibrate the workpiece coordinates to obtain calibrated coordinates when the digital model coordinates and the workpiece coordinates meet the calibration conditions;
[0037] A calculation module, configured to calculate the Euler angles between the digital model coordinates and the calibrated coordinates; and
[0038] An adjustment module, configured to adjust the initial workpiece coordinate system based on the Euler angles to obtain a target workpiece coordinate system.
[0039] To solve the above technical problems, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
[0040] A computer device includes a memory and a processor. Computer-readable instructions are stored in the memory. When the processor executes the computer-readable instructions, the steps of the above-mentioned method for establishing a workpiece coordinate system based on a numerical control system are implemented.
[0041] To solve the above technical problems, an embodiment of the present application further provides a computer-readable storage medium, adopting the following technical solution:
[0042] A computer-readable storage medium has computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor, the steps of the above-mentioned method for establishing a workpiece coordinate system based on a numerical control system are implemented.
[0043] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:
[0044] In the present application, by combining the drafting numerical control software with the Rexroth MTX numerical control system, the three-dimensional digital model workpiece is input into the drafting numerical control software, and the numerical control cutting program is output through the drafting numerical control software. The MTX numerical control system calibrates the initial workpiece coordinate system according to the digital model coordinates to obtain a more accurate target workpiece coordinate system. Then, the MTX numerical control system cuts the workpiece according to the target workpiece coordinate system through the numerical control cutting program, which is convenient to operate, has low requirements for programmers, effectively improves efficiency, and is especially suitable for complex special-shaped workpieces. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] To more clearly illustrate the solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0046] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
[0047] Figure 2 is a flowchart of an embodiment of the method for establishing a workpiece coordinate system based on a numerical control system according to the present application;
[0048] Figure 3 is a schematic structural diagram of an embodiment of the device for establishing a workpiece coordinate system based on a numerical control system according to the present application;
[0049] Figure 4 is a schematic structural diagram of an embodiment of the computer device according to the present application.
[0050] Reference numerals: 200, computer device; 201, memory; 202, processor; 203, network interface; 300, workpiece coordinate system establishment device based on a numerical control system; 301, acquisition module; 302, receiving module; 303, calibration module; 304, calculation module; 305, adjustment module. Detailed implementation
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the specification and claims of this application or the above drawings are used to distinguish different objects and not to describe a specific order.
[0052] Reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of this application. The phrase does not necessarily refer to the same embodiment when it appears in various places in the specification, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0053] To enable those skilled in the technical field to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the drawings.
[0054] As Figure 1 shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0055] Users can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0056] The terminal devices 101, 102, and 103 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, and so on.
[0057] The server 105 can be a server that provides various services, such as a background server that supports the pages displayed on the terminal devices 101, 102, and 103.
[0058] It should be noted that the method for establishing a workpiece coordinate system based on a numerical control system provided by the embodiments of the present application is generally executed by a server / terminal device. Correspondingly, the device for establishing a workpiece coordinate system based on a numerical control system is generally set in the server / terminal device.
[0059] It should be understood that Figure 1 the numbers of the terminal devices, network, and server in
[0060] Continuing to refer to Figure 2 , a flowchart of an embodiment of the method for establishing a workpiece coordinate system based on a numerical control system according to the present application is shown. The method for establishing a workpiece coordinate system based on a numerical control system includes the following steps:
[0061] S1: Obtain the coordinates of three feature points of the three-dimensional digital model workpiece pre-drawn in the drafting numerical control software, and use them as digital model coordinates respectively, where the three feature points are three points on the three-dimensional digital model workpiece specified in advance.
[0062] In this embodiment, the drafting numerical control software of the present application refers to CAM (Computer Aided Manufacturing) software. The MTX system described below in the present application is purchased from Bosch Rexroth AG in Germany, and its full name is IndraMotion MTX system, which can be obtained through conventional commercial channels. The MTX system is a numerical control system. By using the coordinates of the three feature points of the three-dimensional digital model workpiece as digital model coordinates respectively, the present application ensures the accuracy of the digital model coordinates and reduces the influence of the digital model coordinates on the subsequent calibration of the workpiece coordinates when the digital model coordinates are used as a reference.
[0063] S2: Establish an initial workpiece coordinate system and receive three workpiece coordinates input by the user. The workpiece coordinates are the coordinates corresponding to the feature points obtained by the user through measuring the actual workpiece based on the initial workpiece coordinate system.
[0064] In this embodiment, an initial workpiece coordinate system is established in the MTX system. The staff places the actual workpiece at the machining area position of the machine tool, and measures and obtains the three-point coordinates corresponding to the three feature points through the machine tool teach pendant, which are used as the workpiece coordinates respectively.
[0065] In this embodiment, the electronic device (such as Figure 1 the server / terminal device shown) on which the workpiece coordinate system establishment method based on the numerical control system runs can receive the three workpiece coordinates input by the user through a wired connection or a wireless connection. It should be noted that the above wireless connection methods can include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other currently known or future-developed wireless connection methods.
[0066] S3: Determine whether the digital model coordinates and the workpiece coordinates meet the calibration conditions. When the digital model coordinates and the workpiece coordinates meet the calibration conditions, calibrate the workpiece coordinates to obtain calibrated coordinates.
[0067] In this embodiment, it is determined whether the digital model coordinates and the workpiece coordinates meet the calibration conditions through CNC (Computer Number Control) data calculation and analysis. By judging whether the digital model coordinates and the workpiece coordinates meet the calibration conditions, the present application realizes the precise calibration of the workpiece coordinates, improves the accuracy of the obtained calibrated coordinates. At the same time, by calibrating the workpiece coordinates and obtaining the target workpiece coordinate system, the workpiece coordinate error is reduced, the accuracy of the workpiece machining position is ensured, and machining errors during workpiece machining are avoided.
[0068] Specifically, the step of determining whether the digital model coordinates and the workpiece coordinates meet the calibration conditions includes:
[0069] Calculate the error between the digital model coordinates and the workpiece coordinates to obtain a first error value;
[0070] Determine whether the first error value is greater than or equal to a first error threshold;
[0071] When the first error value is greater than or equal to the first error threshold, determine that the digital model coordinates and the workpiece coordinates do not meet the calibration conditions;
[0072] When the first error value is less than the first error threshold, it is determined that the digital-analog coordinates and the workpiece coordinates meet the calibration conditions.
[0073] In this embodiment, the present application realizes the precise calibration of the workpiece coordinates by judging whether the digital-analog coordinates and the workpiece coordinates meet the calibration conditions, and improves the accuracy of the obtained calibrated coordinates.
[0074] In addition, the step of calibrating the workpiece coordinates to obtain calibrated coordinates includes:
[0075] Connect the three coordinate points corresponding to the digital-analog coordinates to obtain a digital-analog triangle, and connect the three coordinate points corresponding to the workpiece coordinates to obtain a workpiece triangle;
[0076] Adjust the workpiece triangle based on a compensation algorithm to obtain a calibrated triangle, and use the coordinates of the three vertices of the calibrated triangle as the calibrated coordinates respectively.
[0077] In this embodiment, during the calibration process, it is necessary to ensure the consistency of two triangles, namely the digital-analog triangle and the workpiece triangle. Adjust the workpiece triangle through a compensation algorithm to reduce the error between the digital-analog triangle and the workpiece triangle and obtain a calibrated triangle. In this embodiment, a calibrated triangle is obtained through a compensation algorithm, so that the workpiece coordinates can be precisely calibrated through this calibrated triangle, improving the accuracy of workpiece coordinate calibration.
[0078] Among them, the step of adjusting the workpiece triangle based on a compensation algorithm to obtain a calibrated triangle includes:
[0079] Move any one of the coordinate points corresponding to the workpiece coordinates to obtain an initial triangle, and use the coordinates of the three vertices of the initial triangle as initial coordinates respectively;
[0080] Calculate the error between the initial coordinates and the digital-analog coordinates to obtain a second error value;
[0081] Determine whether the second error value is greater than or equal to a second error threshold;
[0082] When the second error value is greater than or equal to the second error threshold, move any one of the remaining coordinate points corresponding to the workpiece coordinates until the second error value is less than the second error threshold;
[0083] When the second error value is less than the second error threshold, obtain the calibrated triangle.
[0084] In this embodiment, the second error threshold of the present application is smaller than the first error threshold. Calculate the error between the initial coordinates and the digital model coordinates. When it is not within the error range, continue to move the feature points and recalculate the error between the coordinates until the second error value is smaller than the second error threshold, that is, within the error range, and determine that the calibration triangle is obtained. The present application calibrates the initial workpiece coordinates through the calibration triangle, improves the efficiency of workpiece coordinate calibration, and reduces the coordinate error. During the movement of the coordinate points, determine the two sides of the triangle connected to the current coordinate point in the initial triangle as the initial sides respectively; determine the coordinate point corresponding to the current coordinate point in the digital model triangle as the digital model coordinate point; determine the two sides of the triangle connected to the digital model coordinate point in the digital model triangle as the digital model sides respectively. Subtract the corresponding initial side from the digital model side to obtain the difference in side length. When the differences in side length are all positive, use the initial side with the larger difference in side length as the first target side; move the current coordinate point in the direction away from the coordinate point connected to the first target side. When the differences in side length are all negative, use the initial side with the smaller difference in side length as the second target side; move the current coordinate point in the direction of the coordinate point connected to the second target side. Through the above adjustment, the two triangles tend to be congruent.
[0085] S4: Calculate the Euler angles between each of the digital model coordinates and the corresponding calibration coordinates to obtain the target Euler angles.
[0086] In this embodiment, the Euler angles between each digital model coordinate and the corresponding calibration coordinate are calculated through the function PT2EUL in the MTX system to obtain the target Euler angles. The Euler angles of the three feature points are calculated through the system function PT2EUL in the MTX system to obtain three target Euler angles. The finite rotation of a component in three-dimensional space can be successively represented by three relative rotation angles, namely the precession angle, the nutation angle, and the spin angle, and these three rotation angles are collectively referred to as Euler angles. Euler angles can also be used to describe the positional relationship between one reference system (usually a coordinate system) and another reference system, and these three rotation angles are usually defined as α, β, and γ.
[0087] S5: Adjust the initial workpiece coordinate system based on the target Euler angles to obtain the target workpiece coordinate system.
[0088] In this embodiment, through the G152 function in the MTX system, the initial workpiece coordinate system is rotated and offset according to the target Euler angles to establish a new coordinate system, and thus the new coordinate system is used as the target workpiece coordinate system.
[0089] Specifically, the step of adjusting the initial workpiece coordinate system based on the target Euler angles to obtain the target workpiece coordinate system includes:
[0090] Calculate the average value of the target Euler angles to obtain the average Euler angle;
[0091] Adjust the initial workpiece coordinate system based on the average Euler angles to obtain the target workpiece coordinate system.
[0092] In this embodiment, by taking the average of the three target Euler angles, the values of each Euler angle are fully considered. By using the obtained average Euler angles to adjust the initial workpiece coordinate system, a better target workpiece coordinate system can be obtained. In this embodiment, by calculating the average value of the target Euler angles to adjust the initial workpiece coordinate system, the accuracy of the target workpiece coordinate system is ensured, making the obtained target workpiece coordinate system more accurate. According to the three relative rotation angles of the average Euler angles, namely the precession angle, the nutation angle, and the spin angle, the initial workpiece coordinate system is rotated and offset to obtain the target workpiece coordinate system.
[0093] It should be noted that in this application, the average Euler angles can be obtained by taking the average of the target Euler angles. At the same time, other processing methods for the target Euler angles can also be selected according to actual needs. For example, the median of the three target Euler angles can be taken as the median Euler angle, and the initial workpiece coordinate system is adjusted by the median Euler angle. In actual operation, it can be selected according to actual needs as long as it is applicable.
[0094] In addition, the step of adjusting the initial workpiece coordinate system based on the target Euler angles to obtain the target workpiece coordinate system includes:
[0095] Rotate and offset the initial workpiece coordinate system based on the target Euler angles to obtain the target workpiece coordinate system.
[0096] In this embodiment, in this application, by performing rotation and offset on the target Euler angles to adjust the initial workpiece coordinates, the acquisition efficiency of the target workpiece coordinate system is improved. The specific process of rotating and offsetting the initial workpiece coordinate system based on the target Euler angles is as follows: The initial workpiece coordinate system first rotates by an α angle around the x-axis, then rotates by a β angle around the y-axis, and finally rotates by a γ angle around the Z-axis. In actual operation, according to needs, different axis rotations can be used to define the Euler angles as long as it is applicable.
[0097] In some alternative implementation manners of this embodiment, after step S3: determining whether the digital model coordinates and the workpiece coordinates meet the calibration conditions, the above electronic device may further perform the following steps:
[0098] When the digital model coordinates and the workpiece coordinates do not meet the calibration conditions, send an error alert to a designated person by email or text message, where the error alert includes the digital model coordinates and the workpiece coordinates.
[0099] In this embodiment, when the digital-analog coordinates and the workpiece coordinates do not meet the calibration conditions, it is determined as data error and an error alarm is output. By sending the error alarm, this embodiment realizes the timely investigation of the workpiece coordinates and digital-analog coordinates that do not meet the calibration conditions, and further improves the efficiency of three-dimensional modeling of the workpiece.
[0100] It should be noted that: The coordinates in this application refer to three-dimensional coordinates, that is, (X, Y, Z). The coordinate system in this application also refers to a three-dimensional coordinate system, that is, the xyz coordinate system.
[0101] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), etc., or a Random Access Memory (RAM), etc.
[0102] It should be understood that although the steps in the flowchart of the drawings are shown in sequence according to the indication of the arrows, these steps do not necessarily have to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps does not have a strict order limit, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the drawings may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily have to be executed at the same time, but can be executed at different times. Their execution order does not necessarily have to be sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0103] For further reference Figure 3 , as an implementation of the method shown above Figure 2 , this application provides an embodiment of a workpiece coordinate system establishment device based on a numerical control system. This device embodiment corresponds to Figure 2 the method embodiment shown, and this device can be specifically applied to various electronic devices.
[0104] As Figure 3As shown in the figure, the workpiece coordinate system establishment device 300 based on the numerical control system in this embodiment includes: an acquisition module 301, configured to acquire the coordinates of three feature points of a three-dimensional digital model workpiece pre-drawn in a drawing numerical control software as digital model coordinates respectively, where the three feature points are three points on the three-dimensional digital model workpiece specified in advance; a receiving module 302, configured to establish an initial workpiece coordinate system and receive three workpiece coordinates input by a user, where the workpiece coordinates are the coordinates corresponding to the feature points obtained by the user measuring an actual workpiece based on the initial workpiece coordinate system; a calibration module 303, configured to determine whether the digital model coordinates and the workpiece coordinates meet the calibration conditions, and calibrate the workpiece coordinates to obtain calibrated coordinates when the digital model coordinates and the workpiece coordinates meet the calibration conditions; a calculation module 304, configured to calculate the Euler angle between the digital model coordinates and the calibrated coordinates; and an adjustment module 305, configured to adjust the initial workpiece coordinate system based on the Euler angle to obtain a target workpiece coordinate system.
[0105] In this embodiment, the present application combines the drawing numerical control software with the Rexroth MTX numerical control system, inputs the three-dimensional digital model workpiece into the drawing numerical control software, outputs a numerical control cutting program through the drawing numerical control software, and the MTX numerical control system calibrates the initial workpiece coordinate system according to the digital model coordinates to obtain a more accurate target workpiece coordinate system. Then, the MTX numerical control system cuts the workpiece according to the target workpiece coordinate system through the numerical control cutting program, which is convenient to operate, has low requirements for programmers, effectively improves efficiency, and is especially suitable for complex special-shaped workpieces.
[0106] The calibration module 303 includes a calculation sub-module, a first determination sub-module, a second determination sub-module, and a third determination sub-module. Among them, the calculation sub-module is configured to calculate the error between the digital model coordinates and the workpiece coordinates to obtain a first error value; the first determination sub-module is configured to determine whether the first error value is greater than or equal to a first error threshold; the second determination sub-module is configured to determine that the digital model coordinates and the workpiece coordinates do not meet the calibration conditions when the first error value is greater than or equal to the first error threshold; the third determination sub-module is configured to determine that the digital model coordinates and the workpiece coordinates meet the calibration conditions when the first error value is less than the first error threshold.
[0107] The calibration module 303 further includes a connection sub-module and an adjustment sub-module. Among them, the connection sub-module is configured to connect the three coordinate points corresponding to the digital model coordinates to obtain a digital model triangle, and connect the three coordinate points corresponding to the workpiece coordinates to obtain a workpiece triangle; the adjustment sub-module is configured to adjust the workpiece triangle based on a compensation algorithm to obtain a calibrated triangle, and use the coordinates of the three vertices of the calibrated triangle as the calibrated coordinates respectively.
[0108] The adjustment sub-module includes a moving unit, a calculating unit, a determining unit, a stopping unit, and an obtaining unit. Among them, the moving unit is used for any coordinate point corresponding to the workpiece coordinates to obtain an initial triangle, and the coordinates of the three vertices of the initial triangle are respectively used as initial coordinates; the calculating unit is used to calculate the error between the initial coordinates and the digital model coordinates to obtain a second error value; the determining unit is used to determine whether the second error value is greater than or equal to a second error threshold; the stopping unit is used to move any one of the remaining coordinate points corresponding to the workpiece coordinates when the second error value is greater than or equal to the second error threshold until the second error value is less than the second error threshold; the obtaining unit is used to obtain the calibration triangle when the second error value is less than the second error threshold.
[0109] The adjustment module 305 includes an averaging sub-module and a target sub-module. Among them, the averaging sub-module is used to calculate the average value of the target Euler angles to obtain an average Euler angle; the target sub-module is used to adjust the initial workpiece coordinate system based on the average Euler angle to obtain the target workpiece coordinate system.
[0110] In some optional implementation manners of this embodiment, the above adjustment module 305 is further configured to: rotate and offset the initial workpiece coordinate system based on the target Euler angles to obtain the target workpiece coordinate system.
[0111] In some optional implementation manners of this embodiment, the above device 300 further includes: an alarm module, configured to send an error alarm to a designated person by email or text message when the digital model coordinates and the workpiece coordinates do not meet the calibration conditions, where the error alarm includes the digital model coordinates and the workpiece coordinates.
[0112] This application combines the drafting CNC software with the Rexroth MTX CNC system, inputs the three-dimensional digital model workpiece into the drafting CNC software, outputs the CNC cutting program through the drafting CNC software, and the MTX CNC system calibrates the initial workpiece coordinate system according to the digital model coordinates to obtain a more accurate target workpiece coordinate system. Then, the MTX CNC system cuts the workpiece according to the target workpiece coordinate system through the CNC cutting program, which is convenient to operate, has low requirements for programmers, effectively improves efficiency, and is especially suitable for complex special-shaped workpieces.
[0113] To solve the above technical problems, the embodiment of this application also provides a computer device. For details, please refer to Figure 4 , Figure 4 which is the basic structural block diagram of the computer device in this embodiment.
[0114] The computer device 200 includes a memory 201, a processor 202, and a network interface 203 that are communicatively connected to each other via a system bus. It should be noted that only the computer device 200 with components 201 - 203 is shown in the figure. However, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Among them, those skilled in the art of this technology can understand that a computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0115] The computer device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The computer device can perform human-computer interaction with users through means such as a keyboard, a mouse, a remote control, a touchpad, or a voice control device.
[0116] The memory 201 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disks, multimedia cards, card-type memories (such as SD or DX memories, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memories, magnetic disks, optical discs, etc. In some embodiments, the memory 201 can be an internal storage unit of the computer device 200, such as the hard disk or memory of the computer device 200. In other embodiments, the memory 201 can also be an external storage device of the computer device 200, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 200. Of course, the memory 201 can also include both the internal storage unit and the external storage device of the computer device 200. In this embodiment, the memory 201 is generally used to store the operating system and various application software installed on the computer device 200, such as computer-readable instructions for the method of establishing a workpiece coordinate system based on a numerical control system. In addition, the memory 201 can also be used to temporarily store various data that have been output or will be output.
[0117] In some embodiments, the processor 202 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 202 is generally used to control the overall operation of the computer device 200. In this embodiment, the processor 202 is used to run the computer-readable instructions stored in the memory 201 or process data, such as running the computer-readable instructions of the method for establishing a workpiece coordinate system based on a numerical control system.
[0118] The network interface 203 may include a wireless network interface or a wired network interface. The network interface 203 is generally used to establish a communication connection between the computer device 200 and other electronic devices.
[0119] In this embodiment, the present application is easy to operate, has low requirements for programmers, and effectively improves efficiency.
[0120] The present application also provides another implementation manner, that is, to provide a computer-readable storage medium storing computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to execute the steps of the method for establishing a workpiece coordinate system based on a numerical control system as described above.
[0121] In this embodiment, the present application is easy to operate, has low requirements for programmers, and effectively improves efficiency.
[0122] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0123] Obviously, the embodiments described above are only a part of the embodiments of this application, rather than all of them. The accompanying drawings show the preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosed content of this application more thorough and comprehensive. Although this application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions described in the foregoing specific embodiments, or perform equivalent replacements on some of the technical features. Any equivalent structure that makes use of the content of this application's specification and drawings, directly or indirectly applied in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for establishing a workpiece coordinate system based on a numerical control system, characterized in that, it includes the following steps: The numerical control system obtains the coordinates of three feature points of a three-dimensional digital model workpiece pre-drawn in a drafting numerical control software, and uses them as digital model coordinates respectively. Among them, the three feature points are three points on the three-dimensional digital model workpiece specified in advance; An initial workpiece coordinate system is established, and three workpiece coordinates input by the user are received. The workpiece coordinates are the coordinates corresponding to the feature points obtained by the user measuring the actual workpiece based on the initial workpiece coordinate system; Judge whether the digital model coordinates and the workpiece coordinates meet the calibration conditions. When the digital model coordinates and the workpiece coordinates meet the calibration conditions, calibrate the workpiece coordinates to obtain calibrated coordinates. Among them, the step of calibrating the workpiece coordinates to obtain calibrated coordinates includes: Connect the three coordinate points corresponding to the digital model coordinates to obtain a digital model triangle, and connect the three coordinate points corresponding to the workpiece coordinates to obtain a workpiece triangle. Adjust the workpiece triangle based on a compensation algorithm to obtain a calibrated triangle, and use the coordinates of the three vertices of the calibrated triangle as the calibrated coordinates respectively. Among them, the step of adjusting the workpiece triangle based on the compensation algorithm to obtain a calibrated triangle includes: Move any coordinate point corresponding to the workpiece coordinates to obtain an initial triangle, and use the coordinates of the three vertices of the initial triangle as initial coordinates respectively. Calculate the error between the initial coordinates and the digital model coordinates to obtain a second error value. Determine whether the second error value is greater than or equal to a second error threshold. When the second error value is greater than or equal to the second error threshold, move any one of the remaining coordinate points corresponding to the workpiece coordinates until the second error value is less than the second error threshold. When the second error value is less than the second error threshold, obtain the calibrated triangle; Calculate the Euler angles between each digital model coordinate and the corresponding calibrated coordinate to obtain target Euler angles; Adjust the initial workpiece coordinate system based on the target Euler angles to obtain a target workpiece coordinate system.
2. The method for establishing a workpiece coordinate system based on a numerical control system according to claim 1, characterized in that, the step of judging whether the digital model coordinates and the workpiece coordinates meet the calibration conditions includes: Calculate the error between the digital model coordinates and the workpiece coordinates to obtain a first error value; Determine whether the first error value is greater than or equal to a first error threshold; When the first error value is greater than or equal to the first error threshold, determine that the digital model coordinates and the workpiece coordinates do not meet the calibration conditions; When the first error value is less than the first error threshold, determine that the digital model coordinates and the workpiece coordinates meet the calibration conditions.
3. The method for establishing a workpiece coordinate system based on a numerical control system according to claim 1, characterized in that, after the step of judging whether the digital model coordinates and the workpiece coordinates meet the calibration conditions, it further includes: When the digital-analog coordinates and the workpiece coordinates do not meet the calibration conditions, an error alert is sent to the designated person via email or text message, where the error alert includes the digital-analog coordinates and the workpiece coordinates.
4. The method for establishing a workpiece coordinate system based on a numerical control system according to claim 1, characterized in that the step of adjusting the initial workpiece coordinate system based on the target Euler angles to obtain a target workpiece coordinate system includes: calculating the average value of the target Euler angles to obtain an average Euler angle; adjusting the initial workpiece coordinate system based on the average Euler angle to obtain the target workpiece coordinate system.
5. The method for establishing a workpiece coordinate system based on a numerical control system according to claim 1, characterized in that the step of adjusting the initial workpiece coordinate system based on the target Euler angles to obtain a target workpiece coordinate system includes: rotating and offsetting the initial workpiece coordinate system based on the target Euler angles to obtain the target workpiece coordinate system.
6. A numerical control system, characterized in that it includes a workpiece coordinate system establishing device based on a numerical control system, where the workpiece coordinate system establishing device based on a numerical control system includes: an acquisition module, configured to acquire the coordinates of three feature points of a three-dimensional digital-analog workpiece pre-drawn in a drafting numerical control software, respectively as digital-analog coordinates, where the three feature points are three points on the pre-specified three-dimensional digital-analog workpiece; a receiving module, configured to establish an initial workpiece coordinate system and receive three workpiece coordinates input by a user, where the workpiece coordinates are the coordinates corresponding to the feature points obtained by the user measuring an actual workpiece based on the initial workpiece coordinate system; a calibration module, configured to determine whether the digital-analog coordinates and the workpiece coordinates meet the calibration conditions, and when the digital-analog coordinates and the workpiece coordinates meet the calibration conditions, calibrate the workpiece coordinates to obtain calibrated coordinates, where the calibration module includes a connection sub-module and an adjustment sub-module: The connection sub-module is configured to connect the three coordinate points corresponding to the digital-analog coordinates to obtain a digital-analog triangle, and connect the three coordinate points corresponding to the workpiece coordinates to obtain a workpiece triangle; the adjustment sub-module is configured to adjust the workpiece triangle based on a compensation algorithm to obtain a calibrated triangle, and use the coordinates of the three vertices of the calibrated triangle as the calibrated coordinates respectively; wherein, the adjustment sub-module includes a moving unit, a calculating unit, a determining unit, a stopping unit and an obtaining unit: The moving unit is used to move the coordinate points corresponding to any one of the workpiece coordinates to obtain an initial triangle, and use the coordinates of the three vertices of the initial triangle as the initial coordinates respectively. The calculating unit is used to calculate the error between the initial coordinates and the digital model coordinates to obtain a second error value. The determining unit is used to determine whether the second error value is greater than or equal to a second error threshold. The stopping unit is used to move any one of the remaining coordinate points corresponding to the workpiece coordinates when the second error value is greater than or equal to the second error threshold until the second error value is less than the second error threshold. The obtaining unit is used to obtain the calibration triangle when the second error value is less than the second error threshold; A calculating module, which is used to calculate the Euler angles between the digital model coordinates and the calibration coordinates; and an adjusting module, which is used to adjust the initial workpiece coordinate system based on the Euler angles to obtain a target workpiece coordinate system.
7. A computer device, characterized in that, it includes a memory and a processor, and computer-readable instructions are stored in the memory. When the processor executes the computer-readable instructions, the steps of the method for establishing a workpiece coordinate system based on a numerical control system according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that, computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the steps of the method for establishing a workpiece coordinate system based on a numerical control system according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Robot calibration method and system based on positioning tool
CN111168719A
Roadside radar adaptive correction method and system
CN111427019A