COMPUTING DEVICE AND METHOD FOR MEASURING PROBE OF COMPUTER NUMERICAL CONTROL MACHINE

A computing device is connected to a computer numerical control (CNC) machine, and an object positioned on a work table of the CNC machine includes one or more touch points. A probe from the CNC machine touches each touch point on an object and measures actual 3D mechanical coordinates of touch points. A 3D workpiece coordinates system is created according to the actual 3D mechanical coordinates of all touch points. Actual 3D workpiece coordinates of all touch points are calculated. Deviation values of each touch point are calculated between the actual 3D workpiece coordinates and theory 3D workpiece coordinates of each touch point. The deviation values are transformed to mechanical deviation values. The mechanical deviation values are compensated of each touch point for the CNC machine.

DETAILED DESCRIPTION

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.

FIG. 1is a block diagram of one embodiment of an application environment of a computing device1. The computing device1is connected to a computer numerical control (CNC) machine2. In one embodiment, the computing device1includes a storage device10, a processor11, and a probe measurement system12(hereinafter “the system12”). The computing device1may further include a display device13and an input device14, or the computing device1may be electronically connected to a display device13and an input device14.

As shown inFIG. 1, the CNC machine2includes a CNC work table20, a CNC main spindle21, a probe22, a module change rack (MCR)23, a Z-axis optical ruler24, an X-axis optical ruler25, a Z-axis linear motor26, and an X-axis linear motor27. The CNC machine2may further include a Y-axis optical ruler29, a Y-axis linear motor30, and other clamping fixtures. The MCR23is used to place one or more probes22.

A three-dimensional (3D) object28is positioned on the CNC work table20. The system12is used to control the CNC machine2to measure size of the object28. According to an object type of the object28, the CNC main spindle21automatically obtains a probe22from the MCR23by a chuck210to measure the object28. For example, the object type may be a cuboid, or a cube, or another type 3D object. Positions of the probes22in the MCR23can be replaced by cutting tools which are used to cut the object28. Each probe22includes a force sensing element which is on a head of the probe22, and the force sensing element senses whether the probe22approaches the object28. The probe22may be cylindrical probes, spherical probes, or star probes. When Z-direction parts of the object28are covered, a star probe can be selected. When a measured surface of the object28is 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 ruler24is positioned on the CNC main spindle21, the X-axis optical ruler25is parallel to the CNC work table20and perpendicular to the Z-axis optical ruler24, and the Y-axis optical ruler29is perpendicular to the Z-axis optical ruler24and the X-axis optical ruler25. The X-axis optical ruler25, the Y-axis optical ruler29and the Z-axis optical ruler24are 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 machine2has three linear motors that drive the CNC main spindle21to move, and each optical rule corresponds to a linear motor. For example, the X-axis optical ruler25corresponds to the X-axis linear motor27, the Y-axis optical ruler29corresponds to the Y-axis linear motor30.

FIG. 2is a block diagram of one embodiment of function modules of the system12. In one embodiment, the system12may include a control module120, a measurement module121, a creation module122, a calculation module123, and an adjustment module124. The function modules120-124may include computerized codes in the form of one or more programs, which are stored in the storage device10. The processor11executes the computerized codes, to provide functions of the function modules120-124. A detailed description of the function modules120-124is given in reference toFIG. 3.

FIG. 3illustrates a flowchart of one embodiment of a method of the probe measurement using the computing device1ofFIG. 1. Depending on the embodiment, additional steps may be added, others removed, and the ordering of the steps may be changed.

In step S11, the CNC machine2is initialized, the MCR23is fixed on the CNC work table20, and the one or more probes22are placed in the MCR23.

In step S12, the control module120controls the CNC main spindle21to move to the top of the MCR23and to take a probe22from the MCR23to measure the object28. The object28includes one or more touch points. In one embodiment, when the CNC main spindle21takes the probe22by the chuck210, the controlling module records 3D mechanical coordinates of the CNC main spindle21and a drawing force of the chuck210. According to the recorded coordinates and the recorded drawing force, the control module120may further control the CNC main spindle2to automatically replace the probe22with another probe22. The another probe22is in the MCR23.

In step S13, the measurement module121touches each touch point on the object28by the probe22, 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 object28. As mentioned above, the 3D mechanical coordinates system is formed by the X-axis optical ruler25, the Y-axis optical ruler29and the Z-axis optical ruler24. In the 3D mechanical coordinates system, each touch point has theory three dimension mechanical coordinates. The step S13is described in detail inFIG. 5.

