Online fast programming method for plug-in machine

Through the online fast programming method, using mouse click and camera mobile technology, the fast and accurate programming of PCB plug-in machines is achieved, solving the problems of cumbersome and high cost in the existing technology, and reducing programming difficulty and time cost.

CN119781758APending Publication Date: 2025-04-08SHENZHEN ZHONGHEXU PRECISION MACHINERY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411821039.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The existing PCB plug-in computers are cumbersome to program and are prone to errors, and have high requirements for programmers and high production costs.

Method used

It provides an online fast programming method for plug-in machines. The coordinates when the mouse clicks the image in the main interface are converted into the actual position of the PCB, and the camera is controlled to move to the PCB position corresponding to the image clicked by the mouse, set the starting point position, end point position, movement step length and number of times of the camera shooting, obtain and splice the image, and the user manually selects the plug-in points, the system searches for matching plug-in holes, and sorts and proofs all plug-in holes to generate a plug-in diagram.

Benefits of technology

It realizes the fast, accurate and low cost of plug-in programming, reduces the difficulty of manual operation, improves operation efficiency, reduces the programming difficulty and time cost of programmers, and improves the accuracy of plug-in hole editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781758A_ABST
    Figure CN119781758A_ABST
Patent Text Reader

Abstract

The present invention discloses an online fast programming method for an insertion machine, which controls a camera to move to a PCB position corresponding to an image clicked by a mouse through the insertion machine, and controls the camera to shoot from a starting position to an end position to obtain a shot image, and then automatically splices the shot image into a PCB full-page image, and then manually selects a plug-in point on the PCB full-page image, controls the camera to obtain a plug-in point image, searches for a plug-in hole matching the plug-in point image based on the plug-in point image, so as to realize the setting of the plug-in hole in the PCB full-page image, and sorts and proofreads all the set plug-in holes to generate a plug-in schematic diagram, so that the operation programming can be completed more quickly, accurately and simply.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of PCB plug-in intelligent programming, and in particular to an online fast programming method for a plug-in machine. Background Art

[0002] The plug-in machine is a mechanical device that automatically and standardly inserts some regular electronic components into the conductive through holes of the PCB. To achieve the automatic and standard insertion of electronic components, the plug-in machine needs to perform programmed operations according to the position of the electronic components. In the existing PCB plug-in machine market, most plug-in machines are still in the stage of manual programming. Not only are there problems such as cumbersome programming and prone to errors, but also high requirements for programmers and high production costs. Therefore, how to make the programming of the plug-in machine fast, accurate and low-cost has become an objective demand. Summary of the invention

[0003] The invention provides an online programming method for an inserter, which is used to solve the problems that the existing inserter programming is complicated, prone to errors and high in cost.

[0004] To achieve the purpose of the present invention, the present invention provides an online fast programming method for a plug-in machine, the method comprising the following steps:

[0005] a. Convert the coordinates of the image on the main interface when the mouse is clicked into the actual position of the PCB. Based on the deviation between the actual position and the current position of the camera, control the camera to move to the PCB position corresponding to the image clicked by the mouse.

[0006] b. Set the starting position, end position, step length and number of movement of the camera. Based on the step length and number of movement of the camera, control the camera to shoot from the starting position to the end position, obtain the captured images, and automatically stitch the captured images into a full-page image of the PCB.

[0007] c. The user manually selects a plug-in point on the image, the camera acquires the plug-in point image, searches for a matching plug-in hole based on the plug-in point image, and then adds the matching plug-in hole to the plug-in process and displays it in the main interface image;

[0008] d. Sort all the plug-in holes in the main interface image to form a plug-in route;

[0009] e. Click on the automatic calibration in the main interface to calibrate the plug-in hole, and after the calibration is completed, a schematic diagram of the PCB plug-in is formed;

[0010] f. The plug-in machine performs plug-in operations according to the PCB plug-in schematic diagram.

[0011] Further, step a comprises:

[0012] a1. When the mouse double-clicks the image on the camera imaging interface, the system obtains the coordinates of the current mouse relative to the image control displayed on the screen;

