Visual dispensing method and system with self-diagnosis function

By introducing a self-diagnosis function into the visual dispensing system, we can acquire and store data during the dispensing process, and combine it with manual review to quickly diagnose and solve problems, thus solving the problem of poor dispensing quality and low production efficiency in practical applications of the visual dispensing system. problems and improve system availability and production efficiency.

CN118808068APending Publication Date: 2024-10-22FOSHAN YOUAI INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410698922.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

The visual dispensing system is easily affected by many factors in practical applications, resulting in poor dispensing quality and reduced production efficiency. Moreover, due to the lack of technical background of operators, it is difficult to solve problems quickly, resulting in increased production efficiency and costs.

Method used

Provide a visual dispensing method and system with self-diagnosis function. By acquiring and storing positioning data, control data and feedback data, problems can be quickly reproduced and combined with manual review to achieve diagnosis and problem solving in the dispensing process.

Benefits of technology

Improves dispensing quality and system availability, reduces dependence on equipment supplier technical support, reduces production costs, and increases production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118808068A_ABST
    Figure CN118808068A_ABST
Patent Text Reader

Abstract

The invention discloses a visual dispensing method and system with a self-diagnosis function, and the method comprises the steps: obtaining preset template data corresponding to a target workpiece, the template data at least comprising a template image of the target workpiece, a template contour graph, and a template track data set comprising a plurality of template track point data used for indicating dispensing; a positioning image of a placed target workpiece to be dispensed is collected, the positioning position of the target workpiece is determined, affine transformation is conducted on the template contour graph and the template track data set according to the positioning position, and a positioning contour set and a positioning track data set of the target workpiece are generated; and generating a control track data set according to the positioning track data set, performing dispensing treatment on each track point on the to-be-dispensed target workpiece according to the control track data set, reading a mechanical feedback position, and generating a feedback track data set. According to the invention, the dispensing quality and the system availability can be improved, the system production efficiency is improved, and the production cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automation systems, and in particular to a visual dispensing method and system with a self-diagnosis function. Background Art

[0002] The visual dispensing system is a sophisticated automated system that uses visual guidance algorithms and automatic control technology to accurately spray or apply fluid materials such as adhesives and paints to specific locations on workpieces. It is widely used in various manufacturing industries, such as electronics, automobiles, lighting, solar photovoltaics, industrial electrical, construction engineering, handicrafts, and medical technology. In actual applications, the visual dispensing system is easily affected by many factors, including but not limited to the robustness of the workpiece template, matching similarity, workpiece differences, light source brightness, camera exposure and gain, visual guidance algorithm errors, mechanical repeatability, servo response speed, dispensing height, dispensing speed, communication failures, and signal interference. These factors may cause the visual dispensing system to have poor dispensing quality or reduced production efficiency, or even fail to work properly.

[0003] At present, due to the lack of technical background and professional training, operators usually need to rely on the technical support of equipment suppliers when problems occur in visual dispensing systems, which will affect the timeliness of problem solving, thereby reducing system production efficiency and increasing production costs. Among them, occasional system problems are difficult to reproduce, which will also consume the technical support resources of equipment suppliers, thereby increasing equipment costs. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present invention provides a visual dispensing method and system with a self-diagnosis function, which is used to solve the defects of the visual dispensing system in the related art that the problem is poor in timeliness and difficult to reproduce after it occurs in actual application.

[0005] According to a first aspect of the present invention, a visual dispensing method with a self-diagnosis function is provided, the method comprising:

[0006] Acquire preset template data corresponding to the target workpiece, wherein the template data at least includes a template image of the target workpiece, a template contour graphic, and a template trajectory data set including a plurality of template trajectory point data for indicating dispensing;

[0007] Acquire a positioning image of a target workpiece to be dispensed, determine the positioning position of the target workpiece, and perform affine transformation on the template contour graphic and the template trajectory data set according to the positioning position to generate a positioning contour set and a positioning trajectory data set of the target workpiece;

[0008] A control trajectory data set is generated according to the positioning trajectory data set, and a dispensing process is performed on each trajectory point of the target workpiece to be dispensed according to the control trajectory data set, and the position of the mechanical feedback is read to generate a feedback trajectory data set.

[0009] Preferably, the method further comprises:

[0010] After the target workpiece to be glued is glued, a corresponding detection image is collected to determine the detection position of the target workpiece, and an affine transformation is performed on the template contour graphic according to the detection position to generate a detection contour set of the target workpiece;

[0011] By comparing the detection contour set with the corresponding positioning contour set, the detection image with displacement is screened out to obtain the displacement detection contour set in the detection image;

[0012] In the detection image where no displacement occurs, a difference operation is performed between the detection image and the corresponding positioning image to obtain a set of dispensing defect areas of the detection image, and based on the relative position relationship between the set of dispensing defect areas and the detection image, a set of unqualified detection contours and a set of qualified detection contours in the detection image are determined.

[0013] Preferably, the method further comprises:

[0014] The detection image, the displacement detection contour set, the dispensing defect area set, the unqualified detection contour set and the qualified detection contour set are displayed respectively for manual review;

[0015] Obtain manual review results, and update the dispensing defect area set, the unqualified detection contour set, and the qualified detection contour set according to the manual review results.

[0016] Preferably, the manual review results include:

[0017] A set of mis-positioned contours corresponding to the detection image with missed positioning or positioning deviation;

[0018] A set of missed-detection dispensing defect contours of the inspection image corresponding to the missed-detection dispensing defect area;

[0019] A set of misdetected glue dispensing defect regions corresponding to the detection image having misdetected glue dispensing defect regions;

[0020] The updating of the dispensing defect area set, the unqualified detection contour set and the qualified detection contour set according to the manual review result includes:

[0021] For the set of dispensing defect regions, the set of misdetected dispensing defect regions and the dispensing defect regions corresponding to the mispositioning contour set are eliminated, and the set of missed dispensing defect contours is added to obtain a verified set of dispensing defect regions;

[0022] According to the relative positional relationship between the reviewed dispensing defect area set and the detection image, the reviewed unqualified detection contour set and the reviewed qualified detection contour set are re-determined.

[0023] Preferably, the method further comprises:

[0024] When the mis-positioned contour set is not empty, performing positioning error diagnosis:

[0025] The union of the displacement detection contour set, the mis-positioning contour set, the unqualified detection contour set and the qualified detection contour set is used as a standard positioning contour set corresponding to the target workpiece;

[0026] Calculating the center position of the standard positioning contour set to obtain a standard positioning position data set;

[0027] Performing a cyclic matching test on the detection image using a test matching similarity from large to small;

[0028] If there is a test matching similarity whose matching result is equal to the standard positioning position data set, it is determined that the positioning error diagnosis result is that the matching similarity corresponding to the target workpiece is set too high;

[0029] If all the matching results of the test matching similarities are not equal to the standard positioning position data set, it is determined that the positioning error diagnosis result is that the matching template corresponding to the target workpiece is too different from the target workpiece.

[0030] Preferably, the method further comprises:

[0031] When the displacement detection profile set is not empty, performing displacement error diagnosis:

[0032] Acquire the template trajectory data set, determine the glue dispensing height of each trajectory point in the template trajectory data set, and compare and analyze the glue dispensing height with the workpiece thickness of the target workpiece;

[0033] If the difference between the dispensing height and the workpiece thickness of the target workpiece is lower than a preset height difference threshold, it is determined that the displacement error diagnosis result is that the dispensing height corresponding to the target workpiece is set too low;

[0034] If the difference between the dispensing height and the workpiece thickness of the target workpiece is not lower than a preset height difference threshold, it is determined that the displacement error diagnosis result is that a large vibration effect is generated during the dispensing process.

[0035] Preferably, the method further comprises:

[0036] When the glue dispensing defect area set is not empty, dividing the glue dispensing defect area set into a glue deficiency area set and a glue overflow area set according to the grayscale difference of the glue dispensing defect area set in the positioning image and the detection image;

[0037] If the glue-deficient area set is not empty, performing glue-deficient diagnosis to confirm the cause of the glue-deficient problem;

[0038] If the glue overflow area set is not empty, glue overflow diagnosis is performed to confirm the cause of the glue shortage problem.

[0039] Preferably, the glue deficiency diagnosis includes:

[0040] Calculate the intersection of the positioning trajectory data set and the glue-deficient area set to obtain a trajectory point data sequence number set corresponding to each glue-deficient area in the glue-deficient area set;

[0041] According to the trajectory point data sequence number set, the trajectory point data corresponding to the glue-deficient area in the positioning trajectory data set, the control trajectory data set, and the feedback trajectory data set are compared to obtain the position error and air pressure error of the glue valve corresponding to the glue-deficient area during the dispensing process;

