Disclosure of Invention
The invention aims to solve the technical problem of providing an automatic inserting method and system based on visual guidance, which can improve the accuracy, efficiency and quality of inserting a BMU board and a Flex soft board.
In a first aspect, the present invention provides an automatic interpolation method based on visual guidance, comprising the steps of:
step S10, a first offset threshold, a second offset threshold, a third offset threshold and a width range are set;
s20, performing visual calibration on the BMU plate to obtain a first reference coordinate, and performing visual calibration on the Flex soft plate to obtain a second reference coordinate;
step S30, placing the BMU plate and the Flex soft plate on the jig, and enabling the PLC to rotate the BMU plate and the Flex soft plate on the jig to a preset angle through the turntable;
step S40, the PLC acquires BMU coordinates of the BMU board through the upper camera, and acquires Flex coordinates of the Flex flexible board through the lower camera after the Flex flexible board is sucked to a photographing position of the lower camera through the manipulator;
step S50, after the PLC checks the BMU coordinates and the Flex coordinates by using the first offset threshold, the second offset threshold, the third offset threshold, the first reference coordinates and the second reference coordinates, the control manipulator automatically inserts the Flex soft board into the BMU board;
and S60, the PLC acquires the actual width of the BMU board and the Flex soft board after the insertion through the upper camera, and checks the actual width by utilizing the width range to finish the automatic insertion of the BMU board and the Flex soft board.
Further, the step S20 specifically includes:
placing the BMU plate on a jig and rotating the BMU plate to a preset angle, and shooting a first calibration image of the BMU plate from top to bottom by a PLC through an upper camera, and acquiring a first reference coordinate from the first calibration image through a mapping relation between the BMU plate and the upper camera;
and placing the Flex soft board on the jig and rotating the Flex soft board to a preset angle, and after the PLC absorbs the Flex soft board to a photographing position of the lower camera through the manipulator, photographing a second calibration image of the Flex soft board by the PLC from the lower camera to the lower camera, and acquiring a second reference coordinate from the second calibration image through the mapping relation between the Flex soft board and the lower camera.
Further, the step S40 specifically includes:
the PLC shoots BMU images of the BMU plate from top to bottom through the upper camera, and acquires BMU coordinates from the BMU images through the mapping relation between the BMU plate and the upper camera;
after the PLC absorbs the Flex soft board to the photographing position of the lower camera through the manipulator, the PLC photographs the Flex image of the Flex soft board from the lower camera to the upper camera, and obtains Flex coordinates from the Flex image through the mapping relation between the Flex soft board and the lower camera.
Further, the step S50 specifically includes:
step S51, the PLC judges whether the first absolute difference between the first reference coordinate and the BMU coordinate is larger than a first offset threshold value or whether the second absolute difference between the second reference coordinate and the Flex coordinate is larger than a second offset threshold value, if so, the deviation of the BMU board or the Flex soft board is excessive, the Flex soft board with excessive deviation is placed into a defective box through a manipulator, and the flow is ended; if not, go to step S52;
step S52, the PLC judges whether the sum of the first absolute difference and the second absolute difference is larger than a third offset threshold, if so, the comprehensive offset is excessively large, and the process is ended; if not, the verification is passed, and the PLC controls the manipulator to automatically insert the Flex soft board into the BMU board at the speed of 1 mm/s.
Further, the step S60 specifically includes:
the PLC shoots an opposite-inserting image of the BMU board and the Flex soft board from top to bottom through an upper camera, calculates the actual width of the BMU board and the Flex soft board after opposite-inserting through the opposite-inserting image conversion, judges whether the actual width is in a width range, and if so, completes automatic opposite-inserting of the BMU board and the Flex soft board; if not, the Flex soft board is placed into the defective box by the manipulator and the process is ended.
In a second aspect, the present invention provides an automatic docking system based on visual guidance, comprising the following modules:
the parameter setting module is used for setting a first offset threshold value, a second offset threshold value, a third offset threshold value and a width range;
the visual calibration module is used for performing visual calibration on the BMU plate to obtain a first reference coordinate, and performing visual calibration on the Flex soft plate to obtain a second reference coordinate;
the position adjusting module is used for placing the BMU plate and the Flex soft plate on the jig, and the PLC rotates the BMU plate and the Flex soft plate on the jig to a preset angle through the turntable;
the actual coordinate acquisition module is used for acquiring BMU coordinates of the BMU board through the upper camera by the PLC, and acquiring Flex coordinates of the Flex soft board through the lower camera after the Flex soft board is sucked to a photographing position of the lower camera through the manipulator;
the offset verification module is used for controlling the manipulator to automatically insert the Flex soft board into the BMU board after the BMU coordinate and the Flex coordinate are verified by the PLC through the first offset threshold, the second offset threshold, the third offset threshold, the first reference coordinate and the second reference coordinate;
and the opposite-inserting actual width verification module is used for acquiring the actual width of the BMU board and the Flex soft board after opposite-inserting by the PLC through the upper camera, and verifying the actual width by utilizing the width range to finish automatic opposite-inserting of the BMU board and the Flex soft board.
Further, the vision calibration module specifically comprises:
placing the BMU plate on a jig and rotating the BMU plate to a preset angle, and shooting a first calibration image of the BMU plate from top to bottom by a PLC through an upper camera, and acquiring a first reference coordinate from the first calibration image through a mapping relation between the BMU plate and the upper camera;
and placing the Flex soft board on the jig and rotating the Flex soft board to a preset angle, and after the PLC absorbs the Flex soft board to a photographing position of the lower camera through the manipulator, photographing a second calibration image of the Flex soft board by the PLC from the lower camera to the lower camera, and acquiring a second reference coordinate from the second calibration image through the mapping relation between the Flex soft board and the lower camera.
Further, the actual coordinate acquisition module specifically includes:
the PLC shoots BMU images of the BMU plate from top to bottom through the upper camera, and acquires BMU coordinates from the BMU images through the mapping relation between the BMU plate and the upper camera;
after the PLC absorbs the Flex soft board to the photographing position of the lower camera through the manipulator, the PLC photographs the Flex image of the Flex soft board from the lower camera to the upper camera, and obtains Flex coordinates from the Flex image through the mapping relation between the Flex soft board and the lower camera.
Further, the offset verification module specifically includes:
the BMU board and Flex soft board offset checking unit is used for judging whether the first absolute difference between the first reference coordinate and the BMU coordinate is larger than a first offset threshold value or not or whether the second absolute difference between the second reference coordinate and the Flex coordinate is larger than a second offset threshold value or not by the PLC, if yes, indicating that the offset of the BMU board or the Flex soft board is too large, placing the Flex soft board with the too large offset into a defective box by the manipulator, and ending the flow; if not, entering a comprehensive offset checking unit;
the comprehensive offset checking unit is used for judging whether the sum of the first absolute difference and the second absolute difference is larger than a third offset threshold value or not by the PLC, if so, indicating that the comprehensive offset is too large, and ending the flow; if not, the verification is passed, and the PLC controls the manipulator to automatically insert the Flex soft board into the BMU board at the speed of 1 mm/s.
Further, the checking module for the inserting actual width specifically comprises:
the PLC shoots an opposite-inserting image of the BMU board and the Flex soft board from top to bottom through an upper camera, calculates the actual width of the BMU board and the Flex soft board after opposite-inserting through the opposite-inserting image conversion, judges whether the actual width is in a width range, and if so, completes automatic opposite-inserting of the BMU board and the Flex soft board; if not, the Flex soft board is placed into the defective box by the manipulator and the process is ended.
The invention has the advantages that:
the Flex soft board is automatically inserted into the BMU board through the manipulator, so that the risk of extrusion damage to the jack of the BMU board can be greatly reduced compared with the traditional manual opposite insertion, tweezers are not needed to be used for clamping, indentation crush damage on the surface of the BMU board is avoided, and opposite insertion time is shortened; the offset of the placement positions of the BMU board and the Flex soft board is checked through the set first offset threshold, second offset threshold, third offset threshold and width range, the total offset of the BMU board and the Flex soft board is checked, the actual width of the BMU board and the Flex soft board after the insertion is completed is checked, the insertion failure caused by overlarge offset is avoided, the situation that the insertion is not in place or the insertion is over-head is found in time, and finally the accuracy, efficiency and quality of the insertion of the BMU board and the Flex soft board are greatly improved.
Detailed Description
According to the technical scheme in the embodiment of the application, the overall thought is as follows: the risk of damage to the BMU board is reduced and the inserting time is shortened by automatic inserting of the mechanical arm; and verifying the offset and the total offset of the BMU board and the Flex soft board and the actual width of the BMU board and the Flex soft board after the insertion is completed through the set first offset threshold, second offset threshold, third offset threshold and width range, avoiding the insertion failure caused by overlarge offset, and timely finding out the situation that the insertion is not in place or the insertion head is in place so as to improve the accuracy, efficiency and quality of the insertion of the BMU board and the Flex soft board.
Referring to fig. 1 to 3, a preferred embodiment of an automatic interpolation method based on visual guidance according to the present invention includes the following steps:
step S10, a first offset threshold, a second offset threshold, a third offset threshold and a width range are set; the first offset threshold is used for checking the offset of the BMU board, the second offset threshold is used for checking the offset of the Flex soft board, the third offset threshold is used for checking the total offset of the BMU board and the Flex soft board, and the width range is used for checking the actual width of the BMU board and the Flex soft board after insertion;
s20, performing visual calibration on the BMU plate to obtain a first reference coordinate, and performing visual calibration on the Flex soft plate to obtain a second reference coordinate;
step S30, placing the BMU plate and the Flex soft plate on a jig, and rotating the BMU plate and the Flex soft plate on the jig to a preset angle through a turntable by a PLC (programmable logic controller); namely, the jig is rotated through the turntable, so that the BMU plate and the Flex soft plate on the jig are linked to rotate;
step S40, the PLC acquires BMU coordinates of the BMU board through the upper camera, and acquires Flex coordinates of the Flex flexible board through the lower camera after the Flex flexible board is sucked to a photographing position of the lower camera through the manipulator; the PLC controls the work of the upper camera and the lower camera through an EIP protocol so as to ensure the stability of communication;
step S50, after the PLC checks the BMU coordinates and the Flex coordinates by using the first offset threshold, the second offset threshold, the third offset threshold, the first reference coordinates and the second reference coordinates, the control manipulator automatically inserts the Flex soft board into the BMU board;
and S60, the PLC acquires the actual width of the BMU board and the Flex soft board after the insertion through the upper camera, and checks the actual width by utilizing the width range to finish the automatic insertion of the BMU board and the Flex soft board. Namely, the BMU board and the Flex soft board are correspondingly checked before and after the insertion so as to ensure the insertion quality.
The step S20 specifically includes:
placing the BMU plate on a jig and rotating the BMU plate to a preset angle, and shooting a first calibration image of the BMU plate from top to bottom by a PLC through an upper camera, and acquiring a first reference coordinate from the first calibration image through a mapping relation between the BMU plate and the upper camera;
and placing the Flex soft board on the jig and rotating the Flex soft board to a preset angle, and after the PLC absorbs the Flex soft board to a photographing position of the lower camera through the manipulator, photographing a second calibration image of the Flex soft board by the PLC from the lower camera to the lower camera, and acquiring a second reference coordinate from the second calibration image through the mapping relation between the Flex soft board and the lower camera.
The step S40 specifically includes:
the PLC shoots BMU images of the BMU plate from top to bottom through the upper camera, and acquires BMU coordinates from the BMU images through the mapping relation between the BMU plate and the upper camera;
after the PLC absorbs the Flex soft board to the photographing position of the lower camera through the manipulator, the PLC photographs the Flex image of the Flex soft board from the lower camera to the upper camera, and obtains Flex coordinates from the Flex image through the mapping relation between the Flex soft board and the lower camera.
The step S50 specifically includes:
step S51, the PLC judges whether the first absolute difference between the first reference coordinate and the BMU coordinate is larger than a first offset threshold value or whether the second absolute difference between the second reference coordinate and the Flex coordinate is larger than a second offset threshold value, if so, the deviation of the BMU board or the Flex soft board is excessive, the Flex soft board with excessive deviation is placed into a defective box through a manipulator, and the flow is ended; if not, go to step S52;
for example, if the first reference coordinates are (X, Y, R) and the BMU coordinates are (X1, Y1, R1), then the first absolute difference is (|x-X1|, |y-Y1|, |r-R1|), and it is sequentially determined whether |x-X1|, |y-Y1|, and |r-R1| are greater than the first offset threshold; wherein X represents an abscissa, Y represents an ordinate, and R represents an angle;
step S52, the PLC judges whether the sum of the first absolute difference and the second absolute difference is larger than a third offset threshold, if so, the comprehensive offset is excessively large, and the process is ended; if not, the verification is passed, and the PLC controls the manipulator to automatically insert the Flex soft board into the BMU board at the speed of 1 mm/s. The transplanting is slowly performed at the speed of 1mm/s, so that the transplanting quality can be ensured, and the damage caused by the too high transplanting speed is avoided.
The step S60 specifically includes:
the PLC shoots an opposite-inserting image of the BMU board and the Flex soft board from top to bottom through an upper camera, calculates the actual width of the BMU board and the Flex soft board after opposite-inserting through the opposite-inserting image conversion, judges whether the actual width is in a width range, and if so, completes automatic opposite-inserting of the BMU board and the Flex soft board; if not, the Flex soft board is placed into the defective box by the manipulator and the process is ended.
The invention discloses a preferred embodiment of an automatic opposite-plug system based on visual guidance, which comprises the following modules:
the parameter setting module is used for setting a first offset threshold value, a second offset threshold value, a third offset threshold value and a width range; the first offset threshold is used for checking the offset of the BMU board, the second offset threshold is used for checking the offset of the Flex soft board, the third offset threshold is used for checking the total offset of the BMU board and the Flex soft board, and the width range is used for checking the actual width of the BMU board and the Flex soft board after insertion;
the visual calibration module is used for performing visual calibration on the BMU plate to obtain a first reference coordinate, and performing visual calibration on the Flex soft plate to obtain a second reference coordinate;
the position adjusting module is used for placing the BMU plate and the Flex soft plate on the jig, and the PLC (programmable logic controller) rotates the BMU plate and the Flex soft plate on the jig to a preset angle through the turntable; namely, the jig is rotated through the turntable, so that the BMU plate and the Flex soft plate on the jig are linked to rotate;
the actual coordinate acquisition module is used for acquiring BMU coordinates of the BMU board through the upper camera by the PLC, and acquiring Flex coordinates of the Flex soft board through the lower camera after the Flex soft board is sucked to a photographing position of the lower camera through the manipulator; the PLC controls the work of the upper camera and the lower camera through an EIP protocol so as to ensure the stability of communication;
the offset verification module is used for controlling the manipulator to automatically insert the Flex soft board into the BMU board after the BMU coordinate and the Flex coordinate are verified by the PLC through the first offset threshold, the second offset threshold, the third offset threshold, the first reference coordinate and the second reference coordinate;
and the opposite-inserting actual width verification module is used for acquiring the actual width of the BMU board and the Flex soft board after opposite-inserting by the PLC through the upper camera, and verifying the actual width by utilizing the width range to finish automatic opposite-inserting of the BMU board and the Flex soft board. Namely, the BMU board and the Flex soft board are correspondingly checked before and after the insertion so as to ensure the insertion quality.
The vision calibration module specifically comprises:
placing the BMU plate on a jig and rotating the BMU plate to a preset angle, and shooting a first calibration image of the BMU plate from top to bottom by a PLC through an upper camera, and acquiring a first reference coordinate from the first calibration image through a mapping relation between the BMU plate and the upper camera;
and placing the Flex soft board on the jig and rotating the Flex soft board to a preset angle, and after the PLC absorbs the Flex soft board to a photographing position of the lower camera through the manipulator, photographing a second calibration image of the Flex soft board by the PLC from the lower camera to the lower camera, and acquiring a second reference coordinate from the second calibration image through the mapping relation between the Flex soft board and the lower camera.
The actual coordinate acquisition module specifically comprises:
the PLC shoots BMU images of the BMU plate from top to bottom through the upper camera, and acquires BMU coordinates from the BMU images through the mapping relation between the BMU plate and the upper camera;
after the PLC absorbs the Flex soft board to the photographing position of the lower camera through the manipulator, the PLC photographs the Flex image of the Flex soft board from the lower camera to the upper camera, and obtains Flex coordinates from the Flex image through the mapping relation between the Flex soft board and the lower camera.
The offset verification module specifically includes:
the BMU board and Flex soft board offset checking unit is used for judging whether the first absolute difference between the first reference coordinate and the BMU coordinate is larger than a first offset threshold value or not or whether the second absolute difference between the second reference coordinate and the Flex coordinate is larger than a second offset threshold value or not by the PLC, if yes, indicating that the offset of the BMU board or the Flex soft board is too large, placing the Flex soft board with the too large offset into a defective box by the manipulator, and ending the flow; if not, entering a comprehensive offset checking unit;
for example, if the first reference coordinates are (X, Y, R) and the BMU coordinates are (X1, Y1, R1), then the first absolute difference is (|x-X1|, |y-Y1|, |r-R1|), and it is sequentially determined whether |x-X1|, |y-Y1|, and |r-R1| are greater than the first offset threshold; wherein X represents an abscissa, Y represents an ordinate, and R represents an angle;
the comprehensive offset checking unit is used for judging whether the sum of the first absolute difference and the second absolute difference is larger than a third offset threshold value or not by the PLC, if so, indicating that the comprehensive offset is too large, and ending the flow; if not, the verification is passed, and the PLC controls the manipulator to automatically insert the Flex soft board into the BMU board at the speed of 1 mm/s. The transplanting is slowly performed at the speed of 1mm/s, so that the transplanting quality can be ensured, and the damage caused by the too high transplanting speed is avoided.
The opposite-inserting actual width verification module specifically comprises:
the PLC shoots an opposite-inserting image of the BMU board and the Flex soft board from top to bottom through an upper camera, calculates the actual width of the BMU board and the Flex soft board after opposite-inserting through the opposite-inserting image conversion, judges whether the actual width is in a width range, and if so, completes automatic opposite-inserting of the BMU board and the Flex soft board; if not, the Flex soft board is placed into the defective box by the manipulator and the process is ended.
In summary, the invention has the advantages that:
the Flex soft board is automatically inserted into the BMU board through the manipulator, so that the risk of extrusion damage to the jack of the BMU board can be greatly reduced compared with the traditional manual opposite insertion, tweezers are not needed to be used for clamping, indentation crush damage on the surface of the BMU board is avoided, and opposite insertion time is shortened; the offset of the placement positions of the BMU board and the Flex soft board is checked through the set first offset threshold, second offset threshold, third offset threshold and width range, the total offset of the BMU board and the Flex soft board is checked, the actual width of the BMU board and the Flex soft board after the insertion is completed is checked, the insertion failure caused by overlarge offset is avoided, the situation that the insertion is not in place or the insertion is over-head is found in time, and finally the accuracy, efficiency and quality of the insertion of the BMU board and the Flex soft board are greatly improved.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that the specific embodiments described are illustrative only and not intended to limit the scope of the invention, and that equivalent modifications and variations of the invention in light of the spirit of the invention will be covered by the claims of the present invention.