In step S14, the creation module122creates a 3D workpiece coordinates system according to the actual 3D mechanical coordinates of all the touch points and element types of the object28selected 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 object28. The step S14is described in detail inFIG. 7.

In step S15, the calculation module123calculates 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 module123calculates 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 module124converts 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 machine2. In one embodiment, according to the mechanical deviation values of each touch point, a deviation of a processing route of the CNC machine2can be obtained. According to the deviation of the processing route, a CNC process programs of the CNC machine2can be adjusted.

FIG. 4is a schematic diagram of the probe22moving to measure a touch point86. The probe22is vertically lifted by the CNC main spindle21from a current point80to a first security plane point81which is on a security plane87. The current point80indicates a current position of the probe22. The security plane87is a preset plane and parallels to the CNC work table20. The first security plane point81is a projection point of the current point80on the security plane87. After reaching the first security plane point81, the probe22is controlled to move from the first security plane point81to a second security plane point83at a speed, is decelerated to move from the second security plane point83to a close point84, and then is decelerated to move from the close point84to the touch point86. The speed is larger than a preset speed. The close point84approaches the touch point86. A distance between the close point84and the touch point86is less than a first preset value (example 2 mm). The second security plane point83is a projection point of the close point84on the security plane87. After measuring the touch point86, the probe22rebounds a distance of a second preset value from the touch point86to the ricochet point85, and lastly is moved to a third security plane point82. The third security plane point82is a projection point of the ricochet point85on the security plane87.

FIG. 5illustrates a flowchart of one embodiment of step S13ofFIG. 3. Depending on the embodiment, additional steps may be added, others removed, and the ordering of the steps may be changed.

In step S130, the measurement module121calculates 3D mechanical coordinates of the first security plane point81according to 3D mechanical coordinates of the current point80, and calculates 3D mechanical coordinates of the second security plane point83and the close point84according to the theory 3D mechanical coordinates of the touch point26in the 3D mechanical coordinates system. The 3D mechanical coordinates of the current point80are measured by the X-axis optical ruler25, the Y-axis optical ruler29and the Z-axis optical ruler24.

In step S131, the measurement module121controls the probe22to move from the current point80to the close point24according to the 3D mechanical coordinates of the first security plane point81, the second security plane point83and the close point84. As mentioned above, moving steps of the probe22are shown inFIG. 4.

In step S132, the measurement module121determines whether a force sensing element of the probe22senses the object28at the close point84. The force sensing element is on the head of the probe22. If the force sensing element of the probe22senses the object28, step S135is implemented. If the force sensing element of the probe22does not sense the object28, step S133is implemented, the measuring module121controls the probe22to move a first preset distance along a negative direction of a normal of a plane of the object28. The negative direction of the normal points from the close point84to the touch point86. Then step S134is implemented, the measuring module121determines whether the force sensing element of the probe22senses the object28. If the force sensing element of the probe22does not sense the object28, the flow of measuring the touch point86is over. If the force sensing element of the probe22senses the object28, the step S135is implemented.

In step S135, the measurement module121controls the probe22to reach the touch point86, and measures the actual 3D mechanical coordinates of the touch point86by the X-axis optical ruler25, the Y-axis optical ruler29and the Z-axis optical ruler24.

In step S136, the measuring module121calculates 3D mechanical coordinates of the ricochet point85and the third security plane point82, according to the actual 3D mechanical coordinates of the touch point86.

In step S137, the measurement module121controls the probe22to reach the third security plane point82from the touch point86to the ricochet point85and then from the ricochet point85to the third security plane point82, according to the 3D mechanical coordinates of the ricochet point85and the third security plane point82.

FIG. 7illustrates a flowchart of one embodiment of step S14ofFIG. 3. Depending on the embodiment, additional steps may be added, others removed, and the ordering of the steps may be changed.

In step S140, the creation module122fits element types of the object28according 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 module122uses a method of least squares, in conjunction with the quasi-Newton iterative algorithm, to fit the element types.

In step S141, the creation module122determines 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 object28. If the fit the element types includes a second datum plane, step S144is implemented. If the fit the element types does not include a second datum plane, step S142is implemented, the creation module122fits a plane according to three un-collinear touch points. Then step S143is implemented, the creation module122adjusts the plane as the second datum plane. Then goes to step S144.

In step S144, the creation module122projects the fit element types on the second datum plane, and records each projection points.

In step S145, the creation module122fits 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 inFIG. 6, one line is as an X-axis of the 3D workpiece coordinates system, the other line is as a Y-axis of the 3D workpiece coordinates system.

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.