[0013] a2. The acquired coordinates are calculated in pixels of the screen according to the length and width of the control that displays the image, the length and width of the image, and the position of the image display to calculate the position of the mouse click coordinates on the image;

[0014] a3. According to the pixel accuracy obtained by camera calibration, the image coordinates of the mouse click are converted into actual distance, the deviation value between the actual position corresponding to the click position and the current position is calculated, and the camera is moved according to the deviation value to move the camera to the PCB position corresponding to the image clicked by the mouse.

[0015] Step b includes:

[0016] b1. Move the mouse to move the camera to the corner and diagonal positions of the PCB in turn and obtain the coordinates of the two positions to set the shooting start and end positions;

[0017] b2. Determine the step length and number of moves, as well as the size of the stitched image, according to the resolution of the image acquired by the camera;

[0018] b3. Control the camera to move from the starting position to the end position to take pictures, reduce the image through the regional interpolation algorithm, and fill the reduced image into the corresponding area of ​​the main interface to form a spliced ​​image;

[0019] b4. Cut off the redundant parts at the starting point and the end point of the spliced ​​image to obtain the full-page image of the PCB.

[0020] Furthermore, in step b3, during the camera movement and line switching process, the camera moves in an odd-numbered line in a direction opposite to that in an even-numbered line.

[0021] Step c includes:

[0022] c1. The user double-clicks the approximate position where the plug-in hole needs to be selected on the main interface with the mouse, so that the camera moves to the corresponding position and acquires images in real time;

[0023] c2. The camera processes the acquired image in real time, removes the plug-in holes that are too large or too small, sorts the remaining plug-in holes according to their distance from the camera center, obtains the two plug-in holes closest to the center, searches for plug-ins that match the plug-in hole information, and calculates the angle and spacing based on the plug-in hole position and displays them in the plug-in hole information on the main interface;

[0024] c3. The obtained plug-in hole is highlighted in the image screen, added to the plug-in process, and displayed at the corresponding position in the main interface image;

[0025] c4. Repeat steps c1-c3 until all the plug-in holes in the full-page image are set.

[0026] In some embodiments, in step c, when the PCB full-page image is composed of multiple repeated panels arranged horizontally and vertically in an array, the plug-in holes on one panel can be first obtained, and then the panel can be copied to obtain the plug-in holes of the full-page image.

[0027] Furthermore, the method for copying the imposition includes:

[0028] c101. Double-click a certain position of the first panel on the image in the main interface with the mouse as the first point of the panel, so that the camera moves to the corresponding position;

[0029] c102. Double-click the position corresponding to the first point in the last mosaic on the image of the main interface as the last point of the mosaic, so that the camera moves to the corresponding position;

[0030] c103. After clicking on the box selection, hold down the mouse and drag on the main interface image to select the plug-in hole to be copied, and you can select and adjust multiple times;

[0031] c104. Enter the number of rows and columns of the imposition in the main interface, click Copy, and copy the selected plug-in holes to the imposition without set plug-in holes to complete the setting of the plug-in holes for the entire page image.

[0032] In step d, the plug-in holes can be manually sorted. Click on the existing plug-in hole positions in the main interface image, and the system will sort the plug-in hole positions in the order of clicks;

[0033] Or the system uses a nearest neighbor algorithm to sort all the plug-in holes in the imposition.

[0034] In some embodiments, before executing step f, the method further includes the following steps:

[0035] g. Perform single-point or double-point deviation correction on the plug-in hole;

[0036] If single-point deflection correction is performed on the plug-in hole, the camera moves to the first hole position in front of the plug-in to obtain an image, recognizes the image and obtains the deviation from the set position, and compensates for the deviation value when the PCB is plugged in;

[0037] If dual-point deflection correction is performed on the plug-in hole, the camera moves to the first and last hole positions in turn before the plug-in for image recognition and obtains the deviation values ​​of the two hole positions respectively, and calculates the position and angle deviation of the PCB, and compensates the deviation value when the plug-in is performed.

[0038] In some embodiments, if some bad impositions are to be skipped, before executing step f, the following steps are further included:

