A visual zero return method based on Beckhoff PLC fusion Halcon algorithm

CN114326830BActive Publication Date: 2024-10-08INTELLIGENT AUTOMATION ZHUHAI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111598006.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2024-10-08
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

[0005]缺点:回零精度不高,经过大量测试,采用槽型光电回零在同样的回零速度下,重复回零精度只能在20um-50um左右

Benefits of technology

[0021] The beneficial effects of the present invention are: because the present invention adopts the method of integrating PLC zero return and visual positioning, multiple visual zero returns can be performed according to the zero return accuracy threshold, thereby improving the zero return accuracy. On the basis of the original PLC zero return Add the logical process of visual positioning and moving to the positioning position and then setting the axis position. The zero return accuracy is adjustable. The zero return accuracy range can be dynamically adjusted according to the zero return accuracy threshold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114326830B_ABST
    Figure CN114326830B_ABST
Patent Text Reader

Abstract

The present invention discloses and provides a visual zeroing method based on Beckhoff PLC fused with Halcon algorithm, which can achieve high-precision zeroing effect, and the repeated zeroing accuracy is within 1um. The present invention adopts a method of integrating PLC zeroing and visual positioning, and can perform multiple visual zeroing according to the zeroing accuracy threshold to improve the zeroing accuracy. On the basis of the original PLC zeroing, the logic flow of visual positioning and moving to the positioning position and then setting the axis position is added, and the zeroing accuracy is adjustable. The zeroing accuracy range can be dynamically adjusted according to the zeroing accuracy threshold. The present invention is applied to the technical field of visual zeroing method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a zero return method, in particular to a vision zero return method based on Beckhoff PLC fusion Halcon algorithm. Background Art

[0002] Zero return is a necessary step for servo motors, linear motors, stepper motors, and voice coil motors before establishing a coordinate system. Commonly used zero return methods can be divided into 37 zero return methods through positive limit, negative limit, origin, and Z pulse. Since positive limit, negative limit, and origin mostly use slot-shaped photoelectric, the differences in common zero return methods can be divided into the following types:

[0003] 1. Slot type photoelectric zero return

[0004] Advantages: The zero return method is simple and convenient, and is suitable for environments where positioning accuracy requirements are not high.

[0005] Disadvantages: The zero return accuracy is not high. After a lot of tests, the repeated zero return accuracy of the slot-type photoelectric zero return at the same zero return speed can only be around 20um-50um. If the zero return speed is different each time, the repeated zero return accuracy will also increase accordingly.

[0006] 2. Slot type photoelectric + Z pulse return to zero

[0007] Advantages: High zero return accuracy. After a large number of tests, the slot-type photoelectric plus Z pulse method is used. At the same zero return speed, the positioning accuracy is within 1um.

[0008] Disadvantages: The zero return method is relatively complicated. It requires the driver to call the zero return and limit and origin to be connected to the driver. It is also limited by the fact that the motor must have Z pulse output. At the same time, the zero return speed must be consistent to reduce the accuracy of repeated zero return.

[0009] 3. Drive probe zero return

[0010] Advantages: High zero return accuracy. The principle is to trigger the high-speed module processing through the driver's IO input to record the instantaneous encoder feedback position. Then set the NC axis position to the current position value minus the instantaneous encoder feedback position value at this time, so as to realize the probe zero return. Since the encoder feedback position value at the moment of grabbing is processed by the FGPA chip, the encoder feedback position value at this time is the closest to the actual trigger position value.

[0011] The disadvantage is that the zero return method is relatively complicated, requiring interaction with the internal parameters of the driver and PLC program processing, and the limit and origin must also be connected to the driver. At the same time, the zero return speed must be consistent to reduce the accuracy of repeated zero return.

[0012] It can be seen that PLC zero return is slot-type photoelectric zero return. Although the zero return method is simple and convenient, it only needs to connect the hardware upper limit and origin directly to the PLC IO. The PLC IO is connected by crimping, but the zero return accuracy is not high, and can only reach about 20um-50um. Z pulse and probe zero return, although the zero return accuracy is high, but the software needs to interact with the PDO and SDO of the driver, which is more complicated to implement. In terms of hardware, the limit origin needs to be connected to the driver's IO. Since the driver IO is integrated with a DB head, welding is required when wiring, resulting in a large wiring workload when there are many axes, and it is extremely inconvenient to troubleshoot. Summary of the invention