[0042] If the air pressure error of the glue valve corresponding to any of the glue-deficient areas in the glue-deficient area set during the glue dispensing process is greater than a preset air pressure error threshold, then the glue-deficient diagnosis result is determined to be insufficient external air pressure during the glue dispensing process;

[0043] If the position error of the glue valve corresponding to any of the glue-deficient areas in the glue-deficient area set during the glue dispensing process is greater than a preset position error threshold, the glue-deficient diagnosis result is determined as control system signal interference at the trajectory point corresponding to the glue-deficient area during the glue dispensing process;

[0044] If there are some glue-deficient areas in the glue-deficient area set whose corresponding glue valves have no position error and air pressure error during the glue dispensing process, and the track point data corresponding to the some glue-deficient areas are the same, then it is determined that the glue-deficient diagnosis result is that the glue dispensing air pressure corresponding to the track point data corresponding to the some glue-deficient areas is too low;

[0045] If there is any glue-deficient area in the glue-deficient area set, and the position error and air pressure error of the glue valve corresponding to the glue dispensing process are not greater than the position error threshold and the air pressure error threshold, and the trajectory point data corresponding to the glue-deficient area is not determined as the glue dispensing air pressure is too low, then the glue-deficient diagnosis result is determined to be that the glue valve is short of glue or glue is stuck during the glue dispensing process.

[0046] Preferably, the glue overflow diagnosis includes:

[0047] Calculate the intersection of the positioning trajectory data set and the glue overflow area set to obtain a trajectory point data sequence number set corresponding to each glue overflow area in the glue overflow area set;

[0048] According to the trajectory point data sequence number set, the trajectory point data corresponding to the overflow area in the positioning trajectory data set, the control trajectory data set, and the feedback trajectory data set are compared to obtain the position error and air pressure error of the glue valve corresponding to the overflow area during the dispensing process;

[0049] If the air pressure error of the glue valve corresponding to any of the glue overflow areas in the glue overflow area set during the glue dispensing process is greater than a preset air pressure error threshold, then the glue overflow diagnosis result is determined to be that the external air pressure is too high during the glue dispensing process;

[0050] If there is any glue overflow area in the glue overflow area set whose corresponding glue valve position error during the glue dispensing process is greater than a preset position error threshold, the glue overflow diagnosis result is determined as control system signal interference at the trajectory point corresponding to the glue overflow area during the glue dispensing process;

[0051] If there are several glue overflow areas in the glue overflow area set whose corresponding glue valves have no position error and air pressure error during the glue dispensing process, and the trajectory point data corresponding to the several glue overflow areas are the same, then it is determined that the glue overflow diagnosis result is that the glue dispensing air pressure corresponding to the trajectory point data corresponding to the several glue overflow areas is too high;

[0052] If there is any overflow area in the overflow area set, and the position error and air pressure error of the glue valve corresponding to the overflow area during the dispensing process are not greater than the position error threshold and the air pressure error threshold, and the trajectory point data corresponding to the overflow area is not determined as the dispensing air pressure is too low, then the overflow diagnosis result is determined to be glue leakage from the glue valve during the dispensing process.

[0053] According to a second aspect of the present invention, there is provided a visual dispensing system with a self-diagnosis function, the system comprising:

[0054] A visual module is used to collect a template image of a target workpiece, generate template data corresponding to the target workpiece, the template data at least including the template image of the target workpiece, a template contour graphic, and a template trajectory data set including a plurality of template trajectory point data for indicating dispensing; and collect a positioning image of a placed target workpiece to be dispensed, determine the positioning position of the target workpiece, and perform affine transformation on the template contour graphic and the template trajectory data set according to the positioning position, generate a positioning contour set and a positioning trajectory data set of the target workpiece, and generate a control trajectory data set according to the positioning trajectory data set;

[0055] A control module, used for performing glue dispensing processing on each track point of the target workpiece to be glued according to the control track data set, and reading the position of mechanical feedback to generate a feedback track data set;

[0056] A log data module, used to store and query the template data corresponding to the target workpiece, as well as the positioning data, control data and feedback data calculated and generated during the dispensing process; wherein the positioning data at least includes the positioning image, the positioning position, the positioning profile set and the positioning trajectory data set; the control data at least includes the control trajectory data set; and the feedback data at least includes the feedback trajectory data set;

[0057] The interactive module is used to display the data stored in the log data module and provide an interactive interface for template editing and manual review.

[0058] The present invention discloses a visual dispensing method and system with a self-diagnosis function, which can obtain and store positioning data, control data and feedback data during the dispensing process, and the acquired and stored positioning data, control data and feedback data can quickly build a system test environment to achieve the effect of quickly reproducing problems and locating problems, so as to realize the function of diagnosing problems that occur in the target workpiece during the dispensing process. Furthermore, the visual dispensing method and system proposed by the present invention can also distinguish qualified and unqualified workpieces in combination with the results of manual review positioning and detection, and finally find the cause of the unqualified workpiece according to the problem type of the unqualified workpiece based on the comparison of control data and feedback data, so as to put forward targeted improvement suggestions.

[0059] To sum up, the present invention realizes the effective diagnosis and solution of various problems arising in the visual dispensing process by combining the detection of dispensing quality and the data-driven diagnostic process, thereby improving the dispensing quality and the availability of the system. In addition, the visual dispensing method proposed in the present invention has a self-diagnosis function and does not have high technical requirements for the operator. Therefore, when a problem occurs in the visual dispensing system, self-diagnosis can be completed without relying on the technical support of the equipment supplier, thereby efficiently solving production problems, improving system production efficiency and reducing production costs.

[0060] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 The flowchart of a visual dispensing method with a self-diagnosis function according to an embodiment of the present invention is shown.

[0062] Figure 2The flowchart of another visual dispensing method with self-diagnosis function according to one embodiment of the present invention is shown.

[0063] Figure 3 It is a flowchart of the overall execution of a visual dispensing method with a self-diagnosis function according to an embodiment of the present invention.

[0064] Figure 4 The present invention is a flowchart showing a method of performing a visual dispensing operation according to an embodiment of the present invention.

[0065] Figure 5 The present invention is a flow chart showing a method for performing dispensing quality inspection according to an embodiment.

[0066] Figure 6 The present invention is a flowchart showing a manual review according to an embodiment.

[0067] Figure 7 FIG. 4 is a flow chart showing a method for performing shift error diagnosis according to an embodiment of the present invention.

[0068] Figure 8 The present invention is a flowchart showing a method for performing positioning error diagnosis according to an embodiment of the present invention.

[0069] Fig. 9 The present invention is a flowchart showing a method for performing glue deficiency diagnosis according to an embodiment of the present invention.

[0070] Fig.10 The present invention is a flowchart showing a method for performing glue overflow diagnosis according to an embodiment of the present invention.

[0071] Fig.11 It is a structural schematic diagram of a visual dispensing system with a self-diagnosis function according to an embodiment of the present invention. DETAILED DESCRIPTION

[0072] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of systems and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0073] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0074] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0075] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0076] like Figure 1 As shown, Figure 1 The present invention is a flowchart of a visual dispensing method with a self-diagnosis function according to an embodiment of the present invention, comprising the following steps:

[0077] Step S101, obtaining preset template data corresponding to a target workpiece, the template data at least including a template image of the target workpiece, a template contour graphic, and a template trajectory data set including a plurality of template trajectory point data for indicating dispensing;

[0078] Step S102, collecting a positioning image of the target workpiece to be dispensed, determining the positioning position of the target workpiece, and performing affine transformation on the template contour graphic and the template trajectory data set according to the positioning position to generate a positioning contour set and a positioning trajectory data set of the target workpiece;

[0079] Step S103, generating a control trajectory data set according to the positioning trajectory data set, performing glue dispensing processing on each trajectory point on the target workpiece to be glued according to the control trajectory data set, and reading the position of mechanical feedback to generate a feedback trajectory data set.

[0080] Specifically, in step S101, preset template data for the target workpiece can be obtained. Specifically, when creating the template data of the target workpiece, the target workpiece can be placed as a template, the template image of the target workpiece can be collected, the template contour graphic of the target workpiece can be drawn, and the matching similarity and workpiece thickness of the corresponding target workpiece can be set, and each template trajectory point data of the target workpiece can be drawn and set in the dispensing order, and the collection of template trajectory point data constitutes a template trajectory data set.

[0081] Specifically, the template trajectory point data may include at least the image position (including the row and column coordinates of the trajectory point in the template image), dispensing height, glue valve air pressure, glue valve opening waiting time, glue valve closing waiting time, glue discharge method (such as empty running, dotting or continuous, which can be set according to actual needs) and path arc angle (the path during the dispensing operation is presented as an arc of a certain angle, and when the angle is 0, the dispensing path is a straight line), etc.