[0039] h. Pre-block the first plug-in hole in the plug-in panel that needs to be skipped, and click Automatically skip the panel in the main interface. The camera will move to the first hole position of each panel in turn for detection before the plug-in. If the plug-in hole is not recognized, the panel will be marked and displayed in the main interface. The marked panel will be skipped during the plug-in.

[0040] The beneficial effects of the present invention are as follows: the present invention manually selects plug-in points on the PCB full-page image, controls the camera to obtain the plug-in point image, searches for matching plug-in holes based on the plug-in point image, so as to realize the setting of the plug-in holes in the PCB full-page image, and sorts and proofreads all the set plug-in holes to generate a plug-in schematic diagram, so that the operation programming can be completed more quickly, accurately and simply.

[0041] On the other hand, the present invention obtains the plug-in matching the plug-in hole information by searching, which reduces the difficulty of manual operation of the equipment, improves the operation efficiency, makes the plug-in hole position data editing simple and efficient, and reduces the programming difficulty of the plug-in hole position programmer as a whole, reduces the editing time cost of the plug-in hole position programming, and improves the accuracy of plug-in hole position editing. At the same time, by sorting the plug-in holes, the verification efficiency of the automatic correction of the plug-in hole position is improved, so that the time for verification and correction is further reduced.

[0042] In addition, when the PCB is composed of multiple panels, the matrix fast panelization method is used to ensure the efficiency of position information editing, so that complex panel position information can be generated quickly, further improving programming efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flow chart of the method of the present invention.

[0044] Figure 2 It is a schematic diagram of the main interface of the present invention.

[0045] Figure 3 It is a schematic diagram of the main interface of the present invention executing step S30. DETAILED DESCRIPTION

[0046] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0047] See also Figure 1 The online fast programming method of the plug-in machine of this embodiment is based on the user's operation in the main interface, where, Figure 2As shown, the main interface includes a control interface for implementing various operations and a camera capture interface for displaying images taken by the camera, wherein the control interface can be set according to actual needs. The method is used to generate a PCB plug-in schematic diagram online according to a PCB board, and perform plug-in operations based on the plug-in schematic diagram, which includes the following steps:

[0048] S10, the plug-in machine controls the camera to move to the PCB position corresponding to the image clicked by the mouse.

[0049] In this step, the coordinates of the image on the main interface when the mouse is clicked are first converted into the actual position of the PCB. Based on the deviation between the actual position and the current position of the camera, the system controls the camera to move to the PCB position corresponding to the image clicked by the mouse.

[0050] Specifically, the step includes:

[0051] S101. When the mouse double-clicks the image on the camera imaging interface, the system obtains the coordinates of the current mouse relative to the image control displayed on the screen.

[0052] S102: Taking the acquired coordinates as the unit of screen display pixels, and calculating the position of the mouse click coordinates on the image according to the length and width of the control displaying the image, the length and width of the image, and the position of the image display.

[0053] S103, according to the pixel accuracy obtained by camera calibration, convert the image coordinates of the mouse click into the actual position of the PCB, calculate the deviation value between the actual position and the current position of the camera, and then move the camera according to the deviation value to move the camera to the PCB position corresponding to the image clicked by the mouse.

[0054] S20, controlling the camera to shoot from the starting position to the end position, acquiring the shot images, and automatically stitching the shot images into a full-page image of the PCB.

[0055] In this step, the starting and ending positions of the camera shooting are first set, and the number of movements is calculated according to the step length of the camera movement. The camera is controlled to shoot from the starting position to the end position, the captured image is obtained, and the captured image is automatically spliced ​​into a full-page image of the PCB.

[0056] Specifically, the step includes:

[0057] S201, by moving the mouse, the camera is moved to the corner position and the diagonal position of the PCB in turn, and the coordinates of the two positions are obtained, so as to set the starting position and the end position of the shooting.

[0058] S202: Determine the step length and the number of movements, as well as the size of the spliced ​​image according to the resolution of the image acquired by the camera.

