1. Technical Field
Embodiments of the present disclosure relate to measuring technology, and particularly to a computing device and a method for computer numerical control (CNC) probe measurement.
2. Description of Related Art
Computer numerical control (CNC) machines produce products and measure sizes of the products to adjust CNC process programs. However, if Z-direction parts of the products are covered, the sizes of the products cannot be precisely measured.
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 mean “at least one.”
In general, the word “module,” as used hereinafter, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, for example, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware. It will be appreciated that modules may comprise connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable storage medium or other computer storage device.
As shown in
A three-dimensional (3D) object 28 is positioned on the CNC work table 20. The system 12 is used to control the CNC machine 2 to measure size of the object 28. According to an object type of the object 28, the CNC main spindle 21 automatically obtains a probe 22 from the MCR 23 by a chuck 210 to measure the object 28. For example, the object type may be a cuboid, or a cube, or another type 3D object. Positions of the probes 22 in the MCR 23 can be replaced by cutting tools which are used to cut the object 28. Each probe 22 includes a force sensing element which is on a head of the probe 22, and the force sensing element senses whether the probe 22 approaches the object 28. The probe 22 may be cylindrical probes, spherical probes, or star probes. When Z-direction parts of the object 28 are covered, a star probe can be selected. When a measured surface of the object 28 is a slope, a cylindrical probe can be selected. When the measured surface is smooth and a high measurement precision is required, a star probe can be selected.
In one embodiment, the Z-axis optical ruler 24 is positioned on the CNC main spindle 21, the X-axis optical ruler 25 is parallel to the CNC work table 20 and perpendicular to the Z-axis optical ruler 24, and the Y-axis optical ruler 29 is perpendicular to the Z-axis optical ruler 24 and the X-axis optical ruler 25. The X-axis optical ruler 25, the Y-axis optical ruler 29 and the Z-axis optical ruler 24 are positioned and calibrated to form a 3D mechanical coordinates system, and used to measure mechanical coordinates X, Y, Z of a target point in the 3D mechanical coordinates system. The CNC machine 2 has three linear motors that drive the CNC main spindle 21 to move, and each optical rule corresponds to a linear motor. For example, the X-axis optical ruler 25 corresponds to the X-axis linear motor 27, the Y-axis optical ruler 29 corresponds to the Y-axis linear motor 30.
In step S11, the CNC machine 2 is initialized, the MCR 23 is fixed on the CNC work table 20, and the one or more probes 22 are placed in the MCR 23.
In step S12, the control module 120 controls the CNC main spindle 21 to move to the top of the MCR 23 and to take a probe 22 from the MCR 23 to measure the object 28. The object 28 includes one or more touch points. In one embodiment, when the CNC main spindle 21 takes the probe 22 by the chuck 210, the controlling module records 3D mechanical coordinates of the CNC main spindle 21 and a drawing force of the chuck 210. According to the recorded coordinates and the recorded drawing force, the control module 120 may further control the CNC main spindle 2 to automatically replace the probe 22 with another probe 22. The another probe 22 is in the MCR 23.
In step S13, the measurement module 121 touches each touch point on the object 28 by the probe 22, and measures actual 3D mechanical coordinates of each touch point in the 3D mechanical coordinates system. The touch points are measured target points on the object 28. As mentioned above, the 3D mechanical coordinates system is formed by the X-axis optical ruler 25, the Y-axis optical ruler 29 and the Z-axis optical ruler 24. In the 3D mechanical coordinates system, each touch point has theory three dimension mechanical coordinates. The step S13 is described in detail in
In step S14, the creation module 122 creates a 3D workpiece coordinates system according to the actual 3D mechanical coordinates of all the touch points and element types of the object 28 selected by the user. The element types may include a line, a plane, a circle, an arc, an ellipse, and a sphere. The element types are selected according to the object 28. The step S14 is described in detail in
In step S15, the calculation module 123 calculates actual 3D workpiece coordinates of all the touch points in the 3D workpiece coordinates system. In one embodiment, the actual 3D workpiece coordinates of a touch point are distances between the touch point and an X-axis, a Y-axis, and a Z-axis of the 3D workpiece coordinates system.
In step S16, the calculation module 123 calculates deviation values of each touch point between the actual 3D workpiece coordinates of each touch point and theory 3D workpiece coordinates of each touch point in the 3D workpiece coordinates system. The theory 3D mechanical coordinates of each touch point is converted into the theory 3D workpiece coordinates of each touch point according to a conversion rule (e.g. conversion matrix) between the theory 3D mechanical coordinates system and the theory 3D workpiece coordinates system.
In step S17, the adjustment module 124 converts the deviation values of each touch point in the 3D workpiece coordinates system into mechanical deviation values of each touch point in the 3D mechanical coordinates system, and compensates the mechanical deviation value of each touch point for the CNC machine 2. In one embodiment, according to the mechanical deviation values of each touch point, a deviation of a processing route of the CNC machine 2 can be obtained. According to the deviation of the processing route, a CNC process programs of the CNC machine 2 can be adjusted.
In step S130, the measurement module 121 calculates 3D mechanical coordinates of the first security plane point 81 according to 3D mechanical coordinates of the current point 80, and calculates 3D mechanical coordinates of the second security plane point 83 and the close point 84 according to the theory 3D mechanical coordinates of the touch point 26 in the 3D mechanical coordinates system. The 3D mechanical coordinates of the current point 80 are measured by the X-axis optical ruler 25, the Y-axis optical ruler 29 and the Z-axis optical ruler 24.
In step S131, the measurement module 121 controls the probe 22 to move from the current point 80 to the close point 24 according to the 3D mechanical coordinates of the first security plane point 81, the second security plane point 83 and the close point 84. As mentioned above, moving steps of the probe 22 are shown in
In step S132, the measurement module 121 determines whether a force sensing element of the probe 22 senses the object 28 at the close point 84. The force sensing element is on the head of the probe 22. If the force sensing element of the probe 22 senses the object 28, step S135 is implemented. If the force sensing element of the probe 22 does not sense the object 28, step S133 is implemented, the measuring module 121 controls the probe 22 to move a first preset distance along a negative direction of a normal of a plane of the object 28. The negative direction of the normal points from the close point 84 to the touch point 86. Then step S134 is implemented, the measuring module 121 determines whether the force sensing element of the probe 22 senses the object 28. If the force sensing element of the probe 22 does not sense the object 28, the flow of measuring the touch point 86 is over. If the force sensing element of the probe 22 senses the object 28, the step S135 is implemented.
In step S135, the measurement module 121 controls the probe 22 to reach the touch point 86, and measures the actual 3D mechanical coordinates of the touch point 86 by the X-axis optical ruler 25, the Y-axis optical ruler 29 and the Z-axis optical ruler 24.
In step S136, the measuring module 121 calculates 3D mechanical coordinates of the ricochet point 85 and the third security plane point 82, according to the actual 3D mechanical coordinates of the touch point 86.
In step S137, the measurement module 121 controls the probe 22 to reach the third security plane point 82 from the touch point 86 to the ricochet point 85 and then from the ricochet point 85 to the third security plane point 82, according to the 3D mechanical coordinates of the ricochet point 85 and the third security plane point 82.
In step S140, the creation module 122 fits element types of the object 28 according to actual 3D mechanical coordinates of all the touch points. The element types may include a line, a plane, a circle, an arc, an ellipse, and a sphere. In one embodiment, the creation module 122 uses a method of least squares, in conjunction with the quasi-Newton iterative algorithm, to fit the element types.
In step S141, the creation module 122 determines whether the fit the element types includes a second datum plane. A error between the second datum plane and a preset datum plane is minimum. The preset datum plane is preset by the user according to the object 28. If the fit the element types includes a second datum plane, step S144 is implemented. If the fit the element types does not include a second datum plane, step S142 is implemented, the creation module 122 fits a plane according to three un-collinear touch points. Then step S143 is implemented, the creation module 122 adjusts the plane as the second datum plane. Then goes to step S 144.
In step S144, the creation module 122 projects the fit element types on the second datum plane, and records each projection points.
In step S145, the creation module 122 fits two line. The two lines are perpendicular to each other. An intersection of the two lines is regarded as an origin of the 3D workpiece coordinates system. As shown in
In step S146, the creation module 122 fits a Z-axis of the 3D workpiece coordinates system along a normal direction of the second datum plane.
It should be emphasized that the above-described embodiments of the present disclosure, including any particular embodiments, are merely possible examples of implementations, set forth for a clear understanding of the principles of the disclosure.
Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
2013100424305 | Feb 2013 | CN | national |