[0082] Specifically, the template data corresponding to the target workpiece can be stored after being created, so as to be used when the corresponding target workpiece needs to be visually dispensed. Specifically, the stored template data can at least include: a template image of the target workpiece, a template contour graphic, matching similarity, workpiece thickness, and a template trajectory data set.

[0083] Specifically, after the template data corresponding to the target workpiece is obtained, the target workpiece to be glued can be placed on a predetermined workbench and a glue dispensing button can be pressed to start glue dispensing.

[0084] Specifically, in the process of visual dispensing, the placed target workpiece can be positioned first to obtain positioning data, and then the corresponding control data can be generated based on the positioning data to control the dispensing operation on the target workpiece. In the process of dispensing operation, the feedback data of the machine can also be obtained to prepare for backtracking and positioning when problems arise later.

[0085] Specifically, in step S102, the target workpiece to be glued can be positioned to determine the operation path of the glue dispensing operation. Specifically, the positioning image of the target workpiece to be glued can be collected, and the target workpiece position can be positioned by a template matching algorithm and sorted by the shortest path to obtain the ordered positioning position of the target workpiece in the positioning image (including row coordinates, column coordinates and angles relative to the template). According to the positioning position, the template contour graphic can be transformed through an affine transformation to generate a positioning contour set of the successfully positioned target workpiece, and according to the positioning position, the image position of each track point in the template trajectory data set is transformed through an affine transformation to calculate the positioning trajectory data set (composed of row coordinates and column coordinates).

[0086] Specifically, in step S103, the control data guiding the movement of the dispensing machine can be generated according to the positioning trajectory data set of the target workpiece obtained in step S102, so as to realize the dispensing process on each trajectory point of the target workpiece to be dispensed. Specifically, after obtaining the positioning trajectory data set, the trajectory mechanical position data set (composed of X-axis coordinates and Y-axis coordinates) corresponding to the trajectory image position data set can be calculated by the visual guidance algorithm. Then, according to the correspondence between each trajectory point in the template trajectory data set and the trajectory mechanical position data set, it is spliced ​​into a control trajectory data set (including X-axis coordinates and Y-axis coordinates, dispensing height, glue valve air pressure, glue valve opening waiting time, glue valve closing waiting time, glue discharge method and path arc angle).

[0087] After the control trajectory data set is generated, the dispensing process of each trajectory point can be performed in the data order of the control trajectory data set, the dispensing valve can be controlled to move to each mechanical position in a straight line or arc path according to the arc angle, the air pressure can be adjusted according to the value of the valve air pressure, the dispensing valve can be opened or closed according to the dispensing method, and the waiting time can be delayed according to the opening valve waiting time and closing valve waiting time. During this period, after each control of a trajectory point is completed, the mechanical feedback position (X-axis coordinate, Y-axis coordinate and Z-axis coordinate) can be read and recorded from the encoder, and the air pressure feedback value can be read and recorded from the air pressure detection sensor. Therefore, after completing the entire dispensing process, the feedback trajectory data set corresponding to the trajectory control data set can be obtained (including X-axis coordinate, Y-axis coordinate, Z-axis coordinate and air pressure feedback value).

[0088] Specifically, the positioning data, control data and feedback data generated during the dispensing process can be stored so as to reproduce the visual dispensing operation performed on the corresponding target workpiece when needed. Specifically, the stored positioning data can at least include: a positioning image, a positioning position, a positioning profile set and a positioning trajectory data set. The stored control data can at least include a control trajectory data set. The stored feedback data can at least include a feedback trajectory data set.

[0089] Specifically, Figure 2 As shown, in some embodiments, the visual dispensing method with self-diagnosis function proposed by the present invention is Figure 1 In addition to the steps shown, the following steps may also be included:

[0090] Step S104, after the target workpiece to be glued is glued, a corresponding detection image is collected, the detection position of the target workpiece is determined, and an affine transformation is performed on the template contour graphic according to the detection position to generate a detection contour set of the target workpiece;

[0091] Step S105, by comparing the detection contour set and the corresponding positioning contour set, the detection image with displacement is screened out to obtain the displacement detection contour set in the detection image;

[0092] Step S106, in the detection image without displacement, perform a difference operation on the detection image and the corresponding positioning image to obtain a set of dispensing defect areas in the detection image, and determine a set of unqualified detection contours and a set of qualified detection contours in the detection image based on the relative position relationship between the set of dispensing defect areas and the detection image.

[0093] Specifically, in step S104, the target workpiece can be subjected to a dispensing quality inspection after the dispensing of the target workpiece is completed. Specifically, the corresponding inspection image can be collected after the dispensing of the target workpiece to be dispensed is completed, the position of the target workpiece is located by a template matching algorithm, and the position of the target workpiece is sorted by the shortest path method to obtain an ordered inspection position (including row coordinates, column coordinates and angles relative to the template) of the target workpiece in the inspection image. Then, according to the inspection position, the template contour graphic is affine transformed to generate an inspection contour set of the inspected target workpiece.

[0094] Specifically, the generated detection data may also be stored for subsequent diagnosis. Specifically, the stored detection data may at least include a detection image, a detection position, and a detection contour set.

[0095] Specifically, since the problems occurring during the visual dispensing process of the workpiece can be mainly divided into dispensing position error problems, i.e., displacement errors, and dispensing quality error problems, such as lack of glue or overflow of glue, and the dispensing position error problems and dispensing quality error problems have significantly different judgment logics, the error problems to which the inspection images of the target workpiece that has completed the dispensing operation belong can be judged and divided in turn, thereby achieving basic diagnosis of the target workpiece.

[0096] Specifically, in step S105, the workpiece that has been displaced can be found by comparing the detection contour set with the corresponding positioning contour set, and the displacement positioning contour set in the positioning image and the displacement detection contour set in the detection image can be screened out. Among them, the target workpiece corresponding to the detection image included in the displacement detection contour set is the target workpiece that has a displacement error, that is, a dispensing position error problem.

[0097] Specifically, in step S106, since there is no need to perform glue dispensing quality inspection on the workpiece with displacement, the displacement positioning contour set and the displacement detection contour set can be used as the shielding area of ​​the positioning image and the detection image respectively, and then the positioning image after shielding the displacement target workpiece and the detection image are subjected to difference operation to analyze the glue dispensing defect area set. After that, it can be determined whether there is a glue dispensing quality error problem in the detection image based on the relative position relationship between the glue dispensing defect area set and the detection image. Specifically, if the positioning contour of a target workpiece without displacement has an intersection with a glue dispensing defect area in the glue dispensing defect area set or the center position of a glue dispensing defect area is closest to the positioning contour of the target workpiece, the target workpiece is an unqualified workpiece. On the contrary, if there is no corresponding relationship between the target workpiece with glue dispensing defect area and there is no displacement of the target workpiece, the target workpiece is judged to be a qualified workpiece. Thus, the detection unqualified contour set and the detection qualified contour set in the detection image are classified.

[0098] Specifically, after completing step S105 and step S106, the relevant diagnostic data may be stored. Specifically, the stored diagnostic data may at least include a displacement detection contour set, a dispensing defect area set, a detection unqualified contour set, and a detection qualified contour set.

[0099] Specifically, after completing the basic diagnosis of the target workpiece, the basic diagnosis result may be further reviewed by manual review.

[0100] Specifically, after obtaining a unique detection contour set in step S105 and obtaining a dispensing defect area set, a detection unqualified contour set and a detection qualified contour set in the detection image in step S106, the method of the present invention may further include: displaying the detection image, the shift detection contour set, the dispensing defect area set, the detection unqualified contour set and the detection qualified contour set respectively for manual review; and obtaining the manual review results, and updating the dispensing defect area set, the detection unqualified contour set and the detection qualified contour set according to the manual review results.

[0101] Specifically, when displaying, different colors may be used to display the shift detection contour set, the dispensing defect area set, the detection unqualified contour set, and the detection qualified contour set, so that the operator can quickly and accurately identify them.

[0102] Specifically, the above-mentioned manual review results may at least include: a set of mis-positioning contours corresponding to the detection images with missed positioning or positioning deviation; a set of missed-detection dispensing defect contours corresponding to the detection images with missed-detection dispensing defect areas; and a set of mis-detection dispensing defect areas corresponding to the detection images with mis-detection dispensing defect areas.

[0103] Specifically, when the operator is reviewing the inspection results, if there is a target workpiece that is missed in positioning or has positioning deviation, the operator can circle the target workpiece with an inclined rectangle or other specified operating methods to obtain a set of mis-positioning contours; if there is a missed detection glue defect area, the operator can circle the glue defect area with a polygon or other specified operating methods to obtain a set of missed detection glue defect contours; and if there is a misdetected glue defect area, the operator can identify it and obtain a set of misdetected glue defect areas.