[0059] In this step, the step length of the camera movement is determined according to the resolution of the image acquired by the camera and the size of the PCB, the number of times the camera needs to move is calculated, and the size of the stitched image is calculated according to the size of the camera imaging interface.

[0060] S203, controlling the camera to move from the starting position to the end position to take a picture, reducing the image by using a regional interpolation algorithm, and filling the reduced image into a corresponding area of ​​the main interface to form a spliced ​​image.

[0061] In this step, the camera is controlled to start taking pictures from the starting position to acquire images, and the image is acquired according to the set step length moving position, the acquired image is reduced by the regional interpolation algorithm according to the size of the spliced ​​image, and the reduced image is filled into the image area of ​​the main interface to form a spliced ​​image. This embodiment reduces the image by the regional interpolation algorithm, which can reduce memory usage, thereby improving the efficiency of the puzzle. When the camera changes lines to take pictures, the camera can be moved in the opposite direction of the direction in the odd-numbered rows to the direction in the even-numbered rows, that is, the camera moves from the beginning of the first row to the end of the first row, and then continues to move down to the end of the second row, and then moves from the end of the second row to the beginning of the second row, and the beginning of the second row moves down to the beginning of the third row, and so on, until the camera moves to the end position, thereby shortening the camera movement distance and greatly reducing the camera shooting time.

[0062] S204, cutting off the redundant parts at the starting point and the end point of the spliced ​​image to obtain a full-page PCB image.

[0063] In this step, the stitched image obtained in step S203 is processed, and the redundant parts at the starting position and the end position of the stitched image are cut off to obtain the PCB full-page image, and the PCB full-page image is displayed in the camera imaging interface of the main interface.

[0064] S30, the user manually selects a plug-in point on the image, the camera obtains the plug-in point image, searches for a plug-in hole matching the plug-in point image, and then adds the matching plug-in hole to the plug-in process and displays it in the main interface image.

[0065] In this step, if Figure 3 As shown, the user manually selects the plug-in point of the desired plug-in on the image of the main interface with the mouse, the camera moves to the corresponding plug-in point position and captures the image in real time, the system obtains the plug-in hole information based on the captured image, searches for the plug-in matching the plug-in hole information, and then adds the matching plug-in hole to the plug-in process and displays it in the main interface image. In this embodiment, by manually selecting the plug-in point on the image, the needs of highly personalized plug-ins can be met, which is particularly suitable for plug-ins of PCBs where some plug-in holes need to be left blank.

[0066] Specifically, the step includes:

[0067] S301. The user manually double-clicks the approximate position where the plug-in hole needs to be selected on the main interface with the mouse, so that the camera moves to the corresponding position and acquires images in real time.

[0068] S302, the system processes the image acquired by the camera in real time, removes the plug-in holes that are too large or too small, sorts the remaining plug-in holes according to the distance from the camera center, obtains the two plug-in holes closest to the center, and then searches for plug-ins that match the plug-in hole information, and calculates the angle and spacing based on the plug-in hole position and displays them in the plug-in hole information on the main interface.

[0069] In this step, if Figure 3 As shown, the plug-in matching the plug-in hole information can be obtained by automatic search or manual search. Among them, when searching by automatic search, the plug-in information is determined by comparing the hole center distance and angle of the camera center screen with the saved component data. When searching by manual search, click conditional search, search the plug-in information in the main interface by setting information conditions such as angle, number of pins, hole spacing, hole diameter, station number, type, position number, etc., obtain the plug-in holes that meet the conditions according to the set angle and hole spacing in the plug-in holes after preliminary screening, and update the angle and hole spacing information of the plug-in hole. This embodiment obtains the plug-in matching the plug-in hole information by searching, which reduces the difficulty of manual operation of the equipment, improves the operation efficiency, and makes the data editing of the plug-in hole simple and efficient. At the same time, the accuracy and completeness of the position information acquisition are guaranteed by conditional and automatic search, so that the accuracy and completeness of the plug-in hole position information are further improved.