[0013] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a visual return to zero method based on Beckhoff PLC fusion Halcon algorithm. It can be used on a mechanical platform that requires visual guidance and also requires high-precision positioning accuracy. However, when it is difficult to install the Z pulse or the Z pulse control method and wiring method are both troublesome, the visual return to zero technology can solve the above problems well. The hardware wiring method is the same as the PLC return to zero wiring method. Only the visual part and the logical process such as setting the axis position need to be added. The high-precision return to zero effect can be achieved, and the repeated return to zero accuracy is within 1um.

[0014] The technical solution adopted by the present invention is: the present invention includes the equipment used therein including a linear motor, a linear motor driver, a switching power supply, a Beckhoff PLC, an industrial computer, a camera, a lens, and a camera light source; the switching power supply supplies power to the Beckhoff PLC and the camera light source, the linear motor is installed with positive limit, negative limit and origin switches, the positive limit, negative limit and origin switches all use slot-type photoelectric sensors, and the three sensor signal lines of the positive limit, negative limit and origin switches are all connected to the IO input module of the Beckhoff PLC, the linear motor is connected to the linear motor driver, the linear motor driver is connected to the Beckhoff PLC, the lens is adapted to the camera, and the camera and the Beckhoff PLC are both connected to the industrial computer, characterized in that: the visual zero return method based on the Beckhoff PLC fusion Halcon algorithm comprises the following steps:

[0015] a. PLC zero return: The linear motor is PLC zeroed through the MC_Home function block inside the Beckhoff PLC. The PLC zero return process is as follows: the axis moves in the negative limit direction. If it encounters the rising edge of the origin switch on the way, it decelerates and stops, then moves to the positive limit direction, and the speed is switched to the creeping speed. If it encounters the falling edge of the origin switch, the current position is immediately cleared and the machine decelerates and stops.

[0016] b. Manual Mark point calibration: After the PLC returns to zero, the linear motor is used to move the camera lens to the mark point of the machine; manually turn on the camera light source and capture the picture. After confirming that the center of the Mark point is within the camera field of view, this shooting position is recorded as B, and the Mark point is photographed by the camera. The Mark circle is model matched using the halcon algorithm to obtain a rough positioning coordinate, and then the precise coordinates of the Mark circle center are measured by fitting the circle with a caliper, so as to calculate the difference between the distance from the center of the camera to the center of the Mark point and record it as C. The difference C plus the shooting position B is recorded as A, that is: A=B+C, A is the position from the center of the Mark point to the origin of the axis;

[0017] c. Automatic zero return, including the following steps: 1. Click the initialization button after the device is powered on → 2. Perform PLC zero return → 3. Move to the Mark point to take a photo and record the photo position B → 4. PLC controls the camera light source to turn on and sends a visual zero return command to the visual module → 5. The visual module captures the image and calculates the distance C1 from the center of the Mark point to the center of the camera → 6. The visual module feeds back the distance from the center of the Mark point to the center of the camera plus the photo position to the Beckhoff PLC → 7. Beckhoff PLC obtains the visual feedback value A1=C1+B1 and turns off the camera light source → 8. Beckhoff PLC performs parameter check to prevent visual abnormality parameter return → 9. Beckhoff PLC controls the axis to move to the visual feedback Position A1→10.PLC sets the current position of the axis to the Mark point calibration value A→11.Beckhoff PLC controls the camera light source to turn on and sends the vision return to zero command to the vision module again→12.The vision module captures the image and calculates the distance C2 from the center of the Mark point to the center of the camera→13.The vision module feeds back the distance from the center of the Mark point to the center of the camera plus the photo position C2+B to the Beckhoff PLC→14.Beckhoff PLC obtains the vision module feedback value A2 and turns off the camera light source→15.Beckhoff PLC compares the parameters, C2=A2-B. If C2 is less than the set return to zero accuracy threshold, the return to zero is completed. If C2 is greater than the return to zero accuracy threshold, repeat steps 3-15.

[0018] Furthermore, in step b, the Mark point is selected to be a relatively stationary point relative to the linear motor base.

[0019] Furthermore, the parameter C1 calculated in step 8 in step c needs to be within the range of ±5 mm.

[0020] Furthermore, in step 15 in step c, the return-to-zero accuracy threshold is set to ±1 um.