[0104] Specifically, in some embodiments, the operator may also use other means to point out the mis-positioning contour set, the missed dispensing defect contour set and the mis-detected dispensing defect area set. The specific interaction method can be set according to actual needs, and the present invention does not limit this.

[0105] Specifically, after obtaining the mis-positioning contour set, missed dispensing defect contour set and mis-detected dispensing defect area set pointed out by the operator, the dispensing defect area set, the unqualified detection contour set and the qualified detection contour set can be updated according to the manual review results, which can specifically include: for the dispensing defect area set, the mis-detected dispensing defect area set and the dispensing defect area corresponding to the mis-positioning contour set are eliminated, and the missed dispensing defect contour set is added to obtain the dispensing defect area set after review; and according to the relative position relationship between the dispensing defect area set after review and the detection image, the unqualified detection contour set and the qualified detection contour set after review are re-determined. Specifically, if the positioning contour of a target workpiece without displacement and mis-positioning has an intersection with a dispensing defect area in the dispensing defect area set or the center position of a dispensing defect area is closest to the positioning contour of the target workpiece, then the target workpiece is an unqualified workpiece. Anyway, for a target workpiece with no corresponding relationship between dispensing defect areas and no displacement and mis-positioning, the target workpiece is judged to be a qualified workpiece. Therefore, the verified unqualified contour set and qualified contour set in the detection image can be obtained through re-classification.

[0106] Specifically, the verified diagnostic data can be stored. Specifically, the stored verified diagnostic data can also include at least: a mis-positioning contour set, a missed dispensing defect contour set and a mis-detected dispensing defect area set, as well as a verified dispensing defect area set, a failed detection contour set and a qualified detection contour set.

[0107] Specifically, after the manual review is completed, the positioning errors occurring during the self-diagnosis process may be further diagnosed, that is, when the set of incorrectly positioned contours is not empty, positioning error diagnosis may be performed.

[0108] Specifically, the process of performing positioning error diagnosis may include: using the union of a shift detection contour set, a mispositioning contour set, a detection unqualified contour set and a detection qualified contour set as a standard positioning contour set corresponding to the target workpiece; calculating the center position of the standard positioning contour set to obtain a standard positioning position data set (including row coordinates, column coordinates and angles relative to a template); performing a cyclic matching test on the detection image using test matching similarities from large to small; if there is a test matching similarity whose matching result is equal to the standard positioning position data set, then determining that the positioning error diagnosis result is that the matching similarity of the corresponding target workpiece is set too high; if the matching results of all test matching similarities are not equal to the standard positioning position data set, then determining that the positioning error diagnosis result is that the matching template of the corresponding target workpiece is too different from the target workpiece.

[0109] That is, you can try to match the detection image in a loop using the test matching similarity from large to small. If there is a certain value of test matching similarity in the loop process that can match the result equal to the standard positioning position data set, it can be determined that the matching similarity is too large, and a recommended matching similarity value can be given. On the contrary, it can be determined that the matching template of the target workpiece is too different from the target workpiece. At this time, it can be recommended to adjust the light source brightness, camera gain and exposure to improve the contrast of the workpiece in the image, update the template image and template contour graphics in the template data, and perform the above positioning error diagnosis again to eliminate the problem of the matching template of the corresponding target workpiece being too different from the target workpiece.

[0110] Specifically, when performing a cyclic matching test, the matching test may be performed in sequence from 1.0 to 0.05 as the test matching similarity, and the matching similarity is reduced by 0.05 at the end of each cycle. Specifically, other numerical rules may also be used to set the test matching similarity when performing a cyclic matching test, and the present invention is not limited to this.

[0111] Specifically, regardless of whether the manual review is completed, the dispensing position error problem determined in the self-diagnosis process can be further diagnosed, that is, when the displacement detection contour set is not empty, the displacement error diagnosis is performed.

[0112] Specifically, the process of performing shift error diagnosis may include: obtaining a template trajectory data set, determining the glue dispensing height of each trajectory point in the template trajectory data set, and comparing and analyzing the glue dispensing height with the workpiece thickness of the target workpiece; if the difference between the glue dispensing height and the workpiece thickness of the target workpiece is lower than a preset height difference threshold, then the shift error diagnosis result is determined to be that the glue dispensing height of the corresponding target workpiece is set too low; if the difference between the glue dispensing height and the workpiece thickness of the target workpiece is not lower than the preset height difference threshold, then the shift error diagnosis result is determined to be that a large vibration is generated during the glue dispensing process.

[0113] Specifically, when it is determined that the displacement error diagnosis result is that the dispensing height of the corresponding target workpiece is set too low, it can be recommended to increase the dispensing height of the problematic trajectory point to solve the displacement error problem; and when it is determined that the displacement error diagnosis result is a large vibration effect generated during the dispensing process, it can be recommended to reduce the dispensing speed of each trajectory point in the template trajectory data set to reduce the probability of displacement error problems.

[0114] Specifically, the height difference threshold can be set according to the diagnostic accuracy requirements and actual conditions of the diagnostic process to accurately determine the displacement error diagnosis result, and the present invention is not limited to this.

[0115] Specifically, regardless of whether manual review is completed, the dispensing quality error problems determined during the self-diagnosis process can be further diagnosed, such as classifying the dispensing quality error problems into specific problem types and further diagnosing the causes of the specific problem types.

[0116] Specifically, the method described in the present invention may further include: when the glue spot defect area set is not empty, dividing the glue spot defect area set into a glue deficiency area set and a glue overflow area set according to the grayscale difference of the glue spot defect area set in the positioning image and the detection image; specifically, the glue spot defect area with a small grayscale difference in the positioning image and the detection image, such as a glue spot defect area with a grayscale difference less than a preset grayscale difference threshold, can be classified as a glue deficiency area, otherwise it is a glue overflow area, thereby dividing the glue spot defect area set into a glue deficiency area set and a glue overflow area set; if the glue deficiency area set is not empty, performing glue deficiency diagnosis to confirm the cause of the glue deficiency problem; if the glue overflow area set is not empty, performing glue overflow diagnosis to confirm the cause of the glue deficiency problem.

[0117] Specifically, the grayscale difference threshold can be set according to the diagnostic accuracy requirements and actual conditions of the diagnostic process to accurately determine the type of the dispensing defect area, and the present invention is not limited to this.

[0118] Specifically, the process of executing glue deficiency diagnosis may include: calculating the intersection of the positioning trajectory data set and the glue deficiency area set, and obtaining the trajectory point data sequence number set corresponding to each glue deficiency area in the glue deficiency area set; since the glue deficiency diagnosis is only for target workpieces that are not shifted and not mispositioned, the positions of these target workpieces are exactly the same in the positioning image and the detection image; according to the trajectory point data sequence number set, the trajectory point data corresponding to the glue deficiency area in the positioning trajectory data set, the control trajectory data set and the feedback trajectory data set are compared to obtain the position error and air pressure error of the glue valve corresponding to the glue deficiency area during the glue dispensing process; since the data order of the positioning trajectory data set, the control trajectory data set and the feedback trajectory data set is consistent, the trajectory point data sequence number set can be used to compare the position error and air pressure error of the glue valve in the glue deficiency area during the glue dispensing process; if there is any glue deficiency area in the glue deficiency area set whose corresponding glue valve air pressure error during the glue dispensing process is greater than the preset air pressure error threshold, it can be determined that the glue deficiency diagnosis result is insufficient external air pressure during the glue dispensing process. ; If there is any glue-deficient area in the glue-deficient area set, and the position error of the glue valve corresponding to the glue-deficient area during the glue dispensing process is greater than the preset position error threshold, then it can be determined that the glue-deficient diagnosis result is that the control system signal interference occurs in the trajectory point of the corresponding glue-deficient area during the glue dispensing process; If there are several glue-deficient areas in the glue-deficient area set, and the corresponding glue valves do not have position errors and air pressure errors during the glue dispensing process, and the trajectory point data corresponding to several glue-deficient areas are the same, then it can be determined that the glue-deficient diagnosis result is that the glue dispensing air pressure corresponding to the trajectory point data of the several glue-deficient areas is too low; and for the case where the glue dispensing air pressure is too low, it can be recommended to increase the glue dispensing air pressure or set a glue valve opening delay or a glue valve closing delay to solve the problem; If there is any glue-deficient area in the glue-deficient area set, and the position error and air pressure error of the glue valve corresponding to the glue dispensing process are not greater than the position error threshold and the air pressure error threshold, and the trajectory point data corresponding to the glue-deficient area is not determined as the glue dispensing air pressure is too low, that is, there is a glue-deficient area in the glue-deficient area set that is not determined by the above three situations, then it can be determined that the glue-deficient diagnosis result is that the glue valve is short of glue or glue is hanging during the glue dispensing process.