[0070] In this embodiment, the plug-in type and position information are obtained by obtaining the plug-in points in the PCB image. Among them, when obtaining the plug-in points in the PCB image, since the plug-in is a standard plug-in, the number of pins, angle, hole spacing and hole diameter in each plug-in are fixed. Therefore, the corresponding plug-in type information and plug-in position information (such as the center point position of the plug-in and the angle of the plug-in, etc.) can be obtained according to the number, angle, hole spacing and hole diameter of adjacent plug-in points. For example, when the plug-in is a three-pin plug-in or a two-pin plug-in, different plug-in types can be determined based on the different spacings between the plug-in pins, and the plug-in position can be determined based on the angle of the connection line between the plug-in points. If there are two plug-ins with the same plug-in point spacing, it can be reminded to manually determine the plug-in type.

[0071] Specifically, if the first plug-in hole of the image is detected, all second plug-in holes within a set distance from the first plug-in hole can be queried based on the position of the first plug-in hole, and the distances between all second plug-in holes and the first plug-in hole can be obtained to determine the second plug-in hole paired with the first plug-in hole. If the pairing of the second plug-in hole and the first plug-in hole is unique, the plug-ins corresponding to the first plug-in hole and the second plug-in hole are directly set as two-pin plug-ins.

[0072] If the plug-in is judged to be a three-pin plug-in based on the distance between the first plug-in hole and the second plug-in hole, it is determined whether there is a third plug-in hole within a set distance around the second plug-in hole. If there is a third plug-in hole, the plug-ins corresponding to the first plug-in hole, the second plug-in hole and the third plug-in hole are directly set as three-pin plug-ins.

[0073] If there are more than two matching second plug-in holes around the first plug-in hole, the second plug-in hole is used as a reference to determine the matching first plug-in hole (with the same hole diameter) around the second plug-in hole. If the first plug-in hole corresponding to the second plug-in hole is unique, the plug-in corresponding to the first plug-in hole and the second plug-in hole is set as a two-pin plug-in. The same method is used to determine the plug-in types corresponding to all plug-in holes. When there are first plug-in holes and second plug-in holes that cannot be determined, they are highlighted in the image to facilitate user inspection and confirmation. When the plug-in type of the plug-in hole is determined, the determined plug-in hole is removed from the plug-in holes to be confirmed, and then all plug-in holes to be confirmed are traversed to complete the plug-in type to which each plug-in point in the PCB image belongs.

[0074] S303: The obtained plug-in hole is highlighted in the image screen, added to the plug-in process, and displayed at the corresponding position in the main interface image.

[0075] In this step, the determined plug-in holes are highlighted and displayed in the main interface image, so that the user can observe the set plug-in holes easily, thereby improving work efficiency.

[0076] S304, repeating steps S301-S303 until the setting of all plug-in holes in the full-page image is completed.

[0077] In some embodiments, when the PCB full-page image is composed of multiple repeated panels arranged horizontally and vertically in an array, the plug-in holes on one panel can be set first, and then the panel can be copied to complete the setting of the plug-in holes of the full-page image. This embodiment ensures the efficiency of editing the plug-in hole position information through the matrix fast panelization method, so that the plug-in hole position information of the complex panel can be quickly generated.

[0078] Specifically, the method of copying the imposition includes:

[0079] S311. When the plug-in hole of the first plate is set, double-click a certain position of the first plate on the image of the main interface with the mouse as the plate-forming first point, so that the camera moves to the corresponding position.

[0080] In this step, first set the plug-in hole of the first panel in the upper left corner of the image, double-click somewhere on the first panel in the upper left corner on the image on the main interface to move the camera to the corresponding position as the mark point. At the same time, you can double-click the mark point in the image acquisition interface to adjust the position to make it more accurate, and click the mark point to obtain the first point.

[0081] S312. Double-click the position corresponding to the first point in the last piece of the mosaic on the image of the main interface as the last point of the mosaic, move the camera to the corresponding position, and adjust the position to make it more accurate to obtain the last point.

[0082] S313. After clicking on the frame selection, hold down the mouse and drag on the main interface image to frame the plug-in hole to be copied, and frame selection can be adjusted multiple times.

