Method and system for synchronizing data of movement mechanism and optical sensor
By combining the motion controller, sensor and spectral confocal controller in the motion system, the data synchronization of the motion mechanism and the optical sensor is achieved, solving the problem of out-synchronization of the motion position and the measurement results, and improving the accuracy and efficiency of measuring the deep hole inner diameter and deep hole profile.
Patent Information
- Application Number
- CN202410262264.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2025-07-25
AI Technical Summary
In a motion system, the motion position of the motion mechanism is not synchronized with the measurement results of the optical sensor, resulting in errors in scanning results. Especially in the measurement of deep hole inner diameter and deep hole profile, it is difficult for the prior art to achieve high-precision synchronous measurements.
The motion controller drives the motion mechanism and uploads the initial position and angle coordinates to the upper computer. The first sensor and the second sensor collect position angle and distance information respectively. After decoding the spectral confocal controller, upload it to the upper computer. The upper computer performs synchronization processing, and controls the motion mechanism to adjust the position according to the processing results to realize synchronization of the motion position and measurement.
The data synchronization between the motion mechanism and the optical sensor is achieved, the accuracy and efficiency during the scanning process are improved, and the accuracy of the measurement results are ensured.
Smart Images

Figure CN120368880A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sensors, and particularly relates to a method and system for synchronizing data between a motion mechanism and an optical sensor. Background Art
[0002] Optical sensors, with their characteristics of non-contact, small size, high sampling frequency, etc., are often used for inner hole size detection. As the optical sensor measures the distance from the workpiece to be measured at a high exposure frequency, the contour trajectory of the workpiece to be measured can be obtained. Using the measured contour trajectory, key dimensions, contour shapes, roughness and other information of the workpiece can be analyzed and obtained.
[0003] In the measurement scenarios of deep hole inner diameter measurement, deep hole contour measurement, especially in the measurement of small-diameter deep holes, traditional measurement devices such as 3D profilers cannot meet the measurement requirements due to their volume limitations. However, a measurement system using an optical sensor + motion mechanism can well solve this problem. Among them, the optical sensor is installed on the motion mechanism and moves with it. The motion trajectory can be a combination of various motions such as rotation and translation. However, in order to obtain a correct and high-precision scanning trajectory, the optical sensor needs to be synchronized with the motion completion time of the motion mechanism during measurement, or the position, attitude, and rotation angle information of the motion mechanism at each measurement point can be obtained and saved during high-frequency measurement. The asynchronous motion position and measurement will lead to misalignment of the scanning results, such as problems where the measured value does not correspond to the spatial XYZ coordinates and the accuracy decreases. Therefore, how to solve this problem is an urgent problem in this field. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and system for synchronizing data between a motion mechanism and an optical sensor to solve the problem that the scanning result is incorrect due to the asynchronous motion position of the motion mechanism and the measurement result of the sensor in the motion system.
[0005] To solve the above technical problems, the present invention proposes a method for synchronizing data between a motion mechanism and an optical sensor, including the following steps:
[0006] S1: The motion controller sends a motion command to the motion mechanism through the fieldbus to drive the motion mechanism to move, and the motion controller uploads the obtained initial position and rotation angle coordinates of the motion mechanism to the host computer;
[0007] S2: The first sensor and the second sensor respectively collect the position and rotation angle information and distance information of the motion mechanism and upload them to the spectral confocal controller;
[0008] S3: The spectral confocal controller decodes the received position and rotation angle information and distance information to respectively obtain multiple sampling data of the first sensor and the second sensor, and uploads the multiple sampling data to the host computer;
[0009] S4: The host computer synchronizes multiple sampling data of the first sensor and the second sensor to obtain the position and angular displacement increment data of the motion mechanism, and processes the obtained initial position coordinates and position increment data to obtain the current absolute position coordinates and absolute angular coordinates of the motion mechanism;
[0010] S5: The host computer sends a control signal to the motion controller, and controls the motion mechanism to adjust its position through the motion controller.
[0011] Furthermore, the specific steps of S2 are as follows:
[0012] The first sensor collects the position and angular displacement information of the motion mechanism and uploads it to the signal distributor;
[0013] The signal distributor copies the position and angular displacement information into two identical signals, one is connected to the driver of the motion mechanism, and the other is connected to the signal converter;
[0014] The signal converter converts the received position and angular displacement information into pulse signals, and uploads the converted pulse signals to the spectral confocal controller;
[0015] The second sensor collects the distance information of the motion mechanism and uploads it to the spectral confocal controller.
[0016] Furthermore, the spectral confocal controller decodes the received position and angular displacement information and distance information into quadruple frequency and direction signals, performs counting, and stores the counting results in the storage area of the spectral confocal controller.
[0017] Furthermore, the first sensor includes a grating scale and an encoder, and the second sensor is a spectral confocal sensor.
[0018] Furthermore, the method for the host computer to synchronize multiple sampling data of the first sensor and the second sensor is to calculate the corresponding position or angular displacement increment through the encoder resolution and the mechanical transmission ratio. The specific calculation method is as follows:
[0019] Position increment = (pulse count value / encoder resolution) × reduction ratio × lead × quadruple frequency;
[0020] Angle increment = (pulse count value / encoder resolution) × reduction ratio × 360° × quadruple frequency.
[0021] Further, the present invention also provides a system for synchronizing data between a motion mechanism and an optical sensor, which includes a motion mechanism, a spectral confocal controller, and a host computer. A first sensor and a second sensor are provided on the motion mechanism. The first sensor is used to collect the position and rotation angle information of the motion mechanism, and the second sensor is used to collect the distance information of the motion mechanism. The output ends of the first sensor and the second sensor are respectively connected to the input end of the spectral confocal controller, and the output end of the spectral confocal controller is connected to the host computer;
[0022] It further includes a motion controller. The input end of the motion controller is connected to the host computer, and the output end of the motion controller is connected to the motion mechanism. The host computer drives the motion mechanism to adjust its position through the motion controller.
[0023] Further, it also includes a signal distributor. The output end of the first sensor is connected to the signal distributor. The signal distributor has a first output end and a second output end. The first output end of the signal distributor is connected to the spectral confocal controller, and the second output end of the signal distributor is connected to the motion mechanism. The signal distributor transmits the position and rotation angle information of the motion mechanism to the spectral confocal controller and the motion mechanism respectively.
[0024] Further, it also includes a signal converter. The first output end of the signal distributor is connected to the signal converter, and the output end of the signal converter is connected to the spectral confocal controller. The signal converter can convert the position and rotation angle signal output by the signal distributor into a pulse signal.
[0025] Further, the motion mechanism includes a translation motor, a rotation motor, and a driver. The first sensor includes a grating scale and an encoder. The grating scale is arranged on the translation motor, and the encoder is arranged on the rotation motor. The grating scale can collect the position signal of the translation motor, and the encoder can collect the rotation angle signal of the rotation motor. The grating scale and the encoder respectively transmit the collected position signal and rotation angle signal to the signal distributor; the second output end of the signal distributor is connected to the input end of the driver. The driver has a first output end and a second output end. The first output end of the driver is connected to the translation motor and the rotation motor, and the second output end of the driver is connected to the motion controller.
[0026] Further, the spectral confocal controller includes a multi-channel pulse hardware interface and a storage area. The output end of the signal converter is connected to the multi-channel pulse hardware interface. The multi-channel pulse hardware interface can decode the input pulse signal into a 4-fold frequency and direction signal. The output end of the multi-channel pulse hardware interface is connected to the storage area, and the storage area is used to store the data input from the multi-channel pulse hardware interface.
[0027] The beneficial effects achieved by the present invention are mainly as follows: The present invention provides a method for synchronizing the data of a motion mechanism and an optical sensor. A signal distributor copies the position and rotation angle information of the motion mechanism into two identical signals. One of the signals is connected back to the motion mechanism to achieve position closed-loop, and the other is connected to a signal converter. The signal converter converts the input position and rotation angle information into pulse signals and connects them to a spectral confocal controller for decoding and storage. At the same time, the spectral confocal sensor inputs the results of each exposure measurement into the spectral confocal controller for storage, thereby realizing the synchronous acquisition of the position and rotation angle information and the distance information of the motion mechanism. The host computer reads and processes the position and rotation angle information and the distance information stored in the spectral confocal controller, and drives the motion mechanism to adjust its position according to the processing results, thereby realizing the synchronization of the motion position of the motion mechanism and the measurement, and timely adjusting the motion of the motion mechanism according to the collected data, improving the accuracy and efficiency in the acquisition process. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic structural diagram of the system for synchronizing the data of the motion mechanism and the optical sensor in the embodiment of the present invention.
[0029] The drawings are only for illustrative purposes and cannot be construed as a limitation of this patent; for better illustration of this embodiment, some components in the drawings will be omitted, enlarged or reduced, and do not represent the dimensions of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted; the same or similar reference numerals correspond to the same or similar components; the terms used to describe the positional relationship in the drawings are only for illustrative purposes and cannot be construed as a limitation of this patent. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of the technical solutions appears to be contradictory or unable to be implemented, it should be considered that such a combination of the technical solutions does not exist and is not within the protection scope required by the present invention.
[0031] The technical solutions of the present invention will be described in detail below in conjunction with specific drawings.
[0032] Embodiment 1:
[0033] As Figure 1 shown, in this embodiment, the method for synchronizing the data of the motion mechanism and the optical sensor includes the following steps:
[0034] S1: The motion controller sends a motion command to the motion mechanism through the fieldbus to drive the motion mechanism to move, and the motion controller uploads the initial position and rotation angle coordinates of the motion mechanism obtained to the host computer.
[0035] Specifically, the first sensor includes a grating scale and an encoder, and the second sensor is a spectral confocal sensor. When the motion mechanism starts to move initially, there is an absolute positioning and zero-finding process. In this embodiment, an incremental grating scale is sampled, and a zero-position sensor is installed on the motion axis of the motion mechanism. After the system is powered on, the motion controller drives the motion mechanism to perform a zero-finding action. After the zero-position sensor is triggered during the movement of the motion mechanism, the motion controller records the current position as the initial position. In other embodiments, an absolute grating scale can also be sampled, and the absolute grating scale directly transmits the initial position coordinates of the motion mechanism to the motion controller; the motion sensor uploads the initial position and rotation angle coordinates of the motion mechanism obtained to the host computer.
[0036] S2: The first sensor and the second sensor respectively collect the position and rotation angle information and distance information of the motion mechanism, and upload them to the spectral confocal controller.
[0037] Specifically, the first sensor collects the position and rotation angle information of the motion mechanism and uploads it to the signal distributor; the signal distributor copies the position and rotation angle information into two identical signals, one is connected to the driver of the motion mechanism to achieve full-closed-loop position control of the motion mechanism, and the other is connected to the signal converter; the signal converter converts the received position and rotation angle information into a pulse signal and uploads the converted pulse signal to the spectral confocal controller; the second sensor collects the distance information of the motion mechanism and uploads it to the spectral confocal controller.
[0038] S3: The spectral confocal controller decodes the received position and rotation angle information and distance information, respectively obtains multiple sampling data of the first sensor and the second sensor, and uploads the multiple sampling data to the host computer.
[0039] Specifically, the spectral confocal controller is built-in with multiple pulse hardware interfaces. The spectral confocal controller decodes the received position and rotation angle information and distance information into 4-fold frequency and direction signals, performs counting, and stores the counting results in the storage area of the spectral confocal controller.
[0040] S4: The host computer synchronizes the multiple sampling data of the first sensor and the second sensor, obtains the position and rotation angle increment data of the motion mechanism, and processes the obtained initial position coordinates and position increment data to obtain the current absolute position coordinates and absolute rotation angle coordinates of the motion mechanism.
[0041] Specifically, the multiple sampling data of the first sensor and the second sensor obtained by the host computer cannot be directly used for subsequent dimension analysis and need to be converted into absolute position coordinates in three-dimensional space, including two conversion requirements:
[0042] One is to convert the pulse data obtained from the spectral confocal controller into the position and rotation angle increments in three-dimensional space; specifically, the corresponding position and rotation angle increments can be calculated through the encoder resolution and the mechanical transmission ratio. The specific calculation method is as follows:
[0043] Position increment = (pulse count value / encoder resolution) × reduction ratio × lead × 4-fold frequency;
[0044] Angle increment = (pulse count value / encoder resolution) × reduction ratio × 360° × 4-fold frequency.
[0045] The other is to convert the displacement and rotation angle increments into the absolute position and absolute rotation angle in three-dimensional space. The specific calculation method is as follows:
[0046] Absolute position coordinate = position increment + initial position coordinate
[0047] Absolute rotation angle coordinate = rotation angle increment + initial rotation angle coordinate.
[0048] S5: The host computer sends a control signal to the motion controller, and controls the motion mechanism to adjust the position through the motion controller.
[0049] Specifically, by analyzing the collected information, the host computer sends a control message to the motion controller, thereby regulating the motion of the motion mechanism, so as to realize the synchronization of the motion position of the motion mechanism and the measurement, and timely adjust the motion of the motion mechanism according to the collected data, improving the accuracy and efficiency in the collection process.
[0050] Embodiment 2:
[0051] This embodiment also provides a system for synchronizing the data of the motion mechanism and the optical sensor, including a motion mechanism. The motion mechanism includes a translation motor, a rotation motor and a driver. A first sensor and a second sensor are provided on the motion mechanism. The first sensor is used to collect the position and rotation angle information of the motion mechanism, and the second sensor is used to collect the distance information of the motion mechanism.
[0052] Specifically, the first sensor includes a grating scale and an encoder. The grating scale is arranged on the translation motor, and the encoder is arranged on the rotation motor. The grating scale can collect the position signal of the translation motor, and the encoder can collect the rotation angle signal of the rotation motor. The grating scale and the encoder respectively transmit the collected position signal and rotation angle signal to the signal distributor; the second sensor is a spectral confocal sensor, and the output end of the second sensor is directly connected to the input end of the spectral confocal controller.
[0053] Further, the signal distributor is provided with a first output end and a second output end. The first output end of the signal distributor is connected to the signal converter, and the output end of the signal converter is connected to the spectral confocal controller. The signal converter can convert the position rotation angle signal output by the signal distributor into a pulse signal, and the spectral confocal controller can decode and store the pulse signal. The second output end of the signal distributor is connected to the input end of the driver, so as to realize the full-closed-loop position control of the motion mechanism. The output end of the spectral confocal controller is connected to the host computer, and the host computer can read the data stored in the spectral confocal controller.
[0054] Specifically, the spectral confocal controller includes a multi-channel pulse hardware interface and a storage area. The output end of the signal converter is connected to the multi-channel pulse hardware interface. The multi-channel pulse hardware interface can decode the input pulse signal into a 4-fold frequency and direction signal. The output end of the multi-channel pulse hardware interface is connected to the storage area, and the storage area is used to store the data input from the multi-channel pulse hardware interface.
[0055] Further, the driver is provided with a first output end and a second output end. The first output end of the driver is connected to the translation motor and the rotation motor, and the second output end of the driver is connected to the motion controller. The input end of the motion controller is connected to the host computer, and the host computer drives the motion mechanism to adjust the position through the motion controller.
[0056] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, rather than limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A method for synchronizing data between a motion mechanism and an optical sensor, characterized in that, It includes the following steps: S1: The motion controller sends a motion command to the motion mechanism through the fieldbus to drive the motion mechanism to move, and the motion controller uploads the obtained initial position and rotation angle coordinates of the motion mechanism to the host computer; S2: The first sensor and the second sensor respectively collect the position rotation angle information and distance information of the motion mechanism, and upload them to the spectral confocal controller; S3: The spectral confocal controller decodes the received position rotation angle information and distance information, respectively obtains multiple sampling data of the first sensor and the second sensor, and uploads the multiple sampling data to the host computer; S4: The host computer synchronizes the multiple sampling data of the first sensor and the second sensor to obtain the position and rotation angle increment data of the motion mechanism, and processes the obtained initial position coordinates and position increment data to obtain the current absolute position coordinates and absolute rotation angle coordinates of the motion mechanism; S5: The host computer issues a control signal to the motion controller, and controls the motion mechanism to adjust the position through the motion controller.
2. The method for synchronizing data of a motion mechanism and an optical sensor according to claim 1, characterized in that The specific steps of S2 are: The first sensor collects the position rotation angle information of the motion mechanism and uploads it to the signal distributor; The signal distributor copies the position rotation angle information into two identical signals, one is connected to the driver of the motion mechanism, and the other is connected to the signal converter; The signal converter converts the received position rotation angle information into a pulse signal, and uploads the converted pulse signal to the spectral confocal controller; The second sensor collects the distance information of the motion mechanism and uploads it to the spectral confocal controller.
3. The method for synchronizing data of the motion mechanism and the optical sensor according to claim 2, characterized in that, The spectral confocal controller decodes the received position rotation angle information and distance information into a 4-fold frequency and direction signal, performs counting and stores the counting result in the storage area of the spectral confocal controller.
4. The method for synchronizing data between a motion mechanism and an optical sensor according to claim 2, characterized in that, The first sensor includes a grating scale and an encoder, and the second sensor is a spectral confocal sensor.
5. The method for synchronizing the data of the motion mechanism and the optical sensor according to claim 4, characterized in that, The method for the host computer to synchronize the multiple sampling data of the first sensor and the second sensor is to calculate the corresponding position and rotation angle increments through the encoder resolution and the mechanical transmission ratio. The specific calculation method is: Position increment = (pulse count value / encoder resolution) × reduction ratio × lead × 4-fold frequency; Angle increment = (pulse count value / encoder resolution) × reduction ratio × 360° × 4-fold frequency.
6. A system for synchronizing data between a motion mechanism and an optical sensor, characterized in that, It includes a motion mechanism, a spectral confocal controller and a host computer. The motion mechanism is provided with a first sensor and a second sensor. The first sensor is used to collect the position rotation angle information of the motion mechanism, and the second sensor is used to collect the distance information of the motion mechanism. The output ends of the first sensor and the second sensor are respectively connected to the input end of the spectral confocal controller, and the output end of the spectral confocal controller is connected to the host computer; It further includes a motion controller. The input end of the motion controller is connected to the host computer, and the output end of the motion controller is connected to the motion mechanism. The host computer drives the motion mechanism to adjust the position through the motion controller.
7. The system for synchronizing the data of the motion mechanism and the optical sensor according to claim 6, wherein It further includes a signal distributor. The output end of the first sensor is connected to the signal distributor. The signal distributor is provided with a first output end and a second output end. The first output end of the signal distributor is connected to the spectral confocal controller, and the second output end of the signal distributor is connected to the motion mechanism. The signal distributor transmits the position rotation angle information of the motion mechanism to the spectral confocal controller and the motion mechanism respectively.
8. The system for synchronizing the data of the motion mechanism and the optical sensor according to claim 7, wherein It further includes a signal converter. The first output end of the signal distributor is connected to the signal converter, and the output end of the signal converter is connected to the spectral confocal controller. The signal converter can convert the position rotation angle signal output by the signal distributor into a pulse signal.
9. The system for synchronizing the data of the motion mechanism and the optical sensor according to claim 7, wherein The motion mechanism includes a translation motor, a rotation motor and a driver. The first sensor includes a grating scale and an encoder. The grating scale is arranged on the translation motor, and the encoder is arranged on the rotation motor. The grating scale can collect the position signal of the translation motor, and the encoder can collect the rotation angle signal of the rotation motor. The grating scale and the encoder transmit the collected position signal and rotation angle signal to the signal distributor respectively; The second output end of the signal distributor is connected to the input end of the driver. The driver is provided with a first output end and a second output end. The first output end of the driver is connected to the translation motor and the rotation motor, and the second output end of the driver is connected to the motion controller.
10. The system for synchronizing the motion mechanism and the optical sensor data according to claim 8, characterized in that, The spectral confocal controller includes a multi-channel pulse hardware interface and a storage area. The output end of the signal converter is connected to the multi-channel pulse hardware interface. The multi-channel pulse hardware interface can decode the input pulse signal into a 4-fold frequency and direction signal. The output end of the multi-channel pulse hardware interface is connected to the storage area, and the storage area is used for storing the data input from the multi-channel pulse hardware interface.