[0119] Similarly, the process of performing glue overflow diagnosis may specifically include: calculating the intersection of the positioning trajectory data set and the glue overflow area set, and obtaining the trajectory point data sequence number set corresponding to each glue overflow area in the glue overflow area set; according to the trajectory point data sequence number set, comparing the trajectory point data of the corresponding glue overflow area in the positioning trajectory data set, the control trajectory data set, and the feedback trajectory data set, to obtain the position error and air pressure error of the glue valve corresponding to the glue overflow area during the glue dispensing process; if the air pressure error of the glue valve corresponding to any glue overflow area in the glue overflow area set during the glue dispensing process is greater than the preset air pressure error threshold, then it can be determined that the glue overflow diagnosis result is that the external air pressure is too high during the glue dispensing process; if the position error of the glue valve corresponding to any glue overflow area in the glue overflow area set during the glue dispensing process is greater than the preset position error threshold, then it can be determined that the glue overflow diagnosis result is that the external air pressure is too high during the glue dispensing process. The trajectory points of the glue area have control system signal interference during the glue dispensing process; if there are several glue overflow areas in the glue overflow area set, and the corresponding glue valves have no position error and air pressure error during the glue dispensing process, and the trajectory point data corresponding to several glue overflow areas are the same, then it can be determined that the glue overflow diagnosis result is that the glue dispensing air pressure corresponding to the trajectory point data of the several glue overflow areas is too high; and for the case where the glue dispensing air pressure is too high, it can be recommended to reduce the glue dispensing air pressure to solve the problem; if there is any glue overflow area in the glue overflow area set, and the position error and air pressure error of the glue valve corresponding to the glue dispensing process are not greater than the position error threshold and the air pressure error threshold, and the trajectory point data corresponding to the glue overflow area is not judged as the glue dispensing air pressure is too low, that is, there is a glue overflow area in the glue overflow area set that is not judged by the above three situations, then it can be determined that the glue overflow diagnosis result is glue leakage from the glue valve during the glue dispensing process.

[0120] Specifically, the air pressure error threshold and the position error threshold can be set according to the diagnostic accuracy requirements and actual conditions of the diagnostic process to accurately determine the glue deficiency diagnosis results and the glue overflow diagnosis results, and the present invention is not limited to this.

[0121] Specifically, the air pressure error threshold and the position error threshold used in the glue deficiency diagnosis process and the glue overflow diagnosis process may be the same or different, and may be specifically set according to actual needs, and the present invention does not impose any limitation on this.

[0122] Next, the present invention will explain a visual dispensing method with a self-diagnosis function proposed by the present invention through a specific embodiment.

[0123] like Figure 3 As shown, the overall execution process of a visual dispensing method with self-diagnosis function proposed by the present invention may include the following steps:

[0124] Step S301: Create and store template data of a workpiece.

[0125] Place the workpiece as a template and collect the template image I of the workpiecet , draw the template contour of the workpiece, set the matching similarity and thickness of the workpiece, draw and set the data of each template trajectory point of the workpiece according to the dispensing order, including image position (row coordinates and column coordinates), dispensing height, glue valve air pressure, glue valve opening waiting time, glue valve closing waiting time, glue discharge mode (empty run or dot or continuous), path arc angle (if the angle is 0, it is a straight line), etc.

[0126] Step S302: Place the workpiece and start dispensing.

[0127] After placing the workpiece to be glued, press the start glue button to start glue dispensing.

[0128] Step S303: Execute visual dispensing and store positioning data, control data and feedback data of the dispensing process.

[0129] The specific steps of step S303 are as follows: Figure 4 As shown, it includes: collecting positioning image I loc , locate the workpiece position through the template matching algorithm and sort the workpiece positions according to the shortest path method to obtain the positioning image I loc The ordered positioning position data set TargetPos of the workpiece loc According to the positioning position data set, the template contour graphic is transformed through affine transformation to generate the positioning contour set TargetProfile of the successfully positioned workpiece loc , according to the positioning position data set, the image position Pos of each trajectory point in the template trajectory data set tem Positioning trajectory dataset PointPos calculated by affine transformation loc Then, the trajectory mechanical position dataset ValvePos corresponding to the positioning trajectory dataset is calculated through the visual guidance algorithm. loc . Spliced ​​into the control trajectory dataset Control loc According to the control trajectory data set Control loc The dispensing process of each track point is performed in sequence according to the data. During this period, after each track point is controlled, the mechanical feedback position is read and recorded from the encoder, and the air pressure feedback value is read and recorded from the air pressure detection sensor. After completing the entire dispensing process, the control track data set Control loc Corresponding feedback trajectory dataset Feedback loc , store the positioning data, control data and feedback data of the dispensing process.

[0130] Step S304: Execute dispensing quality inspection.

[0131] The specific steps of step S304 are as follows: Figure 5 As shown, it includes: collecting detection image Idet , locate the workpieces through the template matching algorithm and sort them according to the shortest path to obtain the detection position data set TargetPos det The template profile graphic generates the detection profile set TargetProfile of the successfully located workpiece through affine transformation. det , compare the positioning profile set TargetProfile loc TargetProfile with detected profile collection det Find the artifacts that cause displacement and filter out the positioning image I loc ShiftProfile loc With the detection image I det ShiftProfile det , set the shift positioning profile collection ShiftProfile loc ShiftProfile with shift detection profile collection det As positioning image I loc With the detection image I det The shielded area is the positioning image I after shielding the shifted artifact loc With the detection image I det After performing the difference operation, the dispensing defect area set Region is analyzed. diff , determine the dispensing defect area set Region diff The corresponding relationship with the positioning contour is classified to obtain the detection image I det Detect unqualified profile collection in NgProfile diff And the qualified profile set OkProfile diff .

[0132] Step S305: Manual review.

[0133] The specific steps of step S305 are as follows: Figure 6 As shown, including: displaying the detection image I det , using different colors to display the shift detection profile set ShiftProfile det , detect unqualified profile collection NgProfile diff , qualified workpiece profile graphic OkProfile diff and dispensing defect area set Region diff The operator will review the test results. If there is a workpiece with missed positioning or positioning deviation, the operator will circle the workpiece with an inclined rectangle to obtain the error positioning profile set ErrorProfile detIf there is a missing dispensing defect area, the operator will circle the dispensing defect area with a polygon to obtain the missing dispensing defect contour set MissProflie det If there is a misdetected dispensing defect area, it is marked by the operator to obtain the misdetected dispensing defect area set Region false .

[0134] Step S306: Update and store the detection data.

[0135] By dispensing defect area collection Region diff Eliminate the region set of misdetected dispensing defects false , remove and misposition contour set ErrorProfile det Corresponding dispensing defect area, add the missed dispensing defect contour set MissProflie det Get the verified dispensing defect area set Region defect .

[0136] If the positioning contour and dispensing defect area set Region of a workpiece without displacement and mispositioning defect If there is an intersection of a certain dispensing defect area in the image or the center of a certain dispensing defect area is closest to the positioning contour of the workpiece, then the workpiece is an unqualified workpiece. In any case, if there is no workpiece with a corresponding relationship between dispensing defect areas and there is no displacement or mispositioning, then the workpiece is judged to be a qualified workpiece. Classify again to obtain the detection image I det NgProfile, a collection of unqualified profiles after review det And the qualified profile set OkProfile det .

[0137] Step S307: If the shift detection profile set ShiftProfile det If not empty, diagnostics for shift errors are performed.

[0138] The specific steps of step S307 are as follows: Figure 7 As shown, it includes: analyzing the dispensing height of each trajectory point in the template trajectory data set and the workpiece thickness to determine whether there is a situation where the dispensing height of the trajectory point is set too low. If so, it is determined that the trajectory dispensing height is set too low and it is recommended to increase the dispensing height of the problematic trajectory point. If not, it is determined that the movement process may produce a large vibration and it is recommended to reduce the dispensing speed of each trajectory point in the template trajectory data set.

[0139] Step S308: If the error positioning profile set ErrorProfile det If not empty, the diagnostics of positioning errors are performed.

[0140] The specific steps of step S308 are as follows: Figure 8 As shown, including: set the shift detection profile collection ShiftProfile det , ErrorProfile det , detect unqualified profile collection NgProfile det And the qualified profile set OkProfile det The union of det Standard positioning profile collection StandardProfile for workpieces det , calculate the center position to get the standard positioning position data set StandardProfile det , try to detect image I det Use the matching similarity from 1.0 to 0.05 to perform matching tests in sequence. At the end of each cycle, the matching similarity is reduced by 0.05. If there is a matching similarity of a certain value that can match the standard positioning data during the cycle, it is determined that the matching similarity is too large and a recommended value is given. Otherwise, it is determined that the matching template of the workpiece is too different from the workpiece, and the light source brightness, camera gain and exposure need to be adjusted to improve the contrast of the workpiece in the image, and the template image I in the template data is updated. t and the template contour graphic, and execute step S308 again.