[0083] S314. Enter the number of rows and columns of the imposition in the main interface and click Copy to copy the selected plug-in holes to the imposition without setting plug-in holes, thus completing the setting of the plug-in holes for the whole page image.

[0084] S40, sorting all the plug-in holes in the main interface image to form a plug-in route.

[0085] In this step, after the setting of the plug-in holes of the whole page image is completed, it is necessary to sort all the plug-in holes in the image to form a plug-in route to facilitate subsequent plug-in operations.

[0086] Specifically, the plug-in holes can be sorted by manual sorting or automatic sorting. When the manual method is used for sorting, click the existing plug-in holes in the main interface image in sequence with the mouse, and the system will sort the plug-in holes in the order of clicking. When the automatic method is used for sorting, click automatic sorting, and the system will use the nearest neighbor algorithm to sort all the plug-in holes in the whole page. When the whole page is composed of multiple panels, when sorting by the automatic method, the system will use the nearest neighbor algorithm to sort all the plug-in holes of the first panel, and then copy them to other panels. Among them, when adjacent panel plug-in holes are connected, odd-numbered rows of panels are sorted forward, and even-numbered rows of panels are sorted reversely. That is, when the plug-in holes of adjacent odd-numbered rows are connected, the end point of the plug-in hole of the previous panel is connected to the starting point of the plug-in hole of the next panel; when the plug-in holes of adjacent even-numbered rows are connected, the starting point of the plug-in hole of the previous panel is connected to the end point of the plug-in hole of the next panel; the end point of the plug-in hole of the last panel of the odd row is connected to the end point of the plug-in hole of the adjacent first panel of the even row; the starting point of the plug-in hole of the last panel of the even row is connected to the starting point of the plug-in hole of the adjacent first panel of the odd row. Through the above-mentioned plug-in hole sorting method, the moving distance when plugging in between panels can be greatly reduced, thereby improving the plug-in efficiency. In addition, the present invention improves the verification efficiency of the automatic correction of the plug-in hole position by sorting the plug-in holes, so that the time for verification and correction is further reduced. At the same time, the programming difficulty of the plug-in hole position programmer is reduced as a whole, the editing time cost of the plug-in hole position programming is reduced, and the accuracy of the plug-in hole position editing is improved.

[0087] S50. Click on the automatic calibration in the main interface to calibrate the above plug-in holes. After the calibration is completed, a PCB plug-in schematic diagram is formed.

[0088] In this step, after clicking on the automatic calibration, the system traverses all the plug-in points according to the set plug-in hole sequence. When the plug-in point is reached, the image of the plug-in point is acquired through the camera and image processing is performed to identify and preliminarily screen all the plug-in hole positions. Then the obtained plug-in hole positions are sorted according to the distance from the two set plug-in hole positions, and two sorted lists are obtained, corresponding to the two plug-in holes. Starting from the two holes closest to the set hole position, the screening is performed according to the set hole spacing and angle, the two closest holes are obtained, and the set position, angle and spacing are updated according to the two holes until the calibration of all plug-in points is completed to obtain the PCB plug-in schematic diagram.

[0089] S60, the plug-in machine performs plug-in operation according to the PCB plug-in schematic diagram.

[0090] In this step, the plug-in machine performs the plug-in operation according to the obtained plug-in schematic diagram. In some embodiments, before the plug-in operation is performed, the plug-in hole can also be subjected to single-point or double-point deflection correction. Specifically, when performing single-point deflection correction, click single-point deflection correction in the main interface, and the system controls the camera to move to the first plug-in hole position in front of the plug-in to obtain an image, identify the image and obtain the deviation from the set position. When the PCB is plugged in, this deviation value will be compensated to make the plug-in more accurate. When performing double-point deflection correction, the system controls the camera to move to the first and last plug-in holes in front of the plug-in in turn to perform image recognition to obtain the deviation values ​​of the two plug-in holes respectively, to calculate the position and angle deviation of the PCB, and compensate the deviation value during the plug-in. Through double-point deflection correction, the angle deviation of the PCB can be obtained, so the position and angle deviation of the plug-in hole caused by the PCB angle can be compensated, making the plug-in more accurate. During the plug-in operation, single-point deflection correction or double-point deflection correction can be selected according to actual needs.