[0021] The beneficial effects of the present invention are as follows: since the present invention adopts a method that integrates PLC zero return and visual positioning, multiple visual zero returns can be performed according to the zero return accuracy threshold to improve the zero return accuracy. On the basis of the original PLC zero return, the logical process of visual positioning and moving to the positioning position and then setting the axis position is added. The zero return accuracy is adjustable, and the zero return accuracy range can be dynamically adjusted according to the zero return accuracy threshold. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a schematic diagram of the PLC return to zero process;

[0023] Figure 2 It is a schematic diagram of the calibration points;

[0024] Figure 3 It is the overall return to zero flow chart of the present invention;

[0025] Terminology explanation:

[0026] PLC: Programmable Logic Controller (PLC);

[0027] Beckhoff: Beckhoff, namely Beckhoff Automation Co., Ltd. of Germany, is mainly engaged in industrial automation production and PLC manufacturer;

[0028] Zero return: Zero return is to let the machine know where the reference point of the machine is;

[0029] Z pulse: The popular explanation is: one Z pulse is generated every time the shaft rotates;

[0030] Mark point: It is a fixed position selected during calibration. DETAILED DESCRIPTION

[0031] like Figures 1 to 3 As shown, in this embodiment, the equipment used in the present invention includes a linear / servo motor, a linear motor / servo driver, a 24V switching power supply, a Beckhoff PLC, an industrial computer, a camera, a lens, and a camera light source;

[0032] The 24V switching power supply supplies power to the Beckhoff PLC and camera light source; the linear motor is equipped with positive limit, negative limit and origin switches (all three sensors use slot-type photoelectric sensors), and the signal lines of the three sensors are connected to the IO input module of the Beckhoff PLC.

[0033] Visual zero return process:

[0034] PLC zero return: The linear motor is PLC zeroed through the MC_Home function block inside the Beckhoff PLC. The PLC zero return process: the axis moves in the negative limit direction. If it encounters the rising edge of the zero switch on the way, it will decelerate and stop, then move to the positive limit direction, and the speed will be switched to the creeping speed. If it encounters the falling edge of the zero switch, the current position will be cleared immediately and the motor will decelerate and stop. Figure 1 shown.

[0035] Manual Mark point calibration: After the PLC returns to zero, the linear motor is used to move the camera lens to the mark point of the machine (the mark point must be a relatively stationary point relative to the linear motor base). Manually turn on the camera light source in the visual operation interface and click on the capture button. After confirming that the center of the mark point is within the camera's field of view, record this photo position as B, shoot the mark point with the camera, and use the halcon algorithm to perform model matching on the mark circle to obtain a rough positioning coordinate. Then, the precise coordinates of the center of the mark circle are measured by fitting the circle with a caliper, and the difference between the distance from the center of the camera to the center of the mark point is calculated and recorded as C. Add the result of the photo position B and record it as A (a relatively accurate position from the center of the mark point to the origin of the axis). That is: A=B+C; if Figure 2 shown.

[0036] Automatic zero return: Figure 3 As shown, the device is powered on, 1. Click the initialization button → 2. Perform PLC zero return → 3. Move to the Mark point to take a picture at position B → 4. PLC controls the camera light source to turn on and sends a visual zero return command to the vision → 5. Visually capture the picture and calculate the distance C1 from the center of the Mark point to the center of the camera → 6. Visually feedback the distance from the center of the Mark point to the center of the camera plus the photo position (C1+B) to the PLC → 7. PLC obtains the visual feedback value A1 and turns off the camera light source → 8. PLC performs parameter check (calculate parameter C1 within the range of ±5mm to prevent visual abnormal parameter return) → 9. PLC controls the axis to move to the visual feedback position A1 → 10. PLC Set the current position of the axis to A (Mark point calibration value) → 11. PLC controls the camera light source to turn on and sends the visual return to zero command to the vision again → 12. Visually capture the image and calculate the distance C2 from the center of the Mark point to the center of the camera → 13. Visual feedback The distance from the center of the Mark point to the center of the camera plus the photo position (C2+B) is returned to the PLC → 14. PLC obtains the visual feedback value A2 and turns off the camera light source → 15. PLC compares the parameters. If C2 (C2=A2-B) is less than the set return to zero accuracy threshold (the threshold in this case is ±1um), the return to zero is completed. If C2 (C2=A2-B) is greater than ±1um, repeat steps 3-15.

[0037] Compared with the prior art, the present invention has the following advantages:

[0038] Hardware: Simple wiring. The hardware wiring method is the same as the PLC zero return wiring method, and no additional hardware is required.

