This application claims priority to Chinese Patent Application No. 201310383735.2 filed on Aug. 29, 2013 in the State Intellectual Property Office of the People's Republic of China, the contents of which are incorporated by reference herein.
Embodiments of the present disclosure relate to machining technology, and particularly to a computing device and a method for compensating step values of a machining device using the computing device.
When a computer numerical control (CNC) machining device processes a product, the processing in a Z axis direction is generally not even because thicknesses of processing materials may be inconsistent throughout the product. Furthermore, a clamping fixture of the CNC machining device is not ensured to be perfectly perpendicular to a normal vector of a machining spindle of the CNC machining device. Therefore, a large around of processing errors may be generated , causing the thickness of the processed product to be inconsistent.
Implementations of the present disclosure will be described, by way of example only, with reference to the following drawings. The modules in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like reference numerals designate corresponding portions throughout the views.
The present disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references can mean “at least one,” or “one or more.” It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features. The description is not to be considered as limiting the scope of the embodiments described herein.
In the present disclosure, “module,” refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a program language. In one embodiment, the program language can be Java, C, or assembly. One or more software instructions in the modules can be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein can be implemented as either software and/or hardware modules and can be stored in any type of non-transitory computer-readable media or storage medium. Non-limiting examples of a non-transitory computer-readable medium include CDs, DVDs, flash memory, and hard disk drives. The term “comprising” means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series and the like.
In one embodiment, the computing device 1 is connected to a machining device 2 through a data cable 3. The machining device 2 can be a computer numerical control (CNC) machining device. The machining device 2 executes a machining process for a processing product 206 placed on the machining device 2 by precisely programmed commands. In this embodiment, the machining device 2 includes, but is not limited to, a clamping fixture 20, a laser detection device 22, a machining spindle 24, and a machining tool 26.
In one embodiment, the storage system 12 can store a machining program for the processing product 206. The machining program includes original coordinate values of machining points of a machining path for the processing product 206, and original coordinate values of a plurality of machining benchmark points. The step compensation system 20 can calculate a step compensation value in Z-axis for each of the machining points using the laser detection device 22, and transmit the calculated step compensation value to the machining device 2 for processing the product correctly.
The control module 100 configures to control the machining tool 26 of the machining device 2 to move to a plurality of the benchmark points of the machining program in sequence by moving the X-axis linear motor 201 and the Z-axis linear motor 203 according to the an X-axis optical ruler 202, the Z-axis optical ruler 204 and the tool optical ruler 205. In one embodiment, the step compensation system 10 controls the machining tool 26 to move to at least four benchmark points using the control module 100.
The detection module 101 configures to control the dustproof cap 2200 of the laser detection device 22 to be opened, and acquire actual coordinate values of each of the benchmark points when the machining tool 26 is moved to each of the benchmark points. In one embodiment, the detection module 101 acquires actual coordinate values of each of the benchmark points by controlling the laser detection device 22 to project to each of the benchmark points. In the embodiment, an x coordinate value of the actual coordinate values is equal to an x coordinate value of the original coordinate values of the benchmark point, and a z coordinate value of the actual coordinate values is calculated by the laser transmitter 222 and the CCD receiver 224.
The fitting module 102 configures to fit the acquired actual coordinate values to be a benchmark plane, and obtain a center point and a normal vector of the benchmark plane. In the embodiment, the fitting module 102 fits the benchmark plane according to the least-square method and a Quasi-Newton iterative method. The fitting module 102 calculates a minimum distance between the acquired actual coordinate values and a pre-fit benchmark plane according to a predetermined iterative formula of
where “X1” and “Z1” in the formula represent actual coordinate values of one benchmark point, “X2” and “Z2” in the formula represent virtual coordinate values of one point on the pre-fit benchmark plane, and “n” represents a number of the benchmark points.
In the embodiment, calculation of f(x) includes the following sub-steps: Sub-step one, if f(x) calculated by predetermined iteration parameters is lower than a predetermined aligning accuracy FunX, f(x) is determined to be the minimum distance, then the procedure ends. Sub-step two, if f(x) calculated by predetermined iteration parameters is greater than or equal to the FunX, a descent direction of f(x) is calculated according to a predetermined method of Quasi-Newton iterative method. The descent direction of f(x) is a direction toward which the value of f(x) decreases. If the descent direction of f(x) does not exist, f(x) is determined to the minimum distance and the procedure ends. Sub-step three, if the descent direction of f(x) exists, a distance f(x+1) between the benchmark points after being moved an predetermined aligning step D along the descent direction and the pre-fit benchmark plane is calculated according to an equation of “f(x+1)=f(x)+|D|”. Sub-step four, if f(x+1) is lower than f(x), then the procedure returns to sub-step two. Otherwise, if f(x+1) is greater than or equal to f(x), the procedure returns to sub-step three to calculate the distance between the benchmark points after moving the predetermined aligning step D for the second time along the descent direction and the pre-fit benchmark plane.
The rotation module 103 configures to calculate new coordinate values of each of the machining points of the machining path in the machining program by rotating each of the machining points to the benchmark plane. In the embodiment, the rotation module 103 can calculate an angle difference between the benchmark plane and a preset normal plane of the machining device 2 according to the center point and the normal vector of the benchmark plane, and further rotate the machining points with the angle difference for rotating the machining points to the benchmark plane.
The compensation module 104 configures to acquire an actual z coordinate value of each of the machining points according to the new coordinate values and the laser detection device 22. In one embodiment, the compensation module firstly controls the machining tool 26 to move to each of the machining points in sequence according to the new coordinate values, and controls the laser transmitter 222 to emit the laser beam for calculating the actual z coordinate value of each of the machining points.
The compensation module 104 further configures to calculate a step compensation value in Z-axis of the each of the machining point, and transmits the calculated step compensation values in Z-axis to the machining device 2. In this embodiment, the compensation module 104 can calculate a step value in Z-axis by subtracting the actual z coordinate value from the new coordinate values of each machining point, and calculates the step compensation value in Z-axis by subtracting the step value from zero. After the machining device 2 receives the step compensation value in Z-axis of the each of the machining points from the computing device 1, the machining device 2 moves the machining tool 26 to start to process the machining points of the processing product 206 according to the step compensation value in Z-axis of the each of the machining points.
In block 601, a control module controls the machining tool 26 of the machining device 2 to move to a plurality of benchmark points in a machining program of the processing product 206 in sequence by moving the X-axis linear motor 201 and the Z-axis linear motor 203 according to the X-axis optical ruler 202, the Z-axis optical ruler 204 and the tool optical ruler 205.
In block 602, a detection module controls the dustproof cap 2200 of the laser detection device 22 to be opened, and acquires actual coordinate values of each of the benchmark points when the machining tool 26 is moved to each of the benchmark points. In one embodiment, the detection module 101 acquires actual coordinate values of each of the benchmark points by controlling the laser detection device 22 to project to each of the benchmark points. In the embodiment, an x coordinate value of the actual coordinate values is equal to an x coordinate value of the original coordinate values of the benchmark point, and a z coordinate value of the actual coordinate values is calculated by the laser transmitter 222 and the CCD receiver 224.
In block 603, a fitting module fits the acquired actual coordinate values to be a benchmark plane, and obtain a center point and a normal vector of the benchmark plane. In the embodiment, the fitting module 102 fits the benchmark plane according to the least-square method and a Quasi-Newton iterative method.
In block 604, a rotation module calculates new coordinate values of each of the machining points of the machining path in the machining program by rotating each of the machining points to the benchmark plane. In the embodiment, the rotation module can calculate an angle difference between the benchmark plane and a preset normal plane of the machining device 2 according to the center point and the normal vector of the benchmark plane, and further rotate the machining points with the angle difference for rotating the machining points to the benchmark plane.
In block 605, a compensation module acquires an actual z coordinate value of each of the machining points according to the new coordinate values and the laser detection device 22, calculates a step compensation value in Z-axis of the each of the machining point, and transmits the calculated step compensation values in Z-axis to the machining device 2. In one embodiment, the compensation module firstly controls the machining tool 26 to move to each of the machining points in sequence according to the new coordinate values, and controls the laser transmitter 222 to emit the laser beam for calculating the actual z coordinate value of each of the machining points. In this embodiment, the compensation module can calculate a step value in Z-axis by subtracting the actual z coordinate value from the new coordinate values of each machining point, and calculates the step compensation value in Z-axis by subtracting the step value from zero. After the machining device 2 receives the step compensation value in Z-axis of the each of the machining points from the computing device 1, the machining device 2 moves the machining tool 26 to start to process the machining points of the processing product 206 according to the step compensation value in Z-axis of the each of the machining points.
All of the processes described above can be embodied in, and fully automated via, functional code modules executed by one or more general purpose processors such as the processor 11. The code modules can be stored in any type of non-transitory readable medium or other storage system such as the storage system 12. Some or all of the methods can alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory readable medium can be a hard disk drive, a compact disc, a digital versatile disc, a tape drive, or other storage medium.
The described embodiments are merely examples of implementations, and have been set forth for a clear understanding of the principles of the present disclosure. Variations and modifications may be made without departing substantially from the spirit and principles of the present disclosure. All such modifications and variations are intended to be included within the scope of this disclosure and the described inventive embodiments, and the present disclosure is protected by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2013103837352 | Aug 2013 | CN | national |