[0091] In some embodiments, when performing a plug-in operation, if you want to skip some bad panels, you need to perform a skipping operation. Specifically, cover the first plug-in hole in the plug-in panel that needs to be skipped in advance, click on the automatic skipping button on the main interface, and the camera before the plug-in will move to the first hole position of each panel in turn for detection. If the plug-in hole is not recognized, the panel will be marked and displayed on the main interface. The marked panel will be skipped during the plug-in operation, thereby achieving the skipping operation.

[0092] The online fast programming method of the plug-in machine of this embodiment manually selects the plug-in point on the whole-page image of the PCB, controls the camera to obtain the plug-in point image, searches for the plug-in hole matching it based on the plug-in point image, so as to realize the setting of the plug-in hole in the whole-page image of the PCB, and sorts and proofreads all the set plug-in holes to generate a plug-in schematic diagram, which can make the job programming more rapid, accurate and simple to complete.

[0093] On the other hand, the present invention obtains the plug-in matching the plug-in hole information by searching, which reduces the difficulty of manual operation of the equipment, improves the operation efficiency, makes the plug-in hole position data editing simple and efficient, and reduces the programming difficulty of the plug-in hole position programmer as a whole, reduces the editing time cost of the plug-in hole position programming, and improves the accuracy of plug-in hole position editing. At the same time, by sorting the plug-in holes, the verification efficiency of the automatic correction of the plug-in hole position is improved, so that the time for verification and correction is further reduced.

[0094] In addition, when the PCB is composed of multiple panels, the matrix fast panelization method is used to ensure the efficiency of position information editing, so that complex panel position information can be generated quickly, further improving programming efficiency.

[0095] Although the present invention is disclosed through the above embodiments, the protection scope of the present invention is not limited thereto. Without departing from the concept of the present invention, any deformation, replacement, etc. made to the above components shall fall within the scope of the claims of the present invention.

Claims

1. A method for online rapid programming of a plug-in machine, characterized in that: The method comprises the following steps: a. Convert the coordinates of the image on the main interface when the mouse is clicked into the actual position of the PCB. Based on the deviation between the actual position and the current position of the camera, control the camera to move to the PCB position corresponding to the image clicked by the mouse. b. Set the starting position, end position, step length and number of movement of the camera. Based on the step length and number of movement of the camera, control the camera to shoot from the starting position to the end position, obtain the captured images, and automatically stitch the captured images into a full-page image of the PCB. c. The user manually selects a plug-in point on the image, the camera acquires the plug-in point image, searches for a matching plug-in hole based on the plug-in point image, and then adds the matching plug-in hole to the plug-in process and displays it in the main interface image; d. Sort all the plug-in holes in the main interface image to form a plug-in route; e. Click on the automatic calibration in the main interface to calibrate the plug-in hole, and after the calibration is completed, a schematic diagram of the PCB plug-in is formed; f. The plug-in machine performs plug-in operations according to the PCB plug-in schematic diagram.

2. The online rapid programming method of the plug-in machine as claimed in claim 1, characterized in that: Step a includes: a1. When the mouse double-clicks the image on the camera imaging interface, the system obtains the coordinates of the current mouse relative to the image control displayed on the screen; a2. The acquired coordinates are calculated in pixels of the screen according to the length and width of the control that displays the image, the length and width of the image, and the position of the image display to calculate the position of the mouse click coordinates on the image; a3. According to the pixel accuracy obtained by camera calibration, the image coordinates of the mouse click are converted into actual distance, the deviation value between the actual position corresponding to the click position and the current position is calculated, and the camera is moved according to the deviation value to move the camera to the PCB position corresponding to the image clicked by the mouse.