[0039] Software: clear logic and easy maintenance. The software part only needs to add the visual part and set the axis position and other logical processes, and it can also achieve high-precision zero return effect.

[0040] Effect: the return to zero accuracy is adjustable.

[0041] Although the embodiments of the present invention are described with practical solutions, they do not constitute limitations on the meaning of the present invention. For those skilled in the art, it is obvious to modify the implementation scheme and combine it with other solutions based on this description.

Claims

1. A visual zero return method based on Beckhoff PLC fusion Halcon algorithm, the equipment used includes a linear motor, a linear motor driver, a switching power supply, a Beckhoff PLC, an industrial computer, a camera, a lens, and a camera light source; the switching power supply supplies power to the Beckhoff PLC and the camera light source, the linear motor is installed with positive limit, negative limit and origin switches, the positive limit, negative limit and origin switches all use slot-type photoelectric sensors, and the three sensor signal lines of the positive limit, negative limit and origin switches are all connected to the IO input module of the Beckhoff PLC, the linear motor is connected to the linear motor driver, the linear motor driver is connected to the Beckhoff PLC, the lens is adapted to the camera, and the camera and the Beckhoff PLC are both connected to the industrial computer, Features: The visual zero return method based on Beckhoff PLC fusion Halcon algorithm comprises the following steps: a. PLC zero return: The linear motor is PLC zeroed through the MC_Home function block inside the Beckhoff PLC. The PLC zero return process is as follows: the axis moves in the negative limit direction. If it encounters the rising edge of the origin switch on the way, it decelerates and stops, then moves to the positive limit direction, and the speed is switched to the creeping speed. If it encounters the falling edge of the origin switch, the current position is immediately cleared and the machine decelerates and stops. b. Manual Mark point calibration: After the PLC returns to zero, the linear motor is used to move the camera lens to the mark point of the machine; manually turn on the camera light source and capture the picture. After confirming that the center of the Mark point is within the camera field of view, this shooting position is recorded as B, and the Mark point is photographed by the camera. The Mark circle is model matched using the halcon algorithm to obtain a rough positioning coordinate, and then the precise coordinates of the Mark circle center are measured by fitting the circle with a caliper, so as to calculate the difference between the distance from the center of the camera to the center of the Mark point and record it as C. The difference C plus the shooting position B is recorded as A, that is: A=B+C, A is the position from the center of the Mark point to the origin of the axis; c. Automatic zero return, including the following steps:

1. Click the initialization button after the device is powered on → 2. Perform PLC zero return → 3. Move to the Mark point to take a photo and record the photo position B → 4. PLC controls the camera light source to turn on and sends a visual zero return command to the visual module → 5. The visual module captures the image and calculates the distance C1 from the center of the Mark point to the center of the camera → 6. The visual module feeds back the distance from the center of the Mark point to the center of the camera plus the photo position to the Beckhoff PLC → 7. Beckhoff PLC obtains the visual feedback value A1=C1+B1 and turns off the camera light source → 8. Beckhoff PLC performs parameter check to prevent visual abnormality and parameter return → 9. Beckhoff PLC controls the axis to move to the visual feedback position A1 → 10. PLC sets the current position of the axis to the Mark point calibration value A → 11. Beckhoff PLC controls the camera light source to turn on and sends a visual return to zero command to the visual module again → 12. The visual module captures the image and calculates the distance C2 from the center of the Mark point to the center of the camera → 13. The visual module feedbacks the distance from the center of the Mark point to the center of the camera plus the photo position C2+B and returns it to the Beckhoff PLC → 14. Beckhoff PLC obtains the visual module feedback value A2 and turns off the camera light source → 15. Beckhoff PLC performs parameter comparison, C2=A2-B. If C2 is less than the set zero return accuracy threshold, zero return is completed. If C2 is greater than the zero return accuracy threshold, steps 3-15 are repeated.

2. According to claim 1, a visual zero return method based on Beckhoff PLC fusion Halcon algorithm, Features: In step b, the Mark point is selected to be a relatively stationary point relative to the linear motor base.

3. According to claim 1, a visual zero return method based on Beckhoff PLC fusion Halcon algorithm, Features: The parameter C1 calculated in step 8 of step c needs to be within the range of ±5 mm.

4. According to claim 1, a visual zero return method based on Beckhoff PLC fusion Halcon algorithm, Features: In step 15 of step c, the return-to-zero accuracy threshold is set to ±1 um.