Automatic plug-in method of plug-in machine
By obtaining the offline plug-in diagram and using the nearest neighbor algorithm to generate plug-in routes, the existing PCB plug-in plug-in has been solved, with cumbersome operation, high error rate and high cost, and fast, accurate and low-cost plug-in operation is achieved.
Patent Information
- Application Number
- CN202411811413.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-06-24
AI Technical Summary
The existing PCB plug-in operation has problems such as cumbersome programming, prone to errors and high cost.
By obtaining the offline plug-in diagram, the nearest neighbor algorithm is used to sort the plug-in, the plug-in route is generated, and the plug-in operation is automated.
It realizes fast, accurate and low cost of plug-in operations, simplifies the programming process, and improves operation efficiency.
Smart Images

Figure CN120201708A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent programming for PCB plug-ins, and particularly to an automatic plug-in method for a plug-in machine. Background Art
[0002] A plug-in machine is a mechanical device that automatically and standardly inserts some regular electronic components into the conductive through-holes of a PCB. To achieve the automatic and standard insertion of electronic components, the plug-in machine needs to perform programmed operations according to the positions of the electronic components. In the existing PCB plug-in machine market, there are problems such as high programming difficulty, low operation efficiency, and easy mistakes during the plug-in operation of the plug-in machine. Moreover, the requirements for programmers are relatively high, and the production cost is high. Therefore, how to make the plug-in operation of the plug-in machine fast, accurate, and low-cost has become an objective need. Summary of the Invention
[0003] The present invention provides an automatic plug-in method for a plug-in machine, which is used to solve the problems of cumbersome programming, easy mistakes, and high cost in the plug-in operation of the existing plug-in machine.
[0004] To achieve the purpose of the present invention, the present invention provides an automatic plug-in method for a plug-in machine, and the method includes the following steps:
[0005] a. The plug-in machine obtains an off-line plug-in schematic diagram and obtains the type and position of each plug-in. The off-line plug-in schematic diagram is a whole-board structure composed of a single overall module or a split-board structure spliced by multiple repeated modules;
[0006] b. When the off-line plug-in schematic diagram is a whole-board structure, the user pre-sets a plug-in start point and a plug-in end point. The plug-in machine sorts all the plug-ins in the off-line plug-in schematic diagram through the nearest neighbor algorithm to generate a plug-in route from the plug-in start point to the plug-in end point;
[0007] c. When the off-line plug-in schematic diagram is a split-board structure, the user pre-sets the plug-in start point, plug-in end point, starting splicing module, and ending splicing module of each repeated module. The plug-in machine generates a plug-in route based on the plug-in start point, plug-in end point, starting splicing module, and ending splicing module of each repeated module;
[0008] d. The plug-in machine performs an automated plug-in operation according to the plug-in route generated in step b or step c.
[0009] Further, in step b, the user pre-sets multiple sequential points, including a plug-in start point, a first midpoint, a second midpoint, and a plug-in end point. The plug-in machine generates a plug-in route according to each sequential point through the nearest neighbor algorithm.
[0010] In some embodiments, in step b, the user pre-sets the plug-in start point, the plug-in end point, and the plug-in type order. The plug-in machine sorts them in the order of the plug-in type pre-set by the user. Moreover, the plug-ins of each type are sorted by the nearest neighbor algorithm, and then a plug-in route from the plug-in start point to the plug-in end point is generated according to the sorted order.
[0011] In some embodiments, in step c, if the user does not pre-set the plug-in start point and the plug-in end point of each repeating module, then the first device in the upper left corner of each repeating module is defaulted as the plug-in start point, and the first device in the lower right corner of each repeating module is defaulted as the plug-in end point.
[0012] Further, in step c, the repeating modules are arranged horizontally and vertically in an array manner, forming odd-row modules and even-row modules. Moreover, the odd-row modules are sorted in the positive order, and the even-row modules are sorted in the reverse order.
[0013] Further,
[0014] When adjacent odd-row modules are spliced, the plug-in end point of the previous module is connected to the plug-in start point of the next module;
[0015] When adjacent even-row modules are spliced, the plug-in start point of the previous module is connected to the plug-in end point of the next module;
[0016] The plug-in end point of the last module in the odd row is connected to the plug-in end point of the adjacent first module in the even row;
[0017] The plug-in start point of the last module in the even row is connected to the plug-in start point of the adjacent first module in the odd row.
[0018] In some embodiments,
[0019] When adjacent odd-row modules are spliced, the plug-in start point of the previous module is connected to the plug-in end point of the next module;
[0020] When adjacent even-row modules are spliced, the plug-in end point of the previous module is connected to the plug-in start point of the next module;
[0021] The plug-in start point of the last module in the odd row is connected to the plug-in start point of the adjacent first module in the even row;
[0022] The plug-in end point of the last module in the even row is connected to the plug-in end point of the adjacent first module in the odd row.
[0023] Further, in step c, when the user needs to skip a partial area of a certain module for splicing, the start point and the end point of the required skipped partial area can be respectively set with marks, and the plug-in machine identifies the marks to skip this area.
[0024] Further, in step c, each repeating module sorts all the plug-in points therein according to the nearest neighbor algorithm to generate a plug-in route from the plug-in starting point to the plug-in ending point.
[0025] In some embodiments, in step c, each repeating module is sorted in sequence according to the plug-in type order preset by the user, and the plug-ins of each type are sorted by the nearest neighbor algorithm, and then a plug-in route from the plug-in starting point to the plug-in ending point is generated according to the sorted order.
[0026] The beneficial effects of the present invention are as follows: The plug-in machine of the present invention obtains the types and positions of each plug-in according to the off-line plug-in schematic diagram, generates different plug-in routes according to the different structures of the plug-in schematic diagram, and then performs automatic plug-in operations according to the generated plug-in routes, which is not only simple in operation, but also accurate and efficient in plugging.
[0027] When the off-line plug-in schematic diagram is a full-page structure, the plug-in machine sorts the plug-ins by the nearest neighbor algorithm and generates a plug-in route to ensure the accuracy and integrity of the plug-ins.
[0028] When the off-line plug-in schematic diagram is a split-page structure, only the plug-in route of the first repeating module needs to be generated first, and then the plug-in route is copied and spliced according to the arrangement order of each repeating module, that is, the plug-in route of the split-page structure is obtained, which can efficiently and accurately generate the plug-in route.
[0029] On the other hand, when splicing the split-page structure, by sorting the odd-row modules in the forward direction and the even-row modules in the reverse direction, the return steps during plugging across rows can be reduced, further improving the plugging efficiency.
[0030] In addition, the plug-in order within the full-page structure or each repeating module can also be sorted in sequence according to the plug-in type order preset by the user, and the plug-ins of each type are sorted by the nearest neighbor algorithm, and then a plug-in route is generated according to the sorted order, so as to avoid mutual conflicts between different devices and further ensure the accuracy of the plug-in operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is the flowchart of the method in Embodiment 1 of the present invention.
[0032] Figure 2 is the flowchart of the method in Embodiment 2 of the present invention.
[0033] Figure 3 is the schematic diagram of the plug-in route in Embodiment 2 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0034] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
[0035] Embodiment 1
[0036] Refer to Figure 1 , the automatic plug-in method of the plug-in machine in this embodiment is used to generate a plug-in route according to the plug-in schematic diagram generated offline and perform an automated plug-in operation. The method includes the following steps:
[0037] S110. The plug-in machine obtains the offline plug-in schematic diagram and obtains the type and position of each plug-in.
[0038] In this step, the plug-in machine in this embodiment can be a horizontal plug-in machine or a vertical plug-in machine. The offline plug-in schematic diagram is generated offline after the camera of the plug-in machine vision system captures the PCB image. After the plug-in machine obtains the offline plug-in schematic diagram, it obtains the type and position of each plug-in from the offline plug-in schematic diagram. Among them, the offline plug-in schematic diagram in this embodiment is a whole-board structure composed of a single overall module.
[0039] S120. The user presets a plug-in start point and a plug-in end point, and the plug-in machine generates a plug-in route according to the start point position and the end point position of the plug-in.
[0040] In this step, the user pre-sets a plug-in start point and a plug-in end point in the offline plug-in schematic diagram. The plug-in machine sorts all the plug-ins in the offline plug-in schematic diagram through the nearest neighbor algorithm, and then generates a plug-in route from the plug-in start point to the plug-in end point in the sorted order. In some embodiments, the user can also pre-set multiple sequential points in the offline plug-in schematic diagram. Among them, the multiple sequential points include the plug-in start point, the first midpoint, the second midpoint... the plug-in end point. The number of sequential points can be set according to actual needs. For example, when the structure of the offline plug-in schematic diagram is relatively simple and the size is small, the number of sequential points can be set fewer; while when the structure of the offline plug-in schematic diagram is relatively complex or the size is large, the number of sequential points can be set more to ensure that the plug-in route generated by the subsequent plug-in machine is more efficient and accurate. After setting the sequential points, the plug-in machine obtains each sequential point, sorts the plug-ins between adjacent sequential points according to the nearest neighbor algorithm, and then generates a plug-in route from the plug-in start point to the plug-in end point in the sorted order of the plug-ins according to each sequential point.
[0041] In some other embodiments, when the plug-in machine sorts the plugs in the off-line plug-in schematic diagram, it can also sort them in sequence according to the plug-in type, so as to effectively avoid the problem of mutual conflict between various types of devices. For example, for some PCB boards, only after plugging in device A can device B be plugged in. If device B is plugged in first and then device A, it will affect device A. Specifically, the plug-in sequences of different types can be preset by the user according to actual needs, that is, after completing the plug-in operation of one type of plug, then perform the plug-in operation of another type of plug until the plug-in operations of all types of plugs are completed. After the plug-in machine obtains the plug-in sequences of various types of plugs, it sorts each type of plug through the nearest neighbor algorithm, and then generates a plug-in route from the plug-in starting point to the plug-in ending point according to the sorted plug-in sequence.
[0042] S130. The plug-in machine performs an automatic plug-in operation according to the generated plug-in route.
[0043] In this step, after the plug-in machine generates the plug-in route, the plug-in machine performs an automatic plug-in operation according to the generated plug-in route, thereby completing the plug-in of the PCB.
[0044] In this embodiment, by obtaining the types and positions of each plug in the off-line plug-in schematic diagram of the whole board structure, sorting each plug through the nearest neighbor algorithm to generate a plug-in route, and then performing plug-in operations according to the plug-in route, the accuracy and integrity of the plug-in are ensured.
[0045] Embodiment 2
[0046] Refer to Figure 2 , the automatic plug-in method of the plug-in machine in this embodiment is used to generate a plug-in route according to the off-line generated plug-in schematic diagram and perform an automatic plug-in operation. The method includes the following steps:
[0047] S210. The plug-in machine obtains the off-line plug-in schematic diagram and obtains the types and positions of each plug.
[0048] In this step, the plug-in machine in this embodiment can be a horizontal plug-in machine or a vertical plug-in machine. The off-line plug-in schematic diagram is generated off-line after the camera of the plug-in machine vision system captures the PCB image. After the plug-in machine obtains the off-line plug-in schematic diagram, it obtains the types and positions of each plug from the off-line plug-in schematic diagram. Among them, the off-line plug-in schematic diagram in this embodiment is a mosaic structure composed of multiple repeated modules, and the repeated modules are arranged horizontally and vertically in an array manner to form odd-row modules and even-row modules. The repeated modules are quickly spliced through a matrix, which can not only ensure the high efficiency of plug-in position editing, but also enable the complex mosaic position information to be quickly generated.
[0049] S220. The user pre-sets the plug-in start point, plug-in end point, starting splicing module, and ending splicing module for each repeating module. The plug-in machine generates a plug-in route based on the plug-in start point, plug-in end point, starting splicing module, and ending splicing module of each repeating module.
[0050] In this step, since the layout structure is composed of multiple repeating modules spliced together and the mechanisms of each repeating module are the same, when generating the plug-in route, only the plug-in route of one of the repeating modules needs to be generated, and then the plug-in routes of each row and each column are connected to form the entire plug-in route. Specifically, the user pre-sets the plug-in start point, plug-in end point of each repeating module, and then sets the starting splicing module and ending splicing module. The plug-in machine obtains the plug-in start point, plug-in end point, starting splicing module, and ending splicing module, sorts all the plug-ins within the first repeating module, then generates the plug-in route of the first repeating module in the sorted order, copies the plug-in route of the first repeating module at the corresponding position according to the arrangement position of each repeating module, and finally spliced each repeating module together to form the plug-in route of the layout structure.
[0051] In some embodiments, when the user does not pre-set the plug-in start point and plug-in end point of each repeating module, when the plug-in machine generates the plug-in route of the repeating module, it defaults to using the first device in the upper left corner of the repeating module as the plug-in start point and the first device in the lower right corner of the repeating module as the plug-in end point. The plug-in machine sorts all the plug-ins within the repeating module, and then generates the plug-in route from the plug-in start point to the plug-in end point in the sorted order. Among them, the plug-in machine sorts all the plug-ins within the repeating module according to the nearest neighbor algorithm to generate the plug-in route. In other embodiments, the plug-in order within each repeating module can also be sorted in sequence according to the plug-in type order pre-set by the user, and each type of plug-in is sorted by the nearest neighbor algorithm, and then the plug-in route is generated in the sorted order, so as to avoid mutual conflicts between different devices.
[0052] After the plug-in routes of each repeating module are generated, the respective repeating modules are spliced to form a complete plug-in route. In this embodiment, the odd-numbered row modules are sorted in the positive order, and the even-numbered row modules are sorted in the reverse order. Specifically, when adjacent odd-numbered row modules are spliced, the plug-in end point of the previous module is connected to the plug-in start point of the next module; when adjacent even-numbered row modules are spliced, the plug-in start point of the previous module is connected to the plug-in end point of the next module; the plug-in end point of the last module in the odd-numbered row is connected to the plug-in end point of the adjacent first module in the even-numbered row; the plug-in start point of the last module in the even-numbered row is connected to the plug-in start point of the adjacent first module in the odd-numbered row. As Figure 3 shown, when starting from the starting splicing module and splicing to the ending splicing module, the plug-in route of the layout structure is obtained.
[0053] Of course, in some embodiments, the splicing between each repeating module can also be carried out in the reverse of the above splicing method, that is: when splicing adjacent odd-row modules, the plug-in starting point of the previous module is connected to the plug-in ending point of the next module; when splicing adjacent even-row modules, the plug-in ending point of the previous module is connected to the plug-in starting point of the next module; the plug-in starting point of the last module in the odd row is connected to the plug-in starting point of the adjacent first module in the even row; the plug-in ending point of the last module in the even row is connected to the plug-in ending point of the adjacent first module in the odd row. When starting from the starting splicing module and splicing to the ending splicing module, the plug-in route of the layout structure is obtained.
[0054] Through the plug-in route generated in this embodiment, when the plug-in operation of the first-row module is completed, the plug-in operation can be directly transferred to the second-row module in the same column, so that when performing the plug-in operation on the second-row module, there is no need to start from the starting position directly opposite to the first-row module, thereby reducing the time waste caused by the plug-in machine having to return to the position directly opposite to the starting position of the first-row module due to line change, and greatly improving the plug-in efficiency.
[0055] In some embodiments, when the user needs to skip a partial area of a certain repeating module for splicing, marks can be set at the starting point and ending point of the module to be skipped respectively. At this time, when the plug-in machine recognizes the marks, it automatically skips the marked area and automatically searches for the next plug-in starting point, so as to achieve automatically skipping a certain repeating module and meet the user's needs.
[0056] S230. The plug-in machine performs an automated plug-in operation according to the generated plug-in route.
[0057] In this step, after the plug-in machine generates the plug-in route, the plug-in machine performs an automated plug-in operation according to the generated plug-in route, thereby completing the plug-in of the PCB.
[0058] In this embodiment, by obtaining the plug-in types and positions in each repeating module in the offline plug-in schematic diagram of the layout structure, sorting the plug-ins of the first repeating module through the nearest neighbor algorithm, generating the plug-in route of this repeating module, and then copying the plug-in route of this module to the corresponding position according to the arrangement position of each repeating module to form the plug-in routes of all repeating modules, and then splicing each repeating module to form the plug-in route of the whole board structure, and then performing the plug-in operation according to the plug-in route, not only improves the plug-in efficiency, but also ensures the accuracy and integrity of the plug-in.
[0059] Although the present invention has been 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, deformations, substitutions, etc. made to the above components will all fall within the scope of the claims of the present invention.
Claims
1. An automatic plug-in method for an insertion machine, characterized in that: The method comprises the following steps: a. The plug-in machine obtains an offline plug-in schematic diagram, and obtains the type and position of each plug-in, wherein the offline plug-in schematic diagram is a whole-page structure composed of an integral module or a page structure composed of multiple repeated modules; b. When the offline plug-in diagram is a full-page structure, the user pre-sets the plug-in start point and the plug-in end point, and the plug-in machine sorts all the plug-ins in the offline plug-in diagram by the nearest neighbor algorithm to generate a plug-in route from the plug-in start point to the plug-in end point; c. When the offline plug-in schematic diagram is a layout structure, the user pre-sets the plug-in starting point, plug-in end point, starting splicing module, and ending splicing module of each repeated module, and the plug-in machine generates a plug-in route based on the plug-in starting point, plug-in end point, starting splicing module, and ending splicing module of each repeated module; d. The plug-in machine performs automated plug-in operations according to the plug-in route generated in step b or step c.
2. The automatic insertion method of the insertion machine according to claim 1, characterized in that: In step b, the user pre-sets multiple sequence points, including the plug-in starting point, the first midpoint, the second midpoint and the plug-in end point, and the plug-in machine generates a plug-in route according to the nearest neighbor algorithm based on each sequence point.
3. The automatic plug-in method of the plug-in machine according to claim 1, characterized in that: In step b, the user pre-sets the plug-in starting point, plug-in end point and plug-in type order, and the plug-in machine sorts the plug-in types in sequence according to the plug-in type order pre-set by the user, and each type of plug-in is sorted by the nearest neighbor algorithm, and then a plug-in route is generated from the plug-in starting point to the plug-in end point according to the sorted order.
4. The automatic insertion method of the insertion machine according to claim 1, characterized in that: In step c, if the user does not pre-set the plug-in start point and plug-in end point of each repeating module, the first device on the upper left of each repeating module defaults to the plug-in start point, and the first device on the lower right of each repeating module defaults to the plug-in end point.
5. The automatic insertion method of the insertion machine according to claim 1, characterized in that: In step c, the repeating modules are arranged horizontally and vertically in an array to form odd-numbered row modules and even-numbered row modules, and the odd-numbered row modules are arranged in a forward direction, and the even-numbered row modules are arranged in a reverse direction.
6. The automatic insertion method of the insertion machine according to claim 5, characterized in that: When adjacent odd-numbered rows of modules are spliced, the plug-in end point of the previous module is connected to the plug-in start point of the next module; When adjacent even-numbered rows of modules are spliced, the plug-in starting point of the previous module is connected to the plug-in end point of the next module; The plug-in end point of the last module in the odd-numbered row is connected to the plug-in end point of the adjacent first module in the even-numbered row; The plug-in start point of the last module of the even-numbered row is connected to the plug-in start point of the adjacent first module of the odd-numbered row.
7. The automatic insertion method of the insertion machine according to claim 5, characterized in that: When adjacent odd-numbered rows of modules are spliced, the plug-in starting point of the previous module is connected to the plug-in end point of the next module; When adjacent even-numbered rows of modules are spliced, the plug-in end point of the previous module is connected to the plug-in start point of the next module; The plug-in starting point of the last module of the odd-numbered row is connected to the plug-in starting point of the adjacent first module of the even-numbered row; The plug-in end point of the last module in the even-numbered row is connected to the plug-in end point of the adjacent first module in the odd-numbered row.
8. The automatic insertion method of the insertion machine according to claim 1, characterized in that: In step c, when the user needs to skip a part of the area of a module for splicing, the start point and the end point of the part of the area to be skipped can be marked respectively, and the plug-in machine recognizes the marks and skips the area.
9. The automatic insertion method of the insertion machine according to claim 1, characterized in that: In step c, each repeated module sorts all the plug-in points therein according to the nearest neighbor algorithm to generate a plug-in route from the plug-in starting point to the plug-in end point.
10. The automatic insertion method of the insertion machine according to claim 1, characterized in that: In step c, each repeated module is sorted in sequence according to the plug-in type sequence preset by the user, and each type of plug-in is sorted by a nearest neighbor algorithm, and then a plug-in route from the plug-in starting point to the plug-in end point is generated according to the sorted order.