3. The online rapid programming method of the plug-in machine as claimed in claim 1, characterized in that: Step b includes: b1. Move the mouse to move the camera to the corner and diagonal positions of the PCB in turn and obtain the coordinates of the two positions to set the shooting start and end positions; b2. Determine the step length and number of moves, as well as the size of the stitched image, according to the resolution of the image acquired by the camera; b3. Control the camera to move from the starting position to the end position to take pictures, reduce the image through the regional interpolation algorithm, and fill the reduced image into the corresponding area of ​​the main interface to form a spliced ​​image; b4. Cut off the redundant parts at the starting point and the end point of the spliced ​​image to obtain the full-page image of the PCB.

4. The online rapid programming method of the plug-in machine as claimed in claim 3, characterized in that: In step b3, during the camera movement line-changing process, the camera moves in the odd-numbered lines in the opposite direction to the camera moves in the even-numbered lines.

5. The online rapid programming method of the plug-in machine as claimed in claim 1, characterized in that: Step c includes: c1. The user double-clicks the approximate position where the plug-in hole needs to be selected on the main interface with the mouse, so that the camera moves to the corresponding position and acquires images in real time; c2. The camera processes the acquired image in real time, removes the plug-in holes that are too large or too small, sorts the remaining plug-in holes according to their distance from the camera center, obtains the two plug-in holes closest to the center, searches for plug-ins that match the plug-in hole information, and calculates the angle and spacing based on the plug-in hole position and displays them in the plug-in hole information on the main interface; c3. The obtained plug-in hole is highlighted in the image screen, added to the plug-in process, and displayed at the corresponding position in the main interface image; c4. Repeat steps c1-c3 until all the plug-in holes in the full-page image are set.

6. The online rapid programming method of the plug-in machine as claimed in claim 5, characterized in that: In step c, when the PCB full-page image is composed of multiple repeated panels arranged horizontally and vertically in an array, the plug-in holes on one panel can be first obtained, and then the panel can be copied to obtain the plug-in holes of the full-page image.

7. The online rapid programming method of the plug-in machine as claimed in claim 6, characterized in that: Methods for duplicating a layout include: c101. Double-click a certain position of the first panel on the image in the main interface with the mouse as the first point of the panel, so that the camera moves to the corresponding position; c102. Double-click the position corresponding to the first point in the last mosaic on the image of the main interface as the last point of the mosaic, so that the camera moves to the corresponding position; c103. After clicking on the box selection, hold down the mouse and drag on the main interface image to select the plug-in hole to be copied, and you can select and adjust multiple times; c104. Enter the number of rows and columns of the imposition in the main interface, click Copy, and copy the selected plug-in holes to the imposition without set plug-in holes to complete the setting of the plug-in holes for the entire page image.

8. The online rapid programming method of the plug-in machine as claimed in claim 1, characterized in that: In step d, the plug-in holes can be manually sorted. Click on the existing plug-in hole positions in the main interface image, and the system will sort the plug-in hole positions in the order of clicks; Or the system uses a nearest neighbor algorithm to sort all the plug-in holes in the imposition.

9. The online rapid programming method of the plug-in machine as claimed in claim 1, characterized in that: Before executing step f, the method further includes the following steps: g. Perform single-point or double-point deviation correction on the plug-in hole; If single-point deflection correction is performed on the plug-in hole, the camera moves to the first hole position in front of the plug-in to obtain an image, recognizes the image and obtains the deviation from the set position, and compensates for the deviation value when the PCB is plugged in; If dual-point deflection correction is performed on the plug-in hole, the camera moves to the first and last hole positions in turn before the plug-in for image recognition and obtains the deviation values ​​of the two hole positions respectively, and calculates the position and angle deviation of the PCB, and compensates the deviation value when the plug-in is performed.

10. The online rapid programming method of the plug-in machine as claimed in claim 6, characterized in that: If you want to skip some bad impositions, before executing step f, you can also include the following steps: h. Pre-block the first plug-in hole in the plug-in panel that needs to be skipped, and click Automatically skip the panel in the main interface. The camera will move to the first hole position of each panel in turn for detection before the plug-in. If the plug-in hole is not recognized, the panel will be marked and displayed in the main interface. The marked panel will be skipped during the plug-in.