[0141] Step S309: If the dispensing defect area set Region defect If it is not empty, the dispensing defect area classification is performed.

[0142] Analyze the dispensing defect area set Region defect In the positioning image I loc With the detection image I det The area with smaller grayscale difference is regarded as the glue-deficient area, and the area with smaller grayscale difference is regarded as the glue-overflow area. defect Divided into glue-deficient area collection Region less And the overflow area collection Region more .

[0143] Step S310: If the glue-deficient region set Region less If it is not empty, the glue shortage diagnosis will be performed.

[0144] The specific steps of step S310 are as follows: Fig. 9 As shown, including:

[0145] Calculate the positioning trajectory dataset PointPos loc and the glue-deficient area set Region less The intersection of the loop finds the glue-deficient area set Regionless The data sequence number set of the trajectory points corresponding to the glue-deficient area is used to compare the position error and air pressure error of the glue valve in the glue-deficient area during the dispensing process.

[0146] If there is a trajectory point in a glue-deficient area and the air pressure error of the glue valve is large during the dispensing process, it can be determined that insufficient external air pressure occurs during operation.

[0147] If there is a trajectory point in a glue-deficient area where the position error of the glue valve is large during the dispensing process, it is determined that control system signal interference occurs during the operation of the trajectory point.

[0148] If there are multiple glue-deficient areas without position error and air pressure error during the dispensing process, and they correspond to the same template trajectory point data on different workpieces, it is determined that the dispensing air pressure of these template trajectory point data is too low.

[0149] If the glue area set Region less If there is a glue-deficient area in the dispensing process that is not determined by the above three situations, it is determined that the glue valve is short of glue or glue is stuck during the dispensing process.

[0150] Step S311: If the overflow region set Region more If it is not empty, glue overflow diagnosis will be performed.

[0151] The specific steps of step S311 are as follows: Fig.10 As shown, including:

[0152] Calculate the positioning trajectory dataset PointPos loc Combined with the overflow area Region more The intersection of the overflow area is looped to find the overflow area set Region more The data sequence number set of the trajectory points corresponding to the overflow area is used to compare the position error and air pressure error of the glue valve in the overflow area during the dispensing process.

[0153] If there is a trajectory point in a certain glue overflow area and the air pressure error of the glue valve is large during the dispensing process, it can be determined that the external air pressure is too high during the operation.

[0154] If there is a trajectory point in a certain glue overflow area where the position error of the glue valve is large during the dispensing process, it is determined that control system signal interference occurs during the operation of the trajectory point.

[0155] If there are multiple overflow areas without position error and pressure error during the dispensing process, and they correspond to the same template track point data on different workpieces, then it is judged that the dispensing pressure of these template track point data is too high.

[0156] If the overflow area is set to Region moreIf there is an overflow area that is not determined by the above three situations, it is determined that glue valve leaks glue during the dispensing process.

[0157] Specifically, in the present invention, the specific order of judging and executing displacement error diagnosis, positioning error diagnosis, glue shortage diagnosis and glue overflow diagnosis can be arbitrarily set according to actual needs, and the present invention does not limit this. Specifically, although the various diagnostic processes do not affect each other, since it is necessary to exclude the detection contour set of displacement errors when performing relevant diagnosis of dispensing defect quality issues such as glue shortage and glue overflow, it is preferred to arrange the displacement error diagnosis to be performed before the glue shortage diagnosis and glue overflow diagnosis. In addition, as long as the process of dividing the dispensing defect area into the glue shortage area and the glue overflow area is completed before the glue shortage diagnosis and the glue overflow diagnosis, its specific implementation order can also be set according to actual needs, and the present invention does not limit this.

[0158] In the present invention, a visual dispensing method with a self-diagnosis function is designed, which can record and store the positioning data, control data and feedback data calculated and fed back in the visual dispensing process, realize the detection and classification of dispensing defects, and realize the error cause discrimination of workpiece displacement problems, missed positioning and wrong positioning problems, as well as glue shortage problems and glue overflow problems based on the detection data after manual review, and perform standardized problem diagnosis in the process to achieve the purpose of accelerating the solution of problems. Especially for occasional problems, the diagnostic method provided by the present invention can easily reproduce the problem through the positioning data, control data and feedback data stored in the log data module, and accelerate the diagnosis and treatment of occasional problems.

[0159] To sum up, the visual dispensing method with self-diagnosis function proposed in the present invention enables the system to automatically store and analyze key data in the dispensing process through the self-diagnosis function, and quickly and accurately identify problems in the visual dispensing system, thereby greatly improving the efficiency and accuracy of problem diagnosis; and, the method described in the present invention can more effectively discover and solve quality problems in the dispensing process through the detection and classification of dispensing defects, thereby significantly improving the dispensing quality of the final product; in addition, the introduction of the self-diagnosis function in the method described in the present invention enables the system to quickly detect and repair when encountering usability problems, reducing the intervention of professional and technical personnel, thereby enhancing the reliability and stability of the system; and, the self-diagnosis function reduces the operator's dependence on professional and technical personnel, thereby reducing the overall maintenance cost of the system.

[0160] Therefore, the present invention not only improves the quality control and problem diagnosis capabilities of the dispensing process through the detection and classification of dispensing defects and the self-diagnosis function, but also improves the reliability of the system and the convenience of user operation, while helping to reduce the cost of long-term operation and maintenance.

[0161] Corresponding to the embodiment of the visual dispensing method with self-diagnosis function described above, the present invention also provides a visual dispensing system with self-diagnosis function.

[0162] like Fig.11 As shown, Fig.11 : is a schematic diagram of a visual dispensing system with a self-diagnosis function according to an embodiment of the present invention, comprising the following modules:

[0163] The visual module 1110 is used to collect a template image of a target workpiece, generate template data corresponding to the target workpiece, and the template data at least includes a template image of the target workpiece, a template contour graphic, and a template trajectory data set including a plurality of template trajectory point data for indicating dispensing; and collect a positioning image of a placed target workpiece to be dispensed, determine the positioning position of the target workpiece, and perform affine transformation on the template contour graphic and the template trajectory data set according to the positioning position, generate a positioning contour set and a positioning trajectory data set of the target workpiece, and generate a control trajectory data set according to the positioning trajectory data set;

[0164] The control module 1120 is used to perform glue dispensing processing on each track point of the target workpiece to be glued according to the control track data set, and read the position of the mechanical feedback to generate a feedback track data set;

[0165] The log data module 1130 is used to store and query the template data corresponding to the target workpiece, as well as the positioning data, control data and feedback data calculated and generated during the dispensing process; wherein the positioning data at least includes a positioning image, a positioning position, a positioning profile set and a positioning trajectory data set; the control data at least includes a control trajectory data set; and the feedback data at least includes a feedback trajectory data set;

[0166] The interactive module 1140 is used to display the data stored in the log data module and provide an interactive interface for template editing and manual review.

[0167] Specifically, in some embodiments, the structure of a visual dispensing system with a self-diagnosis function proposed in the present invention may also include a diagnostic module 1150, which is used to screen out the displaced detection image by comparing the detection contour set and the corresponding positioning contour set after the target workpiece is dispensing, and obtain the displaced detection contour set in the detection image; and in the detection image where no shift occurs, perform a difference operation on the detection image and the corresponding positioning image to obtain the dispensing defect area set of the detection image, and determine the unqualified detection contour set and the qualified detection contour set in the detection image according to the relative position relationship between the dispensing defect area set and the detection image.

[0168] Specifically, the vision module 1110 can also be used to collect the corresponding detection image after the target workpiece to be glued is completed, determine the detection position of the target workpiece, and perform affine transformation on the template contour graphic according to the detection position to generate a detection contour set of the target workpiece; the log data module 1130 can also be used to calculate the generated detection data and diagnostic data after the glue is completed; wherein the detection data at least includes a detection image, a detection position and a detection contour set; the diagnostic data at least includes a shifted detection contour set, a glue defect area set, a detection unqualified contour set and a detection qualified contour set.

[0169] Specifically, the visual module 1110 may be composed of a camera, a positioning algorithm, a visual guidance algorithm, and a detection algorithm. The visual module 1110 may be used to control the camera to collect the template image, positioning image, and detection image of the target workpiece, calculate and analyze the positioning data and control data of the visual dispensing process, and analyze the detection data after dispensing.

[0170] Specifically, the control module 1120 may be composed of a motion control card, a servo system with an encoder, a glue valve, an air pressure reversing control pump, an air pressure detection sensor, etc. It may be used to control output signals such as light source and glue valve switch and receive input signals such as buttons. It may also control the movement of the glue valve, change the glue valve air pressure, switch the glue valve, and delay waiting according to the control data calculated by the vision module 1110, and read the mechanical position of the glue valve recorded by the servo system encoder in real time after each control process is completed, and read the air pressure value of the glue valve recorded by the air pressure detection sensor to form feedback data.

[0171] Specifically, the log data module 1130 can be used to query and store the template data of the workpiece, query and store the positioning data, control numbers and feedback data calculated during the dispensing process, and query and store the detection data after dispensing, so as to facilitate the diagnosis module to analyze the problem.

[0172] Specifically, the interaction module 1140 can be used to provide an interactive interface for displaying images, displaying and drawing graphics, and editing template data and manually reviewing test results.

[0173] Specifically, the diagnostic module 1150 can also combine the detection data after manual review by the operator through the interactive module 1140 to provide classification of dispensing defect areas in the visual dispensing system, and identify the causes of workpiece displacement problems, missed positioning and mispositioning problems, as well as glue shortage and glue overflow problems.

[0174] Specifically, the interactive module 1140 can be used to display the detection image, the shift detection contour set, the dispensing defect area set, the detection unqualified contour set and the detection qualified contour set respectively for manual review; and the log data module 1130 can obtain the manual review results and update the dispensing defect area set, the detection unqualified contour set and the detection qualified contour set according to the manual review results.

[0175] Specifically, the above-mentioned manual review results may include: a set of mis-positioning contours corresponding to the detection images with missed positioning or positioning deviation; a set of missed-detection dispensing defect contours corresponding to the detection images with missed-detection dispensing defect areas; and a set of mis-detection dispensing defect areas corresponding to the detection images with mis-detection dispensing defect areas.

[0176] Specifically, the log data module 1130 updates the dispensing defect area set, the detection unqualified contour set and the detection qualified contour set according to the manual review results, which may specifically include: for the dispensing defect area set, eliminating the misdetected dispensing defect area set and the dispensing defect areas corresponding to the mispositioning contour set, and adding the missed dispensing defect contour set to obtain the reviewed dispensing defect area set; and re-determining the reviewed unqualified detection contour set and the detection qualified contour set based on the relative position relationship between the reviewed dispensing defect area set and the detection image.

[0177] Specifically, the diagnosis module 1150 can also perform positioning error diagnosis when the mispositioning contour set is not empty: use the union of the shift detection contour set, the mispositioning contour set, the unqualified detection contour set and the qualified detection contour set as the standard positioning contour set corresponding to the target workpiece; calculate the center position of the standard positioning contour set to obtain a standard positioning position data set; perform a cyclic matching test on the detection image using test matching similarities from large to small; if there is a test matching similarity whose matching result is equal to the standard positioning position data set, then the positioning error diagnosis result is determined to be that the matching similarity of the corresponding target workpiece is set too high; if the matching results of all test matching similarities are not equal to the standard positioning position data set, then the positioning error diagnosis result is determined to be that the matching template of the corresponding target workpiece is too different from the target workpiece.

[0178] Specifically, the diagnostic module 1150 can also perform shift error diagnosis when the shift detection profile set is not empty: obtain the template trajectory data set, determine the glue dispensing height of each trajectory point in the template trajectory data set, and compare and analyze the glue dispensing height with the workpiece thickness of the target workpiece; if the difference between the glue dispensing height and the workpiece thickness of the target workpiece is lower than a preset height difference threshold, then the shift error diagnosis result is determined to be that the glue dispensing height of the corresponding target workpiece is set too low; if the difference between the glue dispensing height and the workpiece thickness of the target workpiece is not lower than the preset height difference threshold, then the shift error diagnosis result is determined to be that a large vibration is generated during the glue dispensing process.

[0179] Specifically, when the glue defect area set is not empty, the diagnostic module 1150 can also divide the glue defect area set into a glue deficiency area set and a glue overflow area set according to the grayscale difference of the glue defect area set in the positioning image and the detection image; if the glue deficiency area set is not empty, a glue deficiency diagnosis is performed to confirm the cause of the glue deficiency problem; if the glue overflow area set is not empty, a glue overflow diagnosis is performed to confirm the cause of the glue deficiency problem.

[0180] Specifically, the above-mentioned glue deficiency diagnosis may include: calculating the intersection of the positioning trajectory data set and the glue deficiency area set to obtain the trajectory point data sequence number set corresponding to each glue deficiency area in the glue deficiency area set; comparing the trajectory point data sequence number set of the corresponding glue deficiency area in the positioning trajectory data set, the control trajectory data set and the feedback trajectory data set to obtain the position error and air pressure error of the glue valve corresponding to the glue deficiency area during the glue dispensing process; if the air pressure error of the glue valve corresponding to any glue deficiency area in the glue deficiency area set during the glue dispensing process is greater than a preset air pressure error threshold, then the glue deficiency diagnosis result is determined to be insufficient external air pressure during the glue dispensing process; if the position error of the glue valve corresponding to any glue deficiency area in the glue deficiency area set during the glue dispensing process is greater than a preset air pressure error threshold, then the glue deficiency diagnosis result is determined to be insufficient external air pressure during the glue dispensing process; If the position error is greater than the preset position error threshold, the glue shortage diagnosis result is determined to be that the control system signal interference occurs in the dispensing process of the trajectory point corresponding to the glue shortage area; if there are several glue shortage areas in the glue shortage area set, and the corresponding glue valves in the dispensing process have no position error and air pressure error, and the trajectory point data corresponding to the several glue shortage areas are the same, then the glue shortage diagnosis result is determined to be that the dispensing air pressure corresponding to the trajectory point data of the several glue shortage areas is too low; if there is any glue shortage area in the glue shortage area set, and the position error and air pressure error of the glue valve corresponding to the dispensing process are not greater than the position error threshold and the air pressure error threshold, and the trajectory point data corresponding to the glue shortage area is not determined to be that the dispensing air pressure is too low, then the glue shortage diagnosis result is determined to be that the glue valve is short of glue or glue is stuck during the dispensing process.

[0181] Specifically, the above-mentioned glue overflow diagnosis may include: calculating the intersection of the positioning trajectory data set and the glue overflow area set, and obtaining the trajectory point data sequence number set corresponding to each glue overflow area in the glue overflow area set; according to the trajectory point data sequence number set, comparing the trajectory point data of the corresponding glue overflow area in the positioning trajectory data set, the control trajectory data set and the feedback trajectory data set, and obtaining the position error and air pressure error of the glue valve corresponding to the glue overflow area during the glue dispensing process; if the air pressure error of the glue valve corresponding to any glue overflow area in the glue overflow area set during the glue dispensing process is greater than a preset air pressure error threshold, then the glue overflow diagnosis result is determined to be that the external air pressure is too high during the glue dispensing process; if the position error of the glue valve corresponding to any glue overflow area in the glue overflow area set during the glue dispensing process is greater than a preset air pressure error threshold, then the glue overflow diagnosis result is determined to be that the external air pressure is too high during the glue dispensing process; If the error is greater than the preset position error threshold, the glue overflow diagnosis result is determined to be that the control system signal interference occurs in the glue dispensing process at the trajectory point of the corresponding glue overflow area; if there are several glue overflow areas in the glue overflow area set, and the corresponding glue valves in the glue dispensing process have no position error and air pressure error, and the trajectory point data corresponding to the several glue overflow areas are the same, then the glue overflow diagnosis result is determined to be that the glue dispensing air pressure corresponding to the trajectory point data of the several glue overflow areas is too high; if there is any glue overflow area in the glue overflow area set, and the position error and air pressure error of the glue valve corresponding to the glue dispensing process are not greater than the position error threshold and the air pressure error threshold, and the trajectory point data corresponding to the glue overflow area is not determined to be that the glue dispensing air pressure is too low, then the glue overflow diagnosis result is determined to be that the glue valve leaks during the glue dispensing process.

[0182] The implementation process of the functions and effects of each module in the above system is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here.

[0183] For the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The system embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Those of ordinary skill in the art can understand and implement it without paying creative labor.

[0184] Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A visual dispensing method with self-diagnosis function, characterized in that: The method comprises: Acquire preset template data corresponding to the target workpiece, wherein the template data at least includes a template image of the target workpiece, a template contour graphic, and a template trajectory data set including a plurality of template trajectory point data for indicating dispensing; Acquire a positioning image of a target workpiece to be dispensed, determine the positioning position of the target workpiece, and perform affine transformation on the template contour graphic and the template trajectory data set according to the positioning position to generate a positioning contour set and a positioning trajectory data set of the target workpiece; A control trajectory data set is generated according to the positioning trajectory data set, and a dispensing process is performed on each trajectory point of the target workpiece to be dispensed according to the control trajectory data set, and the position of the mechanical feedback is read to generate a feedback trajectory data set.

2. The method according to claim 1, characterized in that The method further comprises: After the target workpiece to be glued is glued, a corresponding detection image is collected to determine the detection position of the target workpiece, and an affine transformation is performed on the template contour graphic according to the detection position to generate a detection contour set of the target workpiece; By comparing the detection contour set with the corresponding positioning contour set, the detection image with displacement is screened out to obtain the displacement detection contour set in the detection image; In the detection image where no displacement occurs, a difference operation is performed between the detection image and the corresponding positioning image to obtain a set of dispensing defect areas of the detection image, and based on the relative position relationship between the dispensing defect area set and the detection image, a set of unqualified detection contours and a set of qualified detection contours in the detection image are determined.

3. The method according to claim 2, characterized in that The method further comprises: The detection image, the displacement detection contour set, the dispensing defect area set, the unqualified detection contour set and the qualified detection contour set are displayed respectively for manual review; Obtain manual review results, and update the dispensing defect area set, the unqualified detection contour set, and the qualified detection contour set according to the manual review results.

4. The method according to claim 3, characterized in that The manual review results include: A set of mis-positioned contours corresponding to the detection image with missed positioning or positioning deviation; A set of missed-detection dispensing defect contours of the inspection image corresponding to the missed-detection dispensing defect area; A set of misdetected glue dispensing defect regions corresponding to the detection image having misdetected glue dispensing defect regions; The updating of the dispensing defect area set, the unqualified detection contour set and the qualified detection contour set according to the manual review result includes: For the set of dispensing defect regions, the set of misdetected dispensing defect regions and the dispensing defect regions corresponding to the set of mispositioned contours are eliminated, and the set of missed dispensing defect contours is added to obtain a verified set of dispensing defect regions; According to the relative positional relationship between the reviewed dispensing defect area set and the detection image, the reviewed unqualified detection contour set and the reviewed qualified detection contour set are re-determined.

5. The method according to claim 4, characterized in that The method further comprises: When the mis-positioned contour set is not empty, positioning error diagnosis is performed: The union of the displacement detection contour set, the mis-positioning contour set, the unqualified detection contour set and the qualified detection contour set is used as a standard positioning contour set corresponding to the target workpiece; Calculating the center position of the standard positioning contour set to obtain a standard positioning position data set; Performing a cyclic matching test on the detection image using a test matching similarity from large to small; If there is a test matching similarity whose matching result is equal to the standard positioning position data set, it is determined that the positioning error diagnosis result is that the matching similarity corresponding to the target workpiece is set too high; If all the matching results of the test matching similarities are not equal to the standard positioning position data set, it is determined that the positioning error diagnosis result is that the matching template corresponding to the target workpiece is too different from the target workpiece.

6. The method according to claim 2 or 4, characterized in that: The method further comprises: When the displacement detection profile set is not empty, performing displacement error diagnosis: Acquire the template trajectory data set, determine the glue dispensing height of each trajectory point in the template trajectory data set, and compare and analyze the glue dispensing height with the workpiece thickness of the target workpiece; If the difference between the dispensing height and the workpiece thickness of the target workpiece is lower than a preset height difference threshold, it is determined that the displacement error diagnosis result is that the dispensing height corresponding to the target workpiece is set too low; If the difference between the dispensing height and the workpiece thickness of the target workpiece is not lower than a preset height difference threshold, it is determined that the displacement error diagnosis result is that a large vibration effect is generated during the dispensing process.

7. The method according to claim 2 or 4, characterized in that: The method further comprises: When the glue dispensing defect area set is not empty, dividing the glue dispensing defect area set into a glue deficiency area set and a glue overflow area set according to the grayscale difference of the glue dispensing defect area set in the positioning image and the detection image; If the glue-deficient area set is not empty, performing glue-deficient diagnosis to confirm the cause of the glue-deficient problem; If the glue overflow area set is not empty, glue overflow diagnosis is performed to confirm the cause of the glue shortage problem.

8. The method according to claim 7, characterized in that The glue deficiency diagnosis includes: Calculate the intersection of the positioning trajectory data set and the glue-deficient area set to obtain a trajectory point data sequence number set corresponding to each glue-deficient area in the glue-deficient area set; According to the trajectory point data sequence number set, the trajectory point data corresponding to the glue-deficient area in the positioning trajectory data set, the control trajectory data set, and the feedback trajectory data set are compared to obtain the position error and air pressure error of the glue valve corresponding to the glue-deficient area during the dispensing process; If the air pressure error of the glue valve corresponding to any of the glue-deficient areas in the glue-deficient area set during the glue dispensing process is greater than a preset air pressure error threshold, then the glue-deficient diagnosis result is determined to be insufficient external air pressure during the glue dispensing process; If the position error of the glue valve corresponding to any of the glue-deficient areas in the glue-deficient area set during the glue dispensing process is greater than a preset position error threshold, the glue-deficient diagnosis result is determined as control system signal interference at the trajectory point corresponding to the glue-deficient area during the glue dispensing process; If there are some glue-deficient areas in the glue-deficient area set whose corresponding glue valves have no position error and air pressure error during the glue dispensing process, and the track point data corresponding to the some glue-deficient areas are the same, then it is determined that the glue-deficient diagnosis result is that the glue dispensing air pressure corresponding to the track point data corresponding to the some glue-deficient areas is too low; If there is any glue-deficient area in the glue-deficient area set, and the position error and air pressure error of the glue valve corresponding to the glue dispensing process are not greater than the position error threshold and the air pressure error threshold, and the trajectory point data corresponding to the glue-deficient area is not determined as the glue dispensing air pressure is too low, then the glue-deficient diagnosis result is determined to be that the glue valve is short of glue or glue is stuck during the glue dispensing process.

9. The method according to claim 7, characterized in that: The glue overflow diagnosis includes: Calculate the intersection of the positioning trajectory data set and the glue overflow area set to obtain a trajectory point data sequence number set corresponding to each glue overflow area in the glue overflow area set; According to the trajectory point data sequence number set, the trajectory point data corresponding to the overflow area in the positioning trajectory data set, the control trajectory data set, and the feedback trajectory data set are compared to obtain the position error and air pressure error of the glue valve corresponding to the overflow area during the dispensing process; If the air pressure error of the glue valve corresponding to any of the glue overflow areas in the glue overflow area set during the glue dispensing process is greater than a preset air pressure error threshold, then the glue overflow diagnosis result is determined to be that the external air pressure is too high during the glue dispensing process; If there is any glue overflow area in the glue overflow area set whose corresponding glue valve position error during the glue dispensing process is greater than a preset position error threshold, the glue overflow diagnosis result is determined as control system signal interference at the trajectory point corresponding to the glue overflow area during the glue dispensing process; If there are several glue overflow areas in the glue overflow area set whose corresponding glue valves have no position error and air pressure error during the glue dispensing process, and the trajectory point data corresponding to the several glue overflow areas are the same, then it is determined that the glue overflow diagnosis result is that the glue dispensing air pressure corresponding to the trajectory point data corresponding to the several glue overflow areas is too high; If there is any overflow area in the overflow area set, and the position error and air pressure error of the glue valve corresponding to the overflow area during the dispensing process are not greater than the position error threshold and the air pressure error threshold, and the trajectory point data corresponding to the overflow area is not determined as the dispensing air pressure is too low, then the overflow diagnosis result is determined to be glue leakage from the glue valve during the dispensing process.

10. A visual dispensing system with self-diagnosis function, characterized in that: The system comprises: A visual module is used to collect a template image of a target workpiece, generate template data corresponding to the target workpiece, the template data at least including the template image of the target workpiece, a template contour graphic, and a template trajectory data set including a plurality of template trajectory point data for indicating dispensing; and collect a positioning image of a placed target workpiece to be dispensed, determine the positioning position of the target workpiece, and perform affine transformation on the template contour graphic and the template trajectory data set according to the positioning position, generate a positioning contour set and a positioning trajectory data set of the target workpiece, and generate a control trajectory data set according to the positioning trajectory data set; A control module, used for performing glue dispensing processing on each track point of the target workpiece to be glued according to the control track data set, and reading the position of mechanical feedback to generate a feedback track data set; A log data module, used to store and query the template data corresponding to the target workpiece, as well as the positioning data, control data and feedback data calculated and generated during the dispensing process; wherein the positioning data at least includes the positioning image, the positioning position, the positioning profile set and the positioning trajectory data set; the control data at least includes the control trajectory data set; and the feedback data at least includes the feedback trajectory data set; The interactive module is used to display the data stored in the log data module and provide an interactive interface for template editing and manual review.

Citation Information

Cited By

  • Multi-point dispensing correction method

    CN119456329A

  • Real-time online detection method and system for glue hanging of dispensing nozzle

    CN119902298A