Multi-axis system image acquisition control method and system, storage medium and equipment
By acquiring the position information of the multi-axis system servo motor encoder in real time, judging and triggering the visual module to acquire images, the problem of inaccurate shooting position in the multi-axis environment in traditional technology is solved, and high-precision multi-axis system image acquisition is achieved.
Patent Information
- Application Number
- CN202411269705.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-27
AI Technical Summary
In a complex multi-axis linkage environment, traditional single motion dimension position monitoring is difficult to ensure the accuracy and efficiency of the surface array flying shooting technology, resulting in the problem of inaccurate shooting position.
By obtaining the encoder position information of multiple servo motors in real time, we judge whether the positions of the two servo motors meet the shooting trigger conditions, and control the vision module to collect images when the servo motor position is accurately reached, realizing high-precision image acquisition of the multi-axis system.
It realizes efficient and accurate image acquisition on the surface of complex workpieces, and improves the image acquisition accuracy of multi-axis system during continuous motion.
Smart Images

Figure CN119200501A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual inspection technology, and in particular to a control method and system for multi-axis system image acquisition, a storage medium, and a computer device. Background Art
[0002] With the rapid development of visual inspection technology, visual inspection technology is often used to check the surface defects of complex workpieces. Before surface defect detection, a multi-axis system and an area array camera are often used to collect images of the surface of complex workpieces. Here, a multi-axis system usually refers to a multi-degree-of-freedom motion system composed of more than 4 motion axes. The multi-axis system can realize the area array camera and the workpiece to be tested at a specific angle through multi-axis linkage.
[0003] The image acquisition control methods of area array cameras usually include fixed-shot technology (the area array camera and the workpiece to be measured take pictures under static conditions) and flying-shot technology (the area array camera and the workpiece to be measured take pictures under conditions of relative movement). In the field of highly automated visual inspection, the area array flying-shot technology has become a key solution in many complex industrial scenarios due to its high efficiency and speed. This technology relies on precise position control to ensure the accuracy and timeliness of image acquisition. Traditional implementation methods usually focus on precise tracking of a single motion dimension. Through real-time feedback from the servo encoder, the current position is compared with the preset shooting point to trigger the shooting action. However, with the continuous improvement of industrial automation, especially when facing tasks involving multi-dimensional spatial motion, this single motion dimension position monitoring gradually reveals its limitations. If only relying on the position information of a certain motion dimension as the basis for triggering the photo, it is likely to result in inaccurate photo positions or no photos at the shooting points.
[0004] Therefore, for the area array flying photography technology that pursues higher precision and stability, how to accurately and quickly find the shooting points in a complex multi-axis linkage environment has become a technical problem that needs to be solved urgently in this field. Summary of the invention
[0005] In view of this, the present application provides a control method and system, storage medium, and computer equipment for image acquisition of a multi-axis system. Through the multi-axis linkage between the vision module and the workpiece to be measured, the area array flying camera technology is used to realize efficient image acquisition of the surface of complex workpieces, and the encoder position feedback of the two servo motors is used as a position comparison source to perform high-speed two-dimensional position comparison with the shooting point. When the position coordinates of the two servo motors involved in the two-dimensional position comparison arrive at the shooting point at the same time, the vision module is controlled to take pictures, thereby finally realizing the technical effect of high-precision image acquisition of the multi-axis system during continuous motion.
[0006] According to one aspect of the present application, a control method for image acquisition of a multi-axis system is provided, which is applied to a multi-axis system, wherein the multi-axis system includes a vision module and a plurality of servo motors; the method includes:
[0007] In the process of the multi-axis system performing the motion photography control task, the first encoder position information corresponding to the first servo motor among the multiple servo motors and the second encoder position information corresponding to the second servo motor among the multiple servo motors are obtained in real time, wherein the first servo motor is used to drive the visual module to perform linear motion in the direction of the first coordinate axis, and the second servo motor is used to drive the workpiece to be measured to perform linear motion in the direction of the second coordinate axis;
[0008] Based on the first encoder position information and the second encoder position information, determine whether the current positions corresponding to the first servo motor and the second servo motor respectively meet the shooting trigger conditions of the vision module, and when the shooting trigger conditions are met, control the vision module to capture the image of the workpiece to be measured.
[0009] According to another aspect of the present application, a control system for multi-axis system image acquisition is provided, which is applied to a multi-axis system, wherein the multi-axis system includes a vision module and a plurality of servo motors; the control system includes a plurality of servo drivers and a main control module, and each servo driver corresponds to a servo motor:
[0010] A first servo driver is used to obtain, in real time, first encoder position information corresponding to a first servo motor among the plurality of servo motors during the process of the multi-axis system performing a motion photography control task, and send the first encoder position information to a main control module, wherein the first servo motor is used to drive the vision module to perform a linear motion in the direction of a first coordinate axis;
[0011] A second servo driver is used to obtain the second encoder position information corresponding to the second servo motor among the multiple servo motors in real time during the process of the multi-axis system performing the motion photography control task, and send the second encoder position information to the main control module, wherein the second servo motor is used to drive the workpiece to be measured to perform linear motion in the direction of the second coordinate axis;
[0012] The main control module is also used to determine whether the current positions corresponding to the first servo motor and the second servo motor meet the shooting trigger conditions of the vision module based on the first encoder position information and the second encoder position information, and when the shooting trigger conditions are met, control the vision module to capture the image of the workpiece to be measured.
[0013] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the control method for image acquisition of the multi-axis system is implemented.
[0014] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned control method for multi-axis system image acquisition when executing the program.
[0015] By means of the above technical scheme, the present application provides a control method and system for image acquisition of a multi-axis system, a storage medium, and a computer device. When executing a motion photography control task, the first encoder position information can be obtained from the first encoder corresponding to the first servo motor in real time, and the second encoder position information can be obtained from the second encoder corresponding to the second servo motor. Afterwards, it can be determined whether to trigger the visual module for image acquisition based on the first encoder position and the second encoder position. The shooting trigger condition can be determined based on the position of the two servo motors. Once the shooting trigger condition is met, the visual module can be controlled to perform image acquisition on the workpiece to be measured. The embodiment of the present application realizes efficient image acquisition of the surface of a complex workpiece by using the multi-axis linkage between the visual module and the workpiece to be measured using the array flying shooting technology, and uses the encoder position feedback of the two servo motors as a position comparison source to perform high-speed two-dimensional position comparison with the shooting point. When the position coordinates of the two servo motors participating in the two-dimensional position comparison arrive at the shooting point at the same time, the visual module is controlled to take pictures, and finally the technical effect of high-precision image acquisition of the multi-axis system during continuous motion is achieved.
[0016] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A schematic flow chart of a control method for image acquisition of a multi-axis system provided in an embodiment of the present application is shown;
[0019] Figure 2 A schematic diagram of the structure of a control system for multi-axis system image acquisition provided in an embodiment of the present application is shown;
[0020] Figure 3A schematic diagram of a teaching shooting point provided in an embodiment of the present application is shown;
[0021] Figure 4 A schematic diagram showing teaching shooting points corresponding to shooting postures 1 to 4 provided in an embodiment of the present application is shown;
[0022] Figure 5 A schematic diagram showing teaching shooting points corresponding to shooting postures 5 to 8 provided in an embodiment of the present application is shown;
[0023] Figure 6 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0025] In this embodiment, a control method for image acquisition of a multi-axis system is provided, which is applied to a multi-axis system, wherein the multi-axis system includes a vision module and a plurality of servo motors; Figure 1 As shown, the method includes:
[0026] Step 101, in the process of the multi-axis system performing the motion photography control task, the first encoder position information corresponding to the first servo motor among the multiple servo motors and the second encoder position information corresponding to the second servo motor among the multiple servo motors are obtained in real time, wherein the first servo motor is used to drive the vision module to perform linear motion in the direction of the first coordinate axis, and the second servo motor is used to drive the workpiece to be measured to perform linear motion in the direction of the second coordinate axis.
[0027] A control method for image acquisition of a multi-axis system provided in an embodiment of the present application can be applied to a multi-axis system, and specifically, the multi-axis system can be controlled by a control system to utilize the multi-axis system to acquire images of the workpiece to be measured. Here, the multi-axis system is a multi-axis system in a broad sense, and a visual module and a plurality of servo motors may be included in the multi-axis system, wherein the visual module is responsible for image acquisition, and the servo motor is used to accurately control the position, speed and acceleration of the visual module and the workpiece to be measured. Among the plurality of servo motors in the multi-axis system, a first servo motor and a second servo motor may be included, the first servo motor is used to drive the visual module to perform linear motion in the direction of a first coordinate axis (such as the X-axis), and the second servo motor is used to drive the workpiece to be measured to perform linear motion in the direction of a second coordinate axis (such as the Y-axis).
[0028] When executing the motion photography control task, that is, by controlling the motion of the multi-axis system and taking photos of the workpiece to be measured during the motion of the multi-axis system, the first encoder position information can be obtained in real time from the first encoder corresponding to the first servo motor, and the second encoder position information can be obtained from the second encoder corresponding to the second servo motor. Each servo motor can be provided with an encoder, and the current position of the servo motor can be accurately fed back through the encoder. Specifically, the first encoder position information reflects the current position of the visual module on the first coordinate axis; the second encoder position information reflects the current position of the workpiece to be measured on the second coordinate axis.
[0029] Step 102, based on the first encoder position information and the second encoder position information, determine whether the current positions corresponding to the first servo motor and the second servo motor respectively meet the shooting trigger conditions of the vision module, and when the shooting trigger conditions are met, control the vision module to capture the image of the workpiece to be measured.
[0030] In this embodiment, after obtaining the first encoder position and the second encoder position, it can be determined whether to trigger the visual module to perform image acquisition according to a preset shooting trigger condition. The shooting trigger condition can be determined based on the position of the two servo motors. For example, the visual module is required to capture an image when it moves to a specific position (such as a point on the X-axis) and the workpiece to be measured also moves to a specific position (such as a point on the Y-axis), that is, only when the positions of the two servo motors jointly meet the above conditions can the shooting be triggered. Once the shooting trigger condition is met, the visual module can be controlled to perform image acquisition on the workpiece to be measured.
[0031] By applying the technical solution of this embodiment, when executing the motion photography control task, the first encoder position information can be obtained from the first encoder corresponding to the first servo motor in real time, and the second encoder position information can be obtained from the second encoder corresponding to the second servo motor. Afterwards, it can be determined whether to trigger the visual module for image acquisition based on the first encoder position and the second encoder position. The shooting trigger condition can be determined based on the position of the two servo motors. Once the shooting trigger condition is met, the visual module can be controlled to perform image acquisition on the workpiece to be measured. The embodiment of the present application uses the area array flying shooting technology through multi-axis linkage between the visual module and the workpiece to be measured to achieve efficient image acquisition of the surface of complex workpieces, and uses the encoder position feedback of the two servo motors as a position comparison source to make a high-speed two-dimensional position comparison with the shooting point. When the position coordinates of the two servo motors involved in the two-dimensional position comparison arrive at the shooting point at the same time, the visual module is controlled to take pictures, and finally the technical effect of high-precision image acquisition of the multi-axis system during continuous motion is achieved.
[0032] In an embodiment of the present application, optionally, before step 101, the method further includes: in response to a start instruction of the motion photography control task, generating a single-axis motion path corresponding to each servo motor in the multi-axis system according to a preset motion path of the multi-axis system, and generating a motion planning instruction according to each single-axis motion path, wherein the single-axis motion path includes a single-axis motion sub-path between every two adjacent shooting points in the motion photography control task; determining each single-axis motion sub-path in the single-axis motion path of the corresponding servo motor according to each motion planning instruction, and generating a position curve instruction according to each single-axis motion sub-path, and controlling the movement of the corresponding servo motor through the position curve instruction.
[0033] In this embodiment, before the multi-axis system starts to execute the motion photography control task, the control system can respond to the start instruction of the motion photography control task and start to execute a series of operations to prepare and execute the motion photography control task. Specifically, the control system can preset the overall motion path of the multi-axis system according to the task requirements. This path is used to indicate how the visual module and the workpiece to be measured move from one shooting point to another when performing the motion photography control task, that is, how the visual module and the workpiece to be measured move to complete the photography task.
[0034] After the control system responds to the start instruction of the motion photography control task, it can generate a corresponding single-axis motion path for each servo motor according to the preset overall motion path. These single-axis motion paths are independent and correspond to the coordinate axes controlled by each servo motor. Each single-axis motion path can be composed of a series of single-axis motion sub-paths, which connect the positions of every two adjacent shooting points in the motion photography control task on the corresponding coordinate axis. Then, the control system can generate corresponding motion planning instructions based on the single-axis motion path of each servo motor. These motion planning instructions describe in detail how the servo motor should move when completing the task, including the starting point, end point, single-axis motion sub-path, etc. of each movement.
[0035] For each motion planning instruction, the control system further identifies the uniaxial motion sub-path of the corresponding servo motor from the motion planning instruction, and generates a position curve instruction based on the uniaxial motion sub-path. These position curve instructions describe the change of the position of the servo motor over time during the movement process, usually a smooth curve. By controlling the servo motor to move according to this curve, it can be ensured that the motor reaches the predetermined position, speed and acceleration requirements during the movement. During the movement of the servo motor, the parameters such as the position, speed and acceleration of the servo motor can also be monitored in real time to ensure that these parameters are consistent with the requirements of the position curve instruction. When the servo motor moves to the specified shooting point, the visual module can be triggered to collect images.
[0036] In an embodiment of the present application, optionally, the plurality of servo motors further include a third servo motor, a fourth servo motor and a fifth servo motor, the third servo motor being used to drive the visual module to perform linear motion in the direction of the third coordinate axis, the fourth servo motor being used to drive the workpiece to be measured to rotate around the first coordinate axis, and the fifth servo motor being used to drive the workpiece to be measured to rotate around the third coordinate axis; generating a position curve instruction corresponding to the fourth servo motor, including: for each single-axis motion sub-path in the single-axis motion path corresponding to the fourth servo motor, judging whether the single-axis motion sub-path is a circular interpolation type path, when the result is yes, generating a position curve instruction for the fourth servo motor under the single-axis motion sub-path, otherwise, not generating a position curve instruction under the single-axis motion sub-path; generating a position curve instruction corresponding to the fifth servo motor, including: for each single-axis motion sub-path in the single-axis motion path corresponding to the fifth servo motor, judging whether the single-axis motion sub-path is a circular interpolation type path, when the result is yes, generating a position curve instruction for the fifth servo motor under the single-axis motion sub-path, otherwise, not generating a position curve instruction under the single-axis motion sub-path.
[0037] In this embodiment, the plurality of servo motors may further include a third servo motor, a fourth servo motor and a fifth servo motor. Among them, the third servo motor is responsible for driving the visual module to move in a straight line along the third coordinate axis (e.g., the Z axis), thereby allowing the visual module to move in a vertical or depth direction; the fourth servo motor is responsible for driving the workpiece to be measured to rotate around the first coordinate axis (e.g., the X axis), and this rotational motion is essential for inspecting the various faces or features of the workpiece to be measured from different angles; the fifth servo motor is responsible for driving the workpiece to be measured to rotate around the third coordinate axis (as mentioned above, such as the Z axis), and this rotation increases the flexibility of the inspection. It should be noted that the first coordinate axis, the second coordinate axis and the third coordinate axis are different coordinate axes, that is, the X axis, the Y axis and the Z axis, respectively, and the specific corresponding method can be determined according to actual needs. In addition, each servo motor corresponds to a servo driver, through which the corresponding servo motor can be driven to move, thereby controlling the servo motor to drive the visual module or the workpiece to be measured to move. Specifically, the first servo driver can drive the first servo motor to move, the second servo driver can drive the second servo motor to move, the third servo driver can drive the third servo motor to move, the fourth servo driver can drive the fourth servo motor to move, and the fifth servo driver can drive the fifth servo motor to move.
[0038] When generating the position curve instruction for the fourth servo motor in this embodiment, the process is as follows: First, for each single-axis motion sub-path corresponding to the fourth servo motor, it can be determined whether it is a "circular interpolation type path". Here, circular interpolation refers to a technology commonly used in numerical control programming, which is used to smoothly control the movement of mechanical parts along a circular arc trajectory. If a single-axis motion sub-path is of the circular interpolation type, it means that the fourth servo motor is required to participate in the movement, because the axis used to drive the fourth servo motor in the multi-axis system is a circular interpolation axis. At this time, the corresponding position curve instruction can be generated for the single-axis motion sub-path. If the single-axis motion sub-path is not of the circular interpolation type (that is, it is of the linear interpolation type), it means that the fourth servo motor is not required to participate in the movement, and thus the position curve instruction is not generated for the single-axis motion sub-path. It should be noted that the above judgment process is repeated every time the fourth servo motor executes a new single-axis motion sub-path.
[0039] Since the fifth servo motor drives the workpiece to be measured to rotate around the third coordinate axis, the axis driving the fifth servo motor in the multi-axis system is also an arc interpolation axis. Therefore, when generating the position curve instruction of the fifth servo motor, the process is the same as that of generating the position curve instruction of the fourth servo motor.
[0040] It should be noted that since the first servo motor, the second servo motor, and the third servo motor all perform linear motion, the axes that drive these servo motors in the multi-axis system are linear interpolation axes. No matter which single-axis motion sub-path is executed, these servo motors are all involved, so the corresponding position curve instructions are directly generated.
[0041] The embodiment of the present application realizes complex motion control of the visual module and the workpiece to be measured in three-dimensional space by accurately controlling multiple servo motors. In particular, for the fourth servo motor that controls the rotation of the workpiece to be measured around the first coordinate axis, and the fifth servo motor that controls the rotation of the workpiece to be measured around the third coordinate axis, an intelligent position curve instruction generation strategy is adopted, which can reduce the generation of invalid position curve instructions.
[0042] In an embodiment of the present application, optionally, the "responding to the start instruction of the motion photography control task, generating a single-axis motion path corresponding to each servo motor in the multi-axis system according to the preset motion path of the multi-axis system" includes: responding to the start instruction of the motion photography control task, adjusting the operation mode to the working mode, writing the preset motion path of the multi-axis system in the continuous buffer of the industrial computer, and generating a single-axis motion path corresponding to each servo motor in the multi-axis system according to the preset motion path of the multi-axis system.
[0043] In this embodiment, when the control system receives the start instruction of the motion photography control task, it first adjusts its operating mode from standby, idle or other non-working state to working mode, and then writes the preset motion path of the multi-axis system into the continuous buffer of the industrial computer. The industrial computer is the core equipment in the field of industrial control, responsible for processing complex control logic and data processing tasks; the continuous buffer is a memory area for storing temporary data, which allows data to be continuously written and read in the form of a stream without waiting for the entire data block to be fully prepared. Afterwards, the single-axis motion path corresponding to each servo motor in the multi-axis system can be generated according to the preset motion path of the continuous buffer. The embodiment of the present application writes the preset motion path into the continuous buffer of the industrial computer. Since the continuous buffer allows data to be continuously written and read in the form of a stream, this method can significantly improve the speed and efficiency of data processing, and the control system can parse and convert data faster, providing timely and accurate information for subsequent servo motor control.
[0044] In an embodiment of the present application, optionally, the preset motion path of the multi-axis system includes point coordinates corresponding to each shooting point; the "based on the first encoder position information and the second encoder position information, determine whether the current positions corresponding to the first servo motor and the second servo motor meet the shooting trigger conditions of the visual module" in step 102, including: comparing the first encoder position corresponding to the first encoder position information with the point coordinates, and determining the point coordinates in the point coordinates whose position error with the first encoder position is less than a first error threshold as the target point coordinates; if the position error between the second encoder position corresponding to the second encoder position information and the target point coordinates is less than a second error threshold, it is determined that the current positions corresponding to the first servo motor and the second servo motor meet the shooting trigger conditions of the visual module.
[0045] In this embodiment, the preset motion path of the multi-axis system includes a series of pre-set shooting points and point coordinates corresponding to each shooting point, and these point coordinates are the positions that the multi-axis system needs to reach accurately when performing the shooting task. In the multi-axis system, each servo motor is equipped with an encoder for real-time feedback of the position information of the servo motor. The first encoder position information and the second encoder position information mentioned here are respectively used to indicate the current position of the first servo motor and the current position of the second servo motor. In order to determine whether the first servo motor and the second servo motor have reached the preset shooting point and trigger the visual module to shoot, the following judgment can be made: first obtain the current position of the first servo motor (i.e., the first encoder position). Then, the first encoder position is compared with the coordinates of each point in the preset motion path. During the comparison process, the point coordinates whose position error with the first encoder position is less than the first error threshold can be found, and the point coordinates are used as the target point coordinates. It should be noted that when the first encoder position is compared with the coordinates of each point, the coordinate value of the shaft of the servo motor corresponding to the first encoder is actually compared with the first encoder position and the coordinates of each point. For example, if a multi-axis system includes 5 axes, then each point coordinate actually includes 5 values, and you can remember (x, y, z, α, β). Assuming that the first coordinate axis is the X axis, you can compare the first encoder position with the x value in each point coordinate. When the position error between the first encoder position and the x value in a certain point coordinate is less than the first error threshold, then the point coordinate can be used as the target point coordinate. Here, the first error threshold can be set to an acceptable error value, such as 0.01mm. When the position error between the first encoder position and the x value in a certain point coordinate is less than 0.01mm, it is considered that the first servo motor has reached the shooting point corresponding to the target point coordinate.
[0046] After determining the target point coordinates, it is possible to further determine whether the current position of the second servo motor (i.e., the second encoder position) also meets the conditions. Specifically, the position error between the second encoder position and the target point coordinates can be calculated. If this error is less than the second error threshold, it can be considered that the second servo motor has also reached the target point coordinates. Similarly, assuming that the second coordinate axis is the Y axis, the second encoder position can be compared with the y value in the target point coordinates. When the position error between the second encoder position and the y value in the target point coordinates is less than the second error threshold, it means that the second servo motor has also reached the shooting point corresponding to the target point coordinates. Here, the second error threshold can also be set to an acceptable error value, such as 0.01 mm.
[0047] If the current positions of the first servo motor and the second servo motor both meet the above conditions, that is, the position errors between their respective current positions and the target point coordinates are less than the corresponding error thresholds, then it is determined that the two servo motors have reached the preset shooting point, and the visual module can be triggered to shoot to capture the image of the workpiece to be measured at the shooting point. The embodiment of the present application achieves accurate judgment of the current position of the servo motor in the multi-axis system by comparing the positions of the two encoders with the preset point coordinates and combining the judgment of the error threshold.
[0048] In an embodiment of the present application, optionally, the vision module includes a light source combination, a light source controller and an area array camera; the method also includes: in response to a start instruction of a motion photography control task, changing the trigger mode of the area array camera and the trigger mode of the light source controller to an external trigger mode; the "when the shooting trigger condition is met, controlling the vision module to capture the image of the workpiece to be measured" in step 102 includes: when the shooting trigger condition is met, sending a vision module image capturing instruction to the light source controller, so that the light source controller, in the external trigger mode, controls the light source combination to strobe according to preset light source control parameters after receiving the vision module image capturing instruction, and sends an image capturing signal to the area array camera, and enables the area array camera to capture the image of the workpiece to be measured according to the stored camera control parameters and the image capturing signal in the external trigger mode.
[0049] In this embodiment, the vision module in the multi-axis system may include a light source combination, a light source controller, and an area array camera. The light source combination is composed of multiple light sources, which is used to provide illumination for the workpiece to be measured so that the area array camera can clearly capture the image of the workpiece to be measured; the light source controller is used to set the light source control parameters of the light source combination, such as brightness and other parameters, to achieve precise control of the light source; the area array camera is used to capture the image of the workpiece to be measured. The area array camera has high resolution and high sensitivity and can take clear photos.
[0050] When starting the motion photography control task, first change the trigger mode of the array camera and light source controller to external trigger mode. This means that their operation is no longer controlled by an internal clock or signal, but is triggered by an external signal, such as a picture acquisition instruction. This setting ensures that the array camera and light source combination can work synchronously at the same time, thus avoiding problems such as image blur or underexposure caused by time difference.
[0051] When the shooting trigger conditions are met, the following steps can be performed to capture the image of the workpiece to be measured:
[0052] A visual module acquisition instruction is sent to the light source controller, which is an external trigger signal used to inform the light source controller and the array camera that the image acquisition process is about to begin. After receiving the visual module acquisition instruction, the light source controller controls the light source combination to strobe according to the preset light source control parameters. Strobe refers to the light source combination flashing quickly once or multiple times in a short period of time to provide sufficient exposure time for the array camera to shoot. The strobe of the light source combination and the exposure time of the array camera need to be accurately matched to ensure that the captured image is clear and correctly exposed. While controlling the light source combination to strobe, the light source controller can send an acquisition signal to the array camera, which is another external trigger signal used to inform the array camera to start collecting images. After receiving the acquisition signal in the external trigger mode, the array camera collects the image of the workpiece to be measured according to the stored camera control parameters (such as exposure time, shutter speed, gain parameters, etc.). Since the triggering of the array camera and the light source combination is synchronized, the captured image will be clear and correctly exposed. The control method based on the external trigger mode in the embodiment of the present application can ensure the synchronization of the array camera and the light source combination, and improve the accuracy and reliability of image acquisition.
[0053] In an embodiment of the present application, optionally, the light source control parameters include a light source combination number; the "when the shooting trigger condition is met, sending a visual module image acquisition instruction to the light source controller" in step 102 includes: when the shooting trigger condition is met, determining the target light source combination number according to the point coordinates of the shooting point corresponding to the shooting trigger condition when the shooting trigger condition is met, and sending a visual module image acquisition instruction carrying the target light source combination number to the light source controller; accordingly, the "light source controller, in an external trigger mode, receives the visual module image acquisition instruction, and controls the light source combination to strobe according to preset light source control parameters" includes: in an external trigger mode, after the light source controller receives the visual module image acquisition instruction, parsing the target light source combination number from the visual module image acquisition instruction, and obtaining the light source control parameters corresponding to the target light source combination number from the preset light source control parameters, and strobing the light source combination according to the light source control parameters corresponding to the target light source combination number.
[0054] In this embodiment, the light source control parameters not only include conventional settings such as brightness and color of the light source, but also introduce the light source combination number. The light source combination number is used to uniquely identify different light source combination configurations, which can vary according to different shooting points to adapt to different lighting requirements of the workpiece to be measured. When the shooting trigger condition is met, the control system can not only trigger the image acquisition process, but also determine the target light source combination number to be used according to the point coordinates of the current shooting point. This is because different shooting points require different lighting conditions to ensure image quality. For example, some areas may require stronger lighting to highlight details, while other areas may require soft lighting to avoid reflections. Afterwards, the control system can send the visual module acquisition instruction carrying the target light source combination number to the light source controller. After the light source controller receives the visual module acquisition instruction in the external trigger mode, it first parses the target light source combination number in the instruction. Then, the light source control parameter corresponding to the target light source combination number is retrieved from the preset light source control parameters. Finally, the light source controller can control the corresponding light source combination to strobe according to the retrieved light source control parameter. The embodiment of the present application introduces the light source combination number and uses it as part of the visual module image acquisition instruction, which can not only meet the diverse requirements of lighting conditions at different shooting points, but also improve the quality of image acquisition.
[0055] In an embodiment of the present application, optionally, the method further includes: in response to a correction instruction of the light source control parameter, obtaining the preset light source control parameter from the light source controller, and displaying the preset light source control parameter; in response to a correction operation on any light source control parameter, based on user input data, correcting the any light source control parameter, and sending the corrected light source control parameter to the light source controller, so that the light source controller updates the preset light source control parameter according to the received corrected light source control parameter.
[0056] In this embodiment, the user can also modify the preset light source control parameters in the light source controller through the control system. Specifically, the user can issue a modification instruction of the light source control parameters through the control system, and then the control system can respond to the modification instruction to obtain the currently preset light source control parameters from the light source controller. After obtaining the light source control parameters, they can be displayed on the UI (User Interface). In this way, the user can intuitively see the current light source configuration and provide a reference for possible subsequent modifications. Subsequently, the user can perform a modification operation on any light source control parameter through the UI. For example, change the brightness of a certain light source, select different colors, etc. The control system can receive the data corresponding to the input modification operation, and modify the corresponding light source control parameters based on these user input data. After the modification is completed, the modified light source control parameters are sent back to the light source controller. After receiving the modified light source control parameters, the light source controller updates the preset light source control parameters stored internally. In this way, in the subsequent image acquisition process, the light source combination can work according to the new configuration. The embodiment of the present application realizes the dynamic modification and update of the light source control parameters through the interaction between the user interface and the light source controller, and the user can adjust the configuration of the light source combination at any time according to actual needs to obtain the best image acquisition effect.
[0057] In an embodiment of the present application, optionally, the motion planning instruction carries a target operating speed curve; the "determining each single-axis motion sub-path in the single-axis motion path of the corresponding servo motor according to each motion planning instruction, and generating a position curve instruction according to each single-axis motion sub-path" includes: determining each single-axis motion sub-path and the target operating speed curve in the single-axis motion path of the corresponding servo motor according to each motion planning instruction, and mapping each single-axis motion sub-path with the corresponding target operating speed curve, and generating a position curve instruction according to the mapping processing result.
[0058] In this embodiment, the motion planning instruction may carry a target operating speed curve, which describes the changing law of the speed and acceleration of the servo motor over time or position during the motion process. The target operating speed curve is crucial to ensure the stability, accuracy and efficiency of the servo motor motion. The process of generating the position curve instruction can be as follows: First, each single-axis motion sub-path in the single-axis motion path of the corresponding servo motor can be determined according to the motion planning instruction. Then, each sub-path is mapped with the corresponding target operating speed curve. This mapping process is to correspond each point (or each section) on the target operating speed curve with the corresponding position or time period on the single-axis motion sub-path, ensuring that the servo motor can accelerate, uniformly speed or decelerate according to the target operating speed curve during the motion process. After completing the mapping process, the position curve instruction can be generated according to the mapping result, which not only contains the position information (i.e., the position curve) that the servo motor should reach at each moment, but also implies how the servo motor should adjust its speed according to the target operating speed curve. The position curve instruction is the direct basis for the control system to perform the motion task, ensuring that the servo motor can move accurately according to the predetermined trajectory and speed. The embodiment of the present application generates an accurate position curve instruction through the target operating speed curve and the single-axis motion sub-path. The instruction not only guides the motion trajectory of the servo motor, but also controls the motion speed of the servo motor, thereby achieving fine control of the servo motor motion.
[0059] In an embodiment of the present application, optionally, before the "responding to the start instruction of the motion photography control task, adjusting the operation mode to the working mode, and writing the preset motion path of the multi-axis system into the continuous buffer of the industrial computer", the method also includes: responding to the creation instruction of the motion photography control task, adjusting the operation mode to the teaching mode, and changing the trigger mode of the area array camera and the trigger mode of the light source controller to the internal trigger mode, sending the camera control parameters to the area array camera, so that the area array camera receives the camera control parameters, and continuously acquires images according to the camera control parameters in the internal trigger mode, and the light source controller is caused to strobe according to the preset light source control parameters in the internal trigger mode; according to the moving operation instruction, adjusting the position relationship between the vision module and the workpiece sample through the multi-axis system, determining the teaching shooting point, and recording the point coordinates corresponding to each servo motor at each teaching shooting point, as well as the teaching motion path between two adjacent teaching shooting points, and obtaining the preset motion path according to the recording result, wherein the image of the workpiece sample acquired by the vision module at each teaching shooting point meets the preset clarity requirement.
[0060] In this embodiment, after receiving the creation instruction of the motion photography control task, the control system adjusts the current operation mode to the teaching mode. The teaching mode is a special operation mode used to set and record the teaching motion path, light source control parameters, etc. of the visual module and the workpiece to be measured manually or programmatically, so that the subsequent automatic operation can be executed according to these settings. Then, the trigger mode of the array camera and the trigger mode of the light source controller are changed to the internal trigger mode. The internal trigger mode means that the trigger signal of the array camera and the light source combination is generated by the control system instead of being triggered externally. This ensures the synchronization of the array camera and the light source combination, and that they can work according to the preset parameters and timing. Then, the camera control parameters are sent to the array camera. Here, the camera control parameters are the key configuration required for the array camera to acquire images, which determines the quality and characteristics of the acquired images. In the internal trigger mode, the array camera continuously acquires images according to the received camera control parameters, that is, the array camera continuously acquires images of the workpiece samples within the field of view according to the camera control parameters until the teaching mode ends. At the same time, the light source controller can also perform strobing according to the preset light source control parameters in the internal trigger mode. The stroboscopic light source can help improve the contrast and clarity of the image. After that, the control system adjusts the positional relationship between the visual module and the workpiece sample through the multi-axis system according to the mobile operation instruction. Here, the mobile operation instruction can be a JOG instruction of the operator operating the software system, that is, the operator can move the visual module and the workpiece sample in the teaching mode through the JOG instruction of the operating software system. In the process of adjusting the position, the control system can determine a series of teaching shooting points. These teaching shooting points can be key shooting positions that can clearly reflect the characteristics of the workpiece sample. At each teaching shooting point, the visual module can collect images of the workpiece sample, and the collected images can meet the preset clarity requirements, so that when the motion photography control task is performed later, it can be ensured that the images collected at each shooting point are clear. During the teaching process, the control system can also record the point coordinates corresponding to each servo motor at each teaching shooting point, as well as the teaching motion path between two adjacent teaching shooting points. Finally, a complete preset motion path can be generated based on the recorded point coordinates and the taught motion path. The path includes all necessary moving paths from the first taught shooting point to the last taught shooting point, as well as the point coordinates of each taught shooting point, to ensure that the motion photography control task can be completed accurately and efficiently during subsequent automated operation.
[0061] It should be noted that when creating a motion photography control task, the first servo motor and the third servo motor drive the visual module, and the second servo motor, the fourth servo motor and the fifth servo motor drive the workpiece sample, and the motion performed by each servo motor is the same as when performing the motion photography control task.
[0062] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a control system for image acquisition of a multi-axis system, which is applied to a multi-axis system, wherein the multi-axis system includes a vision module and a plurality of servo motors; Figure 2 As shown, the control system includes multiple servo drives and a main control module, and each servo drive corresponds to a servo motor:
[0063] A first servo driver is used to obtain, in real time, first encoder position information corresponding to a first servo motor among the plurality of servo motors during the process of the multi-axis system performing a motion photography control task, and send the first encoder position information to a main control module, wherein the first servo motor is used to drive the vision module to perform a linear motion in the direction of a first coordinate axis;
[0064] A second servo driver is used to obtain the second encoder position information corresponding to the second servo motor among the multiple servo motors in real time during the process of the multi-axis system performing the motion photography control task, and send the second encoder position information to the main control module, wherein the second servo motor is used to drive the workpiece to be measured to perform linear motion in the direction of the second coordinate axis;
[0065] The main control module is also used to determine whether the current positions corresponding to the first servo motor and the second servo motor meet the shooting trigger conditions of the vision module based on the first encoder position information and the second encoder position information, and when the shooting trigger conditions are met, control the vision module to capture the image of the workpiece to be measured.
[0066] Optionally, the main control module includes a software system deployed on an industrial computer and a motion control card installed on the industrial computer; the control system also includes:
[0067] The software system is used for sending the preset motion path of the multi-axis system to the motion control card in response to a start instruction of the motion photography control task before the multi-axis system performs the motion photography control task;
[0068] The motion control card is used to generate a single-axis motion path corresponding to each servo motor in the multi-axis system according to a preset motion path of the multi-axis system, and generate a motion planning instruction according to each single-axis motion path, and send the motion planning instruction to the servo driver of the corresponding servo motor, wherein the single-axis motion path includes a single-axis motion sub-path between every two adjacent shooting points in the motion photography control task;
[0069] Each of the servo drivers is used to determine each single-axis motion sub-path in the single-axis motion path of the corresponding servo motor according to the motion planning instruction, and generate a position curve instruction according to each single-axis motion sub-path, and control the movement of the corresponding servo motor through the position curve instruction.
[0070] Optionally, the plurality of servo motors further include a third servo motor, a fourth servo motor and a fifth servo motor, wherein the third servo motor is used to drive the visual module to perform linear motion in the direction of a third coordinate axis, the fourth servo motor is used to drive the workpiece to be measured to rotate around the first coordinate axis, and the fifth servo motor is used to drive the workpiece to be measured to rotate around the third coordinate axis;
[0071] The fourth servo motor is driven by a fourth servo driver; the fourth servo driver is used to:
[0072] For each single-axis motion sub-path in the single-axis motion path corresponding to the fourth servo motor, determine whether the single-axis motion sub-path is a circular interpolation type path, and when the result is yes, generate a position curve instruction for the fourth servo motor under the single-axis motion sub-path; otherwise, do not generate a position curve instruction under the single-axis motion sub-path;
[0073] The fifth servo motor is driven by a fifth servo driver; the fifth servo driver is used to:
[0074] For each single-axis motion sub-path in the single-axis motion path corresponding to the fifth servo motor, determine whether the single-axis motion sub-path is a circular arc interpolation type path. When the result is yes, generate a position curve instruction for the fifth servo motor under the single-axis motion sub-path; otherwise, do not generate a position curve instruction under the single-axis motion sub-path.
[0075] Optionally, the software system is further used to adjust the operation mode to the working mode in response to a start instruction of the motion photography control task, and send the preset motion path of the multi-axis system to the motion control card;
[0076] The motion control card is also used to write the preset motion path of the multi-axis system into the continuous buffer of the industrial computer, and generate a single-axis motion path corresponding to each servo motor in the multi-axis system according to the preset motion path of the multi-axis system.
[0077] Optionally, the preset motion path of the multi-axis system includes point coordinates corresponding to each shooting point; and the motion control card is further used for:
[0078] Compare the first encoder position corresponding to the first encoder position information with each point coordinate, and determine the point coordinates among the point coordinates whose position error with the first encoder position is less than a first error threshold as the target point coordinates;
[0079] If the position error between the second encoder position corresponding to the second encoder position information and the target point coordinates is less than a second error threshold, it is determined that the current positions corresponding to the first servo motor and the second servo motor respectively meet the shooting trigger conditions of the visual module.
[0080] Optionally, the visual module includes a light source combination, a light source controller and an area array camera;
[0081] The software system is further used to change the trigger mode of the area array camera and the trigger mode of the light source controller to an external trigger mode in response to a start instruction of the motion photography control task;
[0082] The motion control card is further used to send a visual module image acquisition instruction to the light source controller when a shooting trigger condition is met;
[0083] The light source controller is further used to control the light source combination to strobe according to preset light source control parameters after receiving the image acquisition instruction from the visual module in the external trigger mode, and send an image acquisition signal to the area array camera;
[0084] The area array camera is also used to collect the image of the workpiece to be measured according to the stored camera control parameters and the image collection signal in the external trigger mode.
[0085] Optionally, the light source control parameter includes a light source combination number;
[0086] The motion control card is further used to determine the target light source combination number according to the point coordinates of the shooting point corresponding to the shooting trigger condition when the shooting trigger condition is met, and send a visual module image acquisition instruction carrying the target light source combination number to the light source controller;
[0087] Correspondingly, the light source controller is also used to, in the external trigger mode, after receiving the visual module image acquisition instruction, parse the target light source combination number from the visual module image acquisition instruction, and obtain the light source control parameters corresponding to the target light source combination number from the preset light source control parameters, and strobe the light source combination according to the light source control parameters corresponding to the target light source combination number.
[0088] Optionally, the software system is further used to obtain preset light source control parameters from the light source controller in response to a correction instruction of the light source control parameters, and display the preset light source control parameters;
[0089] The software system is further used to respond to a correction operation on any light source control parameter, correct the any light source control parameter based on user input data, and send the corrected light source control parameter to the light source controller;
[0090] The light source controller is further used to update the preset light source control parameters according to the received corrected light source control parameters.
[0091] Optionally, the motion planning instruction carries a target running speed curve;
[0092] Each of the servo drivers is also used to determine each single-axis motion sub-path and the target operating speed curve in the single-axis motion path of the corresponding servo motor according to each motion planning instruction, and map each single-axis motion sub-path with the corresponding target operating speed curve, and generate a position curve instruction according to the mapping processing result.
[0093] Optionally, the software system is further used to, in response to a start instruction of a motion photography control task, adjust the operation mode to a working mode, and before the preset motion path of the multi-axis system is written into the continuous buffer of the industrial computer, in response to a creation instruction of the motion photography control task, adjust the operation mode to a teaching mode, and change the trigger mode of the area array camera and the trigger mode of the light source controller to an internal trigger mode, and send the camera control parameters to the area array camera;
[0094] The area array camera is further used to receive the camera control parameters and continuously acquire images according to the camera control parameters in an internal trigger mode;
[0095] The light source controller is also used to strobe according to preset light source control parameters in the internal trigger mode;
[0096] The software system is also used to adjust the positional relationship between the vision module and the workpiece sample through the multi-axis system according to the mobile operation instruction, determine the teaching shooting point, and record the point coordinates corresponding to each servo motor at each teaching shooting point, as well as the teaching motion path between two adjacent teaching shooting points, and obtain the preset motion path according to the recording results, wherein the image of the workpiece sample collected by the vision module at each teaching shooting point meets the preset clarity requirement.
[0097] It should be noted that for other corresponding descriptions of the functional units involved in the control system for multi-axis system image acquisition provided in the embodiment of the present application, reference can be made to Figure 1 The corresponding description in the method will not be repeated here.
[0098] Further, as Figure 1 In a specific implementation of the method, an embodiment of the present application provides another control system for multi-axis system image acquisition, which is applied to a multi-axis system. The multi-axis system includes a motion module and a vision module, and the motion module may include multiple servo motors. The control system includes a main control module and a servo driver for controlling each servo motor.
[0099] The main control module includes an industrial computer, a motion control card, a motion control card junction box, and a software system. The industrial computer is used to deploy the software system and install the motion control card. In addition, it can communicate with the programmable light source controller and obtain and process the images collected by the area array camera. The motion control card is used to obtain the encoder position feedback of the encoder set on each servo motor in the motion module, send motion planning instructions and visual module image acquisition instructions; the motion control card junction box is used for wiring connections between the motion control card and the visual module and the motion module; the software system is used for human-computer interaction, and creates a motion photography control task for the multi-axis system by teaching the shooting points of the multi-axis system. In addition, the parameters of the visual module can be set.
[0100] Assuming that the multi-axis system is a 5-axis system, the servo driver may include servo driver 1, servo driver 2, servo driver 3, servo driver 4, and servo driver 5, and the motion module may include servo motor X-axis, servo motor Y-axis, servo motor Z-axis, servo motor C-axis, and servo motor A-axis. Servo driver 1 is used to drive the servo motor X-axis to perform linear motion of the X-axis (first coordinate axis direction) and send the first encoder position information to the motion control card; servo driver 2 is used to drive the servo motor Y-axis to perform linear motion of the Y-axis (second coordinate axis direction) and send the second encoder position information to the motion control card; servo driver 3 is used to drive the servo motor Z-axis to perform linear motion of the Z-axis (third coordinate axis direction); servo driver 4 is used to drive the servo motor C-axis to perform rotation around the X-axis (first coordinate axis direction); servo driver 5 is used to drive the servo motor A-axis to perform rotation around the Z-axis (third coordinate axis direction). The X-axis of the servo motor is used to receive the pulse command issued by the servo driver 1 to make a linear motion along the X direction and to feed back the first encoder position information to the servo driver 1 in real time; the Y-axis of the servo motor is used to receive the pulse command issued by the servo driver 2 to make a linear motion along the Y direction and to feed back the second encoder position information to the servo driver 2 in real time; the Z-axis of the servo motor is used to receive the pulse command issued by the servo driver 3 to make a linear motion along the Z direction and to feed back the third encoder position information to the servo driver 3 in real time; the C-axis of the servo motor is used to receive the pulse command issued by the servo driver 4 to make a rotational motion around the X direction and to feed back the fourth encoder position information to the servo driver 4 in real time; the A-axis of the servo motor is used to receive the pulse command issued by the servo driver 5 to make a rotational motion around the Z direction and to feed back the fifth encoder position information to the servo driver 5 in real time. The X-axis and Z-axis of the servo motor drive the visual module to move in the X-direction and the Z-direction; the Y-axis, C-axis and A-axis of the servo motor drive the workpiece to be measured to move in the Y direction, rotate around the X-axis direction and rotate around the Z-axis direction.
[0101] The visual module includes a programmable light source controller, an array camera, and a light source combination. The programmable light source controller is used to set and store the light source control parameters of the light source combination, receive the light source control parameters sent by the software system, drive the light source combination to strobe, and trigger the array camera to take pictures; the array camera is a global exposure array camera, which is used to receive the camera control parameters sent by the system software and the image acquisition signal sent by the programmable light source controller; the light source combination is used to strobe when the camera is exposed and imaged.
[0102] Specifically, the control process of the control system is as follows:
[0103] First, create a motion photography control task in the software system of the main control module. Figure 3As shown in the figure, the multi-axis system is a 5-axis system, the workpiece to be measured is a mobile phone, and a circle of shooting points is taught along the RT surface of the mobile phone middle frame. A total of 30 shooting points are taught and the position coordinates of the five servo motor axes of the shooting points are saved. For details of the 30 shooting points, see Figure 4 , Figure 5 The teaching motion path is that in the teaching mode of the software system, the area array camera turns on the internal trigger mode to keep capturing images, the programmable light source controller turns on the internal trigger mode and strobes according to the set light source parameters, and by issuing a mobile operation instruction, the position relationship between the visual module and the RT surface on the middle frame of the mobile phone is adjusted so that the area array camera can obtain a clear image. The teaching saves the axis coordinate parameters of the current five servo motors, that is, the position coordinates of each servo motor axis under each teaching shooting point, and the teaching motion path between two adjacent teaching shooting points. The preset motion path can be obtained according to the recording results.
[0104] According to the teaching, the 8 shooting postures on the RT surface of the mobile phone middle frame are divided into 8 motion trajectories. Photographing posture 1, photographing posture 3, photographing posture 5, and photographing posture 7 are multi-axis linear interpolation motions, and photographing posture 2, photographing posture 4, photographing posture 6, and photographing posture 8 are multi-axis circular interpolation motions.
[0105] The servo motor X-axis (in the direction of the first coordinate axis), servo motor Y-axis (in the direction of the second coordinate axis), and servo motor Z-axis (in the direction of the third coordinate axis) are interpolation axes, servo motor C-axis (rotating around the first coordinate axis) and servo motor A-axis (rotating around the third coordinate axis) are follower axes for following linear motion, and servo motor X-axis and servo motor Y-axis participate in the entire preset motion path. Servo motor X-axis and servo motor Y-axis are selected as the associated axes for high-speed two-dimensional position comparison. Set the high-speed two-dimensional position comparison source of the servo motor X-axis and servo motor Y-axis to the encoder feedback position, and the comparison mode to trigger after entering the error band. Set the error band size of the servo motor X-axis to 0.01mm and the error band size of the servo motor Y-axis to 0.01mm. Determine the high-speed output port of the two-dimensional position comparison as the motion control card junction box OUT1, and the output pulse width is 1000μs. Set the area array camera trigger mode to external trigger and the exposure time to 100μs. Set the trigger mode of the programmable light source controller to external trigger, the trigger input port of each shooting point is GPI1, the level polarity is high level rising edge trigger, the light source trigger pulse width is 1000μs, the trigger output port is GPO1, the output level is high level, and the output pulse width is 1000μs.
[0106] After that, the motion photography control task is started on the software system. The software system sends the camera control parameters to the area array camera, and writes the preset motion paths of 30 shooting points into the continuous buffer of the industrial computer through the motion control card. The motion control card generates the motion planning instructions corresponding to each servo motor axis according to the preset motion path in the continuous buffer, and sends the motion planning instructions to servo driver 1, servo driver 2, servo driver 3, servo driver 4, and servo driver 5. After receiving the motion planning instructions, the five servo drivers generate position curve instructions through the internal position trajectory generator according to each single-axis motion sub-path in the single-axis motion path and the target running speed curve, and then control the position of the corresponding servo motor. The servo motor X-axis, servo motor Y-axis, servo motor Z-axis, servo motor C-axis, and servo motor A-axis of the multi-axis system respectively feedback the encoder position signal to servo driver 1, servo driver 2, servo driver 3, servo driver 4, and servo driver 5 in real time. Servo driver 1 and servo driver 2 send encoder position information to the motion control card through the motion control card junction box. When the motion control card determines that the position coordinates of the servo motor X-axis and the servo motor Y-axis simultaneously reach the error range of the teaching shooting point, the motion control card outputs a 1000μs visual module image acquisition instruction to the programmable light source controller through the OUT1 high-speed IO output port of the motion control card junction box. After the GPI1 input port of the programmable light source controller receives the rising edge of the visual module image acquisition instruction issued by the motion control card, it controls the light source combination strobe according to the internally set light source control parameters, and controls GPO1 to output a 1000μs image acquisition signal to the array camera to start the array camera frame trigger. After receiving the image acquisition signal from the programmable light source controller, the array camera exposes the image. After that, the software system performs image callback and processing.
[0107] The multi-axis system performs continuous interpolation motion according to the preset motion path until the 30 taught shooting points are photographed and the motion ends.
[0108] The embodiment of the present application realizes efficient image acquisition of the surface of complex workpieces by using the area array flying camera technology through multi-axis linkage between the vision module and the workpiece to be measured, and uses the encoder position feedback of two interpolation axes, namely the servo motor X-axis and the servo motor Y-axis, as the position comparison source to perform high-speed two-dimensional position comparison with the taught shooting points. When the position coordinates of the servo motor X-axis and the servo motor Y-axis simultaneously reach the error band range with the taught shooting points, the motion control card controls the photo taking through the high-speed output of the motion control card junction box OUT1, thereby finally realizing high-precision image acquisition of the multi-axis system during continuous motion.
[0109] The present application also provides a computer device, which may be a personal computer, a server, a network device, etc. Figure 6As shown, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.
[0110] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0111] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0112] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0113] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0114] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0115] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0116] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A control method for multi-axis system image acquisition, characterized in that: Applied to a multi-axis system, the multi-axis system includes a vision module and a plurality of servo motors; the method includes: In the process of the multi-axis system performing the motion photography control task, the first encoder position information corresponding to the first servo motor among the multiple servo motors and the second encoder position information corresponding to the second servo motor among the multiple servo motors are obtained in real time, wherein the first servo motor is used to drive the visual module to perform linear motion in the direction of the first coordinate axis, and the second servo motor is used to drive the workpiece to be measured to perform linear motion in the direction of the second coordinate axis; Based on the first encoder position information and the second encoder position information, determine whether the current positions corresponding to the first servo motor and the second servo motor respectively meet the shooting trigger conditions of the vision module, and when the shooting trigger conditions are met, control the vision module to capture the image of the workpiece to be measured.
2. The method according to claim 1, characterized in that: Before the multi-axis system performs the motion photography control task, the method further includes: In response to a start instruction of a motion photography control task, a single-axis motion path corresponding to each servo motor in the multi-axis system is generated according to a preset motion path of the multi-axis system, and a motion planning instruction is generated according to each single-axis motion path, wherein the single-axis motion path includes a single-axis motion sub-path between every two adjacent shooting points in the motion photography control task; According to each motion planning instruction, each single-axis motion sub-path in the single-axis motion path of the corresponding servo motor is determined, and according to each single-axis motion sub-path, a position curve instruction is generated, and the corresponding servo motor movement is controlled by the position curve instruction.
3. The method according to claim 2, characterized in that The plurality of servo motors further include a third servo motor, a fourth servo motor and a fifth servo motor, wherein the third servo motor is used to drive the visual module to perform linear motion in the direction of a third coordinate axis, the fourth servo motor is used to drive the workpiece to be measured to rotate around the first coordinate axis, and the fifth servo motor is used to drive the workpiece to be measured to rotate around the third coordinate axis; Generating a position curve instruction corresponding to the fourth servo motor includes: For each single-axis motion sub-path in the single-axis motion path corresponding to the fourth servo motor, determine whether the single-axis motion sub-path is a circular interpolation type path, and when the result is yes, generate a position curve instruction for the fourth servo motor under the single-axis motion sub-path; otherwise, do not generate a position curve instruction under the single-axis motion sub-path; Generating a position curve instruction corresponding to the fifth servo motor includes: For each single-axis motion sub-path in the single-axis motion path corresponding to the fifth servo motor, determine whether the single-axis motion sub-path is a circular arc interpolation type path. When the result is yes, generate a position curve instruction for the fifth servo motor under the single-axis motion sub-path; otherwise, do not generate a position curve instruction under the single-axis motion sub-path.
4. The method according to claim 2, characterized in that: The method of responding to the start instruction of the motion photography control task and generating a single-axis motion path corresponding to each servo motor in the multi-axis system according to a preset motion path of the multi-axis system includes: In response to the start instruction of the motion photography control task, the operation mode is adjusted to the working mode, the preset motion path of the multi-axis system is written into the continuous buffer of the industrial computer, and according to the preset motion path of the multi-axis system, the single-axis motion path corresponding to each servo motor in the multi-axis system is generated.
5. The method according to claim 4, characterized in that The preset motion path of the multi-axis system includes the point coordinates corresponding to each shooting point; based on the first encoder position information and the second encoder position information, judging whether the current positions corresponding to the first servo motor and the second servo motor respectively meet the shooting trigger condition of the visual module, including: Compare the first encoder position corresponding to the first encoder position information with each point coordinate, and determine the point coordinates among the point coordinates whose position error with the first encoder position is less than a first error threshold as the target point coordinates; If the position error between the second encoder position corresponding to the second encoder position information and the target point coordinates is less than a second error threshold, it is determined that the current positions corresponding to the first servo motor and the second servo motor respectively meet the shooting trigger conditions of the visual module.
6. The method according to claim 4 or 5, characterized in that: The visual module includes a light source combination, a light source controller and an array camera; the method also includes: In response to a start instruction of a motion photography control task, changing the trigger mode of the area array camera and the trigger mode of the light source controller to an external trigger mode; When the shooting trigger condition is met, controlling the visual module to collect the image of the workpiece to be measured includes: When the shooting trigger condition is met, a visual module image acquisition instruction is sent to the light source controller, so that after receiving the visual module image acquisition instruction in the external trigger mode, the light source controller controls the light source combination to strobe according to the preset light source control parameters, and sends an image acquisition signal to the area array camera, and the area array camera acquires the image of the workpiece to be measured according to the stored camera control parameters and the image acquisition signal in the external trigger mode.
7. The method according to claim 6, characterized in that The light source control parameter includes a light source combination number; when the shooting trigger condition is met, sending a visual module image acquisition instruction to the light source controller includes: When the shooting trigger condition is met, the target light source combination number is determined according to the point coordinates of the shooting point corresponding to the shooting trigger condition, and a visual module image acquisition instruction carrying the target light source combination number is sent to the light source controller; Accordingly, in the external trigger mode, after receiving the image acquisition instruction of the visual module, the light source controller controls the light source combination to strobe according to the preset light source control parameters, including: In the external trigger mode, after receiving the visual module image acquisition instruction, the light source controller parses the target light source combination number from the visual module image acquisition instruction, and obtains the light source control parameters corresponding to the target light source combination number from the preset light source control parameters, and the light source combination strobes according to the light source control parameters corresponding to the target light source combination number.
8. A control system for multi-axis system image acquisition, characterized in that: Applied to a multi-axis system, the multi-axis system includes a vision module and multiple servo motors; the control system includes multiple servo drivers and a main control module, each servo driver corresponds to a servo motor: A first servo driver is used to obtain, in real time, first encoder position information corresponding to a first servo motor among the plurality of servo motors during the process of the multi-axis system performing a motion photography control task, and send the first encoder position information to a main control module, wherein the first servo motor is used to drive the vision module to perform a linear motion in the direction of a first coordinate axis; A second servo driver is used to obtain the second encoder position information corresponding to the second servo motor among the multiple servo motors in real time during the process of the multi-axis system performing the motion photography control task, and send the second encoder position information to the main control module, wherein the second servo motor is used to drive the workpiece to be measured to perform linear motion in the direction of the second coordinate axis; The main control module is also used to determine whether the current positions corresponding to the first servo motor and the second servo motor meet the shooting trigger conditions of the vision module based on the first encoder position information and the second encoder position information, and when the shooting trigger conditions are met, control the vision module to capture the image of the workpiece to be measured.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
High-precision flyer printing machine and flyer printing method
CN121218467A
Controller power-on test equipment, test method and manufacturing system
CN121857659A