A height measurement method and system based on height measurement components of CNC equipment
By using a photoelectric signal acquisition array and lens on a CNC machine to construct a model for obtaining a preset height value, the problems of high cost and low accuracy in CNC machine height measurement methods are solved, achieving low-cost and high-precision height measurement and avoiding positional interference between the machining actuator and the workpiece.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MOXIN (HUZHOU) TECH CO LTD
- Filing Date
- 2021-08-05
- Publication Date
- 2026-07-17
Smart Images

Figure CN113805529B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of height measurement components for CNC equipment, and more particularly to a height measurement method and system based on height measurement components for CNC equipment. Background Technology
[0002] CNC equipment can control machining actuators to perform machining, measurement, and other processing on suitable workpieces (i.e., the components to be measured in this invention). Height measurement is a common function of CNC equipment. CNC equipment often needs to know the height information of the workpiece to be processed in order to process or measure it at the appropriate position. Accurately measuring the height of the workpiece helps to achieve functions such as accurate tool setting (for carving and milling equipment), precise focusing (for laser engraving equipment), and good first-layer adhesion (for 3D printing equipment), which can significantly improve machining accuracy and / or the success rate of machining. Among existing CNC equipment height measurement methods, the method using an encoder on the Z-axis motor or a linear encoder on the Z-axis has high accuracy but is expensive; the method of controlling the machining actuator to process and measure the workpiece by installing a contact switch on the machining actuator or fixed frame is low-cost, but the machining head of the machining actuator is prone to positional interference with the workpiece, and complex mechanical devices are required to avoid interference; other methods include using inductive or capacitive proximity sensors, but these also have requirements regarding planar properties. Therefore, how to achieve a low-cost, high-precision, stable, and reliable height measurement method has become an urgent problem to be solved. Summary of the Invention
[0003] To address the issue that while installing contact switches on machining actuators or fixed frames to control the machining actuators for processing and measuring workpieces is cost-effective, it can easily lead to positional interference between the machining head of the actuator and the workpiece. This invention proposes a height measurement method based on a height measurement component of a CNC equipment. The height measurement component includes a photoelectric signal acquisition array, a light source, a lens, and a processing unit. The light source is located on one side of the photoelectric signal acquisition array, and the light emitted by the light source illuminates the plane to be measured on the component. The lens is used to focus the light emitted by the light source. The height measurement method mainly includes the following steps:
[0004] A1: On the test plane of the component under test, the height measuring component is driven to move on the coordinate axis of the CNC equipment by a preset positioning mechanism to obtain the preset moving distance corresponding to each movement; during each movement, the photoelectric signal acquisition array is used to acquire the reflected light patterns of several test planes, and the distance between adjacent reflected light patterns is obtained by the processing unit.
[0005] A2: The target height value of the component under test is obtained by using the preset height value to obtain the model by the distance between each preset moving distance and the distance between the corresponding adjacent reflected light patterns.
[0006] Furthermore, the method for obtaining the preset height value acquisition model includes the following steps:
[0007] B1: Collect several height points of the standard height measuring component within the standard height measuring range of the standard component;
[0008] B2: At each height point, the height measuring component is driven to move any distance on the coordinate axis of the CNC equipment by a preset positioning mechanism, so as to obtain the moving distance of the height measuring component at each height point;
[0009] B3: When the height measuring component moves at each height point, it uses a photoelectric signal acquisition array to acquire several reflected light patterns of standard planes, and the processing unit acquires the distance between each adjacent reflected light pattern at each height point.
[0010] B4: Based on the moving distance at each height point, a function fitting is performed between the distances between each adjacent reflected light pattern obtained at the corresponding height point to obtain the preset height value acquisition model under standard conditions.
[0011] Further, in step B4, the function fitting includes fitting through a neural network. The specific fitting method is as follows: B41: Obtain a distance training set, which includes a preset moving distance of the altimeter component at a preset height point and a preset distance between adjacent reflected light patterns at the corresponding height point.
[0012] B42: Obtain the preset height value acquisition model by training a BP neural network using a distance training set.
[0013] Furthermore, in step A2, the specific method for obtaining the target height value of the component under test using the preset height value acquisition model is as follows:
[0014] The model obtains the height value corresponding to each preset movement distance by using the distance between each preset movement distance and its corresponding adjacent reflected light pattern and the preset height value.
[0015] Obtain the average height value corresponding to each preset movement distance, use it as the target height value, and output it.
[0016] Furthermore, step A1 also includes:
[0017] Determine whether the distance between adjacent reflected light patterns is within a preset range; if not, output an error message.
[0018] Furthermore, in step B3, the specific method for obtaining the distance between adjacent reflected light patterns at each height point through the processing unit is as follows:
[0019] The distance between adjacent reflected light patterns at each height point is obtained by the processing unit using a digital image association method. This invention also proposes a height measurement system based on a CNC equipment height measurement component. The height measurement component includes a photoelectric signal acquisition array, a light source, a lens, and a processing unit. The light source is located on one side of the photoelectric signal acquisition array, and the light emitted by the light source illuminates the plane to be measured of the component. The lens is used to focus the light emitted by the light source. The height measurement system mainly includes:
[0020] The distance acquisition module is used to drive the height measuring component to move on the coordinate axis of the CNC equipment on the test plane of the component under test through a preset positioning mechanism, so as to obtain the preset moving distance corresponding to each movement; during each movement, the photoelectric signal acquisition array is used to acquire the reflected light patterns of several test planes, and the processing unit obtains the distance between adjacent reflected light patterns.
[0021] The target height value module is used to obtain the target height value of the component under test by using the preset height value to obtain the model by the distance between each preset movement distance and the corresponding adjacent reflected light pattern.
[0022] Furthermore, the method for obtaining the preset height value acquisition model includes:
[0023] The height point acquisition module is used to collect several height points of the standard component within the standard height measurement range of the height measuring component; the motion module is used to drive the height measuring component to move any distance on the coordinate axis of the CNC equipment at each height point through a preset positioning mechanism, so as to obtain the movement distance of the height measuring component at each height point.
[0024] Pattern distance module: When the altimeter moves at each height point, it uses a photoelectric signal acquisition array to acquire reflected light patterns of several standard planes, and the processing unit acquires the distance between each adjacent reflected light pattern at each height point.
[0025] The calculation module is used to obtain a preset height value acquisition model under standard conditions by performing function fitting based on the moving distance at each height point and the distance between each adjacent reflected light pattern obtained at the corresponding height point.
[0026] Furthermore, in the calculation module, the function fitting includes fitting through a neural network. Specifically, the fitting method is as follows: obtaining a distance training set, which includes a preset moving distance of the altimeter component at a preset height point and a preset distance between adjacent reflected light patterns at the corresponding height point; and training a BP neural network through the distance training set to obtain a preset height value acquisition model.
[0027] Furthermore, in the target height value module, the specific method for obtaining the target height value of the component under test using the preset height value acquisition model is as follows: the height value corresponding to each preset movement distance is obtained by using the preset height value acquisition model through the distance between each preset movement distance and its corresponding adjacent reflected light pattern; the average value of the height values corresponding to each preset movement distance is obtained as the target height value and output.
[0028] Compared with the prior art, the present invention has at least the following beneficial effects:
[0029] (1) The present invention drives the height measuring component to move arbitrarily on the coordinate axis of the CNC equipment at different height points using a preset positioning mechanism. During the movement, the processing unit obtains the distance between each adjacent reflected light pattern at each height point, and constructs a preset height value acquisition model by using the movement distance at each height point and the distance between each adjacent reflected light pattern at the corresponding height point. The height value of the same type of component to be measured can be repeatedly obtained through the preset height value acquisition model, which solves the problems of high cost and low accuracy in the prior art and greatly improves the measurement efficiency.
[0030] (2) The present invention solves the problem that when the processing head of the processing actuator is prone to positional interference with the workpiece to be processed when the processing actuator is controlled by installing a contact switch on the processing actuator or fixed frame to process and measure the workpiece, by constructing a preset height value acquisition model. This improves the measurement accuracy and reduces the cost. Attached Figure Description
[0031] Figure 1 This is a flowchart illustrating the steps of a height measurement method and system based on a height measurement component of a CNC device.
[0032] Figure 2 A diagram showing the height measurement component module of a height measurement method and system based on CNC equipment height measurement components;
[0033] Figure 3 This is a system module diagram of a height measurement method and system based on a height measurement component of a CNC equipment.
[0034] In the diagram: 10, processing unit; 20, photoelectric signal acquisition array; 30, light source; 40, lens; 50, plane to be measured. Detailed Implementation
[0035] The following are specific embodiments of the present invention, which are described in conjunction with the accompanying drawings. However, the present invention is not limited to these embodiments. Example
[0036] To improve workpiece measurement accuracy, reduce measurement costs, and increase measurement efficiency, this invention uses a preset positioning mechanism to drive the height measuring component to move arbitrarily along the coordinate axes of a CNC machine at each acquired height point. During this movement, the processing unit acquires the distance between adjacent reflected light patterns at each height point. A preset height value acquisition model is constructed using the movement distance at each height point and the distance between adjacent reflected light patterns at the corresponding height point. The height value of the component under test is obtained through this model. This solves the problem of positional interference between the machining head of the machining actuator and the workpiece when using a contact switch on the machining actuator or fixed frame to control the machining actuator during machining and measurement. Figure 1 and Figure 2 As shown, this invention proposes a height measurement method based on a height measurement component of a CNC equipment. The height measurement component includes a photoelectric signal acquisition array, a light source, a lens, and a processing unit. The light source is located on one side of the photoelectric signal acquisition array, and the light emitted by the light source illuminates the plane to be measured of the component under test. The lens is used to focus the light emitted by the light source. The height measurement method mainly includes the following steps:
[0037] A1: On the test plane of the component under test, the height measuring component is driven to move on the coordinate axis of the CNC equipment by a preset positioning mechanism to obtain the preset moving distance corresponding to each movement; during each movement, the photoelectric signal acquisition array is used to acquire the reflected light patterns of several test planes, and the distance between adjacent reflected light patterns is obtained by the processing unit.
[0038] It should be noted that during measurement, in step A1, the preset positioning mechanism can drive the height measuring component to move once or multiple times on the coordinate axis of the CNC equipment.
[0039] Step A1 further includes:
[0040] The system determines whether the distance between adjacent reflected light patterns is within a preset range. If not, an error message is output. In this embodiment, the distance between adjacent reflected light patterns should be within a preset range. If it is not within the preset range, it may be due to a malfunction in the preset positioning mechanism, a system malfunction, or the height of the component under test not being within [h0, h]. n If the measurement falls within the standard height measurement range, an error message will be output and the process will end.
[0041] A2: The target height value of the component under test is obtained by using the preset height value to obtain the model by the distance between each preset moving distance and the distance between the corresponding adjacent reflected light patterns.
[0042] In step A2, the specific method for obtaining the target height value of the component under test using the preset height value acquisition model is as follows:
[0043] The model obtains the height value corresponding to each preset movement distance by using the distance between each preset movement distance and its corresponding adjacent reflected light pattern and the preset height value.
[0044] The average height value corresponding to each preset movement distance is obtained and output as the target height value. In this embodiment, in the measurement method of steps A1 to A2, the photoelectric signal acquisition array can acquire the reflected light patterns of only two planes to be measured during each movement. The preset height value acquisition model is input with each (Y) value. i ,L i This gives the corresponding height value, where i represents the preset movement distance at which number, and Y... i L represents the distance between the two reflected light patterns during the i-th movement; i This indicates the preset travel distance during the corresponding movement process.
[0045] It should be noted that the height value acquisition model can be used to repeatedly obtain the height value of the same type of component to be tested.
[0046] The method for obtaining the preset height value acquisition model includes the following steps:
[0047] B1: Collect several height points of the standard height measuring component within the standard height measuring range of the standard component;
[0048] In this embodiment, within the standard height measurement range [h0, h n [Collect n height points {h0, h1, h2, ..., h...] of the standard component. n (n>1, where n is a positive integer), the height points can be sampled at equal intervals or at random intervals.
[0049] B2: At each height point, the height measuring component is driven to move any distance on the coordinate axis of the CNC equipment by a preset positioning mechanism, so as to obtain the moving distance of the height measuring component at each height point;
[0050] Specifically, at each height point, the height measuring component, driven by a preset positioning mechanism, moves a distance {L0, L1, L2, ..., L...} in the X and / or Y directions of the CNC equipment coordinate axis. m} (m>=0, m is a positive integer), L0 represents the distance moved at the first height point, L1 represents the distance moved at the second height point, and so on.
[0051] B3: When the height measuring component moves at each height point, it uses a photoelectric signal acquisition array to acquire several reflected light patterns of standard planes, and the processing unit acquires the distance between each adjacent reflected light pattern at each height point.
[0052] In step B3, the specific method for obtaining the distance between adjacent reflected light patterns at each height point through the processing unit is as follows:
[0053] The processing unit uses digital image correlation (DIC) to obtain the distance between adjacent reflected light patterns at each height point. The processing unit includes arithmetic units such as an ADC (analog-to-digital converter) and an MCU (or FPGA or DSP). The processing unit can receive analog signals of the reflected light patterns acquired by the photoelectric signal acquisition array and convert them into digital signals for processing. It should be noted that when the altimeter moves at each height point, the photoelectric signal acquisition array records a series of reflected light patterns. Due to the different heights, but with a fixed focal height, the reflected light patterns at different locations are different. Through digital image correlation (DIC) processing, the distance {{Y}} of the movement of the series of reflected light patterns is obtained. 00 ,Y 10 ,Y 20 ,...,Y n0} ...{Y 0m ,Y 1m ,Y 2m ,...,Y nm}}, where {Y 00 ,Y 10 ,Y 20 ,...,Y n0} represents the distance between each adjacent reflected light pattern acquired at the first elevation point. The digital image association method can be a global DIC algorithm or a local DIC algorithm.
[0054] B4: Based on the moving distance at each height point, a function fitting is performed between the distances between each adjacent reflected light pattern obtained at the corresponding height point to obtain the preset height value acquisition model under standard conditions.
[0055] It should be noted that the function fitting method can be the least squares method, gradient descent method, or neural network model construction method. In step B4, the function fitting includes fitting using a neural network, specifically as follows:
[0056] B41: Obtain a distance training set, which includes a preset moving distance of the altimeter component at a preset height point and a preset distance between adjacent reflected light patterns at the corresponding height point;
[0057] B42: Obtain the preset height value acquisition model by training a BP neural network using a distance training set. Example
[0058] To better understand the inventive concept of this invention, this embodiment describes the invention through a system structure, such as... Figure 3 As shown, a height measurement system based on a height measurement component of a CNC equipment is disclosed. The height measurement component includes a photoelectric signal acquisition array, a light source, a lens, and a processing unit. The light source is located on one side of the photoelectric signal acquisition array, and the light emitted by the light source illuminates the plane to be measured of the component. The lens is used to focus the light emitted by the light source. The height measurement system mainly includes:
[0059] The distance acquisition module is used to drive the height measuring component to move on the coordinate axis of the CNC equipment on the test plane of the component under test through a preset positioning mechanism, so as to obtain the preset moving distance corresponding to each movement; during each movement, the photoelectric signal acquisition array is used to acquire the reflected light patterns of several test planes, and the processing unit obtains the distance between adjacent reflected light patterns.
[0060] The target height value module is used to obtain the target height value of the component under test by using the preset height value to obtain the model by the distance between each preset movement distance and the corresponding adjacent reflected light pattern.
[0061] This invention solves the problem of positional interference between the processing head of the processing actuator and the workpiece when the processing actuator is controlled by installing a contact switch on the processing actuator or fixed frame to process and measure the workpiece. This improves the measurement accuracy and reduces the cost.
[0062] In the target height value module, the specific method for obtaining the target height value of the component under test using the preset height value acquisition model is as follows: the height value corresponding to each preset movement distance is obtained by using the preset height value acquisition model through the distance between each preset movement distance and its corresponding adjacent reflected light pattern; the average value of the height values corresponding to each preset movement distance is obtained as the target height value and output.
[0063] The method for obtaining the preset height value acquisition model includes:
[0064] The height point acquisition module is used to collect several height points of the standard component within the standard height measurement range of the height measurement component;
[0065] The motion module is used to drive the height measuring component to move any distance on the coordinate axis of the CNC equipment at each height point through a preset positioning mechanism, so as to obtain the movement distance of the height measuring component at each height point;
[0066] Pattern distance module: When the altimeter moves at each height point, it uses a photoelectric signal acquisition array to acquire reflected light patterns of several standard planes, and the processing unit acquires the distance between each adjacent reflected light pattern at each height point.
[0067] The calculation module is used to obtain a preset height value acquisition model under standard conditions by performing function fitting based on the moving distance at each height point and the distance between each adjacent reflected light pattern obtained at the corresponding height point.
[0068] In the calculation module, the function fitting includes fitting via a neural network. Specifically, the fitting method involves: acquiring a distance training set, which includes a preset movement distance of the height measuring component at a preset height point and preset distances between adjacent reflected light patterns at the corresponding height point; training a BP neural network using the distance training set to obtain a preset height value acquisition model. This invention, by using a preset positioning mechanism to drive the height measuring component to move arbitrarily along the coordinate axes of a CNC device at different height points, acquires the distances between adjacent reflected light patterns at each height point through a processing unit during the movement. A preset height value acquisition model is constructed using the movement distance at each height point and the distances between adjacent reflected light patterns acquired at the corresponding height point. This preset height value acquisition model allows for the repeated acquisition of height values for the same type of component under test, solving the problems of high cost and low accuracy in existing technologies while significantly improving measurement efficiency.
[0069] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0070] Furthermore, in this invention, descriptions involving terms such as "first," "second," and "a" are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0071] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0072] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
Claims
1. A height measurement method based on a height measurement component of a CNC equipment, characterized in that, The height measurement component includes a photoelectric signal acquisition array, a light source, a lens, and a processing unit. The light source is located on one side of the photoelectric signal acquisition array, and the light emitted by the light source illuminates the plane to be measured of the component under test. The lens is used to focus the light emitted by the light source. The height measurement method includes the following steps: A1: On the test plane of the component under test, the height measuring component is driven to move on the coordinate axis of the CNC equipment through a preset positioning mechanism to obtain the preset moving distance corresponding to each movement; during each movement, the photoelectric signal acquisition array is used to acquire several reflected light patterns of the test plane, and the distance between adjacent reflected light patterns is obtained through the processing unit; and it is determined whether the distance between adjacent reflected light patterns is within the preset range. If not, an error message is output. A2: Obtain the height value corresponding to each preset movement distance by using the distance between each preset movement distance and its corresponding adjacent reflected light pattern; and obtain the average value of the height values corresponding to each preset movement distance as the target height value and output it. The method for obtaining the preset height value acquisition model includes the following steps: B1: Within the standard height measurement range of the altimeter assembly [h0, h n [Collect n height points {h0, h1, h2, ..., h...] of the standard component. n }(n>1, n is a positive integer); B2: At each height point, the height measuring component is driven by a preset positioning mechanism to move a distance {L0, L1, L2, ..., L...} in the X and / or Y directions of the CNC equipment coordinate axis. m (m≥0, m is a positive integer), L0 represents the distance moved at the first height point, L1 represents the distance moved at the second height point, and so on, to obtain the distance moved by the height measuring component at each height point; B3: When the height measuring component moves at each height point, it uses a photoelectric signal acquisition array to acquire several reflected light patterns of standard planes, and the processing unit acquires the distance between each adjacent reflected light pattern at each height point. B4: Based on the movement distance at each height point, a function fitting is performed between the distances between adjacent reflected light patterns acquired at the corresponding height points to obtain a preset height value acquisition model under standard conditions. The function fitting includes fitting through a neural network, and the specific fitting method is as follows: B41: Obtain a distance training set, which includes a preset moving distance of the altimeter component at a preset height point and a preset distance between adjacent reflected light patterns at the corresponding height point; B42: Obtain the preset height value acquisition model by training a BP neural network using a distance training set.
2. The height measurement method based on a height measurement component of a CNC equipment according to claim 1, characterized in that, In step B3, the specific method for obtaining the distance between each adjacent reflected light pattern at each height point through the processing unit is as follows: The processing unit uses digital image association to obtain the distance between each adjacent reflected light pattern at each height point.
3. A height measurement system based on a height measurement component of a CNC equipment, characterized in that, The height measurement system is configured to implement the method described in any one of claims 1-2. The height measurement component includes a photoelectric signal acquisition array, a light source, a lens, and a processing unit. The light source is located on one side of the photoelectric signal acquisition array, and the light emitted by the light source illuminates the plane to be measured of the component under test. The lens is used to focus the light emitted by the light source. The height measurement system includes: The distance acquisition module is used to drive the height measuring component to move on the coordinate axis of the CNC equipment on the test plane of the component under test through a preset positioning mechanism, so as to obtain the preset moving distance corresponding to each movement; during each movement, the photoelectric signal acquisition array is used to acquire the reflected light patterns of several test planes, and the processing unit obtains the distance between adjacent reflected light patterns. The target height value module is used to obtain the target height value of the component under test by using the preset height value to obtain the model by the distance between each preset movement distance and the corresponding adjacent reflected light pattern.
4. A height measurement system based on a CNC equipment height measurement component according to claim 3, characterized in that, The method for obtaining the preset height value acquisition model includes: The height point acquisition module is used to collect several height points of the standard component within the standard height measurement range of the height measurement component; The motion module is used to drive the height measuring component to move any distance on the coordinate axis of the CNC equipment at each height point through a preset positioning mechanism, so as to obtain the movement distance of the height measuring component at each height point; Pattern distance module: When the altimeter moves at each height point, it uses a photoelectric signal acquisition array to acquire reflected light patterns of several standard planes, and the processing unit acquires the distance between each adjacent reflected light pattern at each height point. The calculation module is used to obtain a preset height value acquisition model under standard conditions by performing function fitting based on the moving distance at each height point and the distance between each adjacent reflected light pattern obtained at the corresponding height point.
5. A height measurement system based on a CNC equipment height measurement component according to claim 4, characterized in that, In the calculation module, the function fitting includes fitting via a neural network. Specifically, the fitting method involves obtaining a distance training set. The distance training set includes the preset movement distance of the altimeter component at a preset height point and the preset distance between adjacent reflected light patterns at the corresponding height point; the preset height value acquisition model is obtained by training a BP neural network through the distance training set.
6. A height measurement system based on a CNC equipment height measurement component according to claim 5, characterized in that, In the target height value module, the specific method for obtaining the target height value of the component under test using the preset height value acquisition model is as follows: the height value corresponding to each preset movement distance is obtained by using the preset height value acquisition model through the distance between each preset movement distance and its corresponding adjacent reflected light pattern; the average value of the height values corresponding to each preset movement distance is obtained as the target height value and output.