Summary of the invention
Embodiment of the invention technical problem to be solved is, a kind of localization method and device are provided, and can quick and precisely locate the position that mounts of components and parts, improves pasting board efficient.
In order to solve the problems of the technologies described above, the embodiment of the invention provides a kind of localization method, comprising:
Positioner is from the BOM(Bill Of Material of default PCB, BOM) choose item corresponding to any components and parts in the file;
According to selected item, described positioner is searched the coordinate figure of selected item on described PCB from the coordinate file of default PCB;
According to the coordinate figure of selected item on described PCB, components and parts corresponding to the selected item in described positioner location mount the position on described PCB.
Wherein, described positioner is chosen before item corresponding to any components and parts from default BOM file, also comprises:
Positioner sets in advance BOM file and the coordinate file of the PCB that need to carry out pasting board, comprising:
The needs that the host computer that described positioner reception is connected with described positioner sends carry out BOM file and the coordinate file of the PCB of pasting board;
BOM file and the coordinate file of the described PCB of described positioner storing received;
Wherein, the BOM file of described PCB comprises: need to mount item and the components and parts corresponding to each item of the position of components and parts on the PCB, wherein, components and parts are corresponding one by one with item;
Wherein, the coordinate file of described PCB comprises: the item and the coordinate of each item on PCB that need to mount the position of components and parts on the PCB.
Wherein, described positioner is chosen after item corresponding to any components and parts from the BOM file of default PCB, searched selected item before the coordinate figure on the described PCB from the coordinate file of default PCB, also comprise: described positioner shows selected item.
Wherein, described according to selected item, described positioner is searched the coordinate figure of selected item on described PCB from the coordinate file of default PCB, comprising:
Described positioner judges whether comprise in the coordinate file of default PCB and the selected item item that is complementary;
If judged result is yes, described positioner output matching information, and from the coordinate file of described default PCB, extract the coordinate figure of item on described PCB that is complementary with selected item;
If the determination result is NO, described positioner output alarm information.
Wherein, described according to the coordinate figure of selected item on described PCB, components and parts corresponding to the selected item in described positioner location mount the position on described PCB, comprising:
Described positioner is located the LED(Light Emitting Diode corresponding with described PCB, light-emitting diode according to the X coordinate of selected item on described PCB) go accordingly in the dot matrix;
Described positioner is according to the Y coordinate of selected item on described PCB, locates in the LED dot matrix corresponding with described PCB accordingly row;
Described positioner is determined the row of locating in LED dot matrix corresponding to described PCB and the crosspoint of row, the position of described crosspoint in described LED dot matrix, and components and parts corresponding to corresponding selected item mount the position on described PCB;
Wherein, the X coordinate on the described PCB is corresponding one by one with the row of described LED dot matrix, and the Y coordinate on the described PCB is corresponding one by one with the row of described LED dot matrix.
Wherein, selected components and parts mounting after the position on described PCB corresponding to item in described positioner location also comprises:
Described positioner shows that components and parts corresponding to selected item mount the position on described PCB, comprising:
Described positioner is lighted the LED lamp on the described crosspoint;
The position of the described LED lamp of lighting in described LED dot matrix, components and parts corresponding to corresponding selected item mount the position on described PCB.
Correspondingly, the embodiment of the invention also provides a kind of positioner, comprising:
Main control module, be used for choosing item corresponding to any components and parts from the BOM file of default PCB, from the coordinate file of default PCB, search the coordinate figure of selected item on described PCB, and locate components and parts corresponding to selected item and on described PCB, mount the position.
Wherein, described positioner also comprises:
Receiver module, the needs that be used for to receive the host computer transmission that is connected with described positioner carry out BOM file and the coordinate file of the PCB of pasting board, and the BOM file of described PCB and coordinate file are sent to described main control module store;
Wherein, the BOM file of described PCB comprises: need to mount item and the components and parts corresponding to each item of the position of components and parts on the PCB, wherein, components and parts are corresponding one by one with item; Wherein, the coordinate file of described PCB comprises: the item and the coordinate of each item on PCB that need to mount the position of components and parts on the PCB.
Wherein, described main control module is searched the coordinate figure of selected item on described PCB from the coordinate file of default PCB, comprising:
Whether comprise in the coordinate file of the PCB that described master control module judges is default and the selected item item that is complementary; If judged result is yes, then from the coordinate file of described default PCB, extract the coordinate figure of item on described PCB that is complementary with selected item.
Wherein, described positioner also comprises:
The state indicating module is used to indicate the state of described positioner, comprises showing the selected item of described main control module, when comprising when being complementary item with selected item output matching information in the coordinate file of the default PCB of described master control module judges; When not comprising when being complementary item with selected item output alarm information in the coordinate file of the default PCB of described master control module judges.
Wherein, components and parts corresponding to the selected item in described main control module location mount the position on described PCB, comprising:
Described main control module is located in the LED dot matrix corresponding with described PCB and is gone accordingly according to the X coordinate of selected item on described PCB;
Described main control module is according to the Y coordinate of selected item on described PCB, locates in the LED dot matrix corresponding with described PCB accordingly row;
Described main control module is determined the row of locating in LED dot matrix corresponding to described PCB and the crosspoint of row, the position of described crosspoint in described LED dot matrix, and components and parts corresponding to corresponding selected item mount the position on described PCB;
Wherein, the X coordinate on the described PCB is corresponding one by one with the row of described LED dot matrix, and the Y coordinate on the described PCB is corresponding one by one with the row of described LED dot matrix.
Wherein, described positioner also comprises:
Display module is used for showing that components and parts corresponding to selected item mount the position on described PCB;
Wherein, described display module comprises the LED dot matrix corresponding with described PCB;
Described display module shows that by lighting LED lamp on the described crosspoint components and parts corresponding to selected item mount the position on described PCB;
The position of the described LED lamp of lighting in described LED dot matrix, components and parts corresponding to corresponding selected item mount the position on described PCB.
Implement the embodiment of the invention, have following beneficial effect:
The positioner of the embodiment of the invention is chosen item corresponding to any components and parts from the BOM file of default PCB, according to this item of choosing, from the coordinate file of default PCB, search the coordinate figure of selected item on described PCB, and locate components and parts corresponding to selected item and on described PCB, mount the position, realize the quick and precisely location that mounts the position of components and parts that needs are mounted, improved pasting board efficient.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
See also Fig. 1, be the structural representation of the embodiment of positioner of the present invention; Described positioner comprises:
Main control module 10, be used for choosing item corresponding to any components and parts from the BOM file of default PCB, from the coordinate file of default PCB, search the coordinate figure of selected item on described PCB, and locate components and parts corresponding to selected item and on described PCB, mount the position.
The operation of the whole positioner of described main control module 10 controls comprises: the communication of control and external equipment (as: host computer that is connected with described positioner), and the operation of controlling other modules in the described positioner.In the present embodiment, described main control module 10 by with described positioner in the cooperatively interacting of other modules, the location components and parts that need pasting board mount the position on PCB fast.Wherein, the BOM file of described PCB comprises: need to mount item and the components and parts corresponding to each item of the position of components and parts on the PCB, wherein, components and parts are corresponding one by one with item.The coordinate file of described PCB comprises: the item and the coordinate of each item on PCB that need to mount the position of components and parts on the PCB.
Please in the lump referring to Fig. 2, be the first schematic diagram of the circuit structure of positioner shown in Figure 1; Fig. 2 shows the circuit structure of main control module shown in Figure 1 10.Described main control module 10 is by IC(Integrated Circuit, integrated circuit) 1, IC2 and IC3 consist of.Wherein, IC1 is single-chip microcomputer, and model is P89C58, the ROM(Read-Only Memory of built-in 32KB, read-only memory) space; IC2 is data latches, and model is 74HC573; IC3 is the 38th Parallel decoder, and model is 74HC138.Further referring to Fig. 2, resistance R 2, R3, R4, R5 and K switch 2, K3, K4 and K5 consist of the external control module of described positioner, and this module is used for receiving external command (as: the positioning action order that the user sends etc.).Capacitor C 4-C20 is power filtering capacitor.K switch 1, capacitor C 1, resistance R 1 consist of (RESET) circuit that resets of IC1.Crystal oscillator X1, capacitor C 2 and capacitor C 3 consist of the oscillating circuit of IC1.
See also Fig. 1, described positioner also comprises again:
Receiver module 20, the needs that be used for to receive the host computer transmission that is connected with described positioner carry out BOM file and the coordinate file of the PCB of pasting board, and the BOM file of described PCB and coordinate file are sent to described main control module 10 store.
In the specific implementation, described receiver module 20 can be the RS232 serial communication modular.Please in the lump referring to Fig. 2, Fig. 2 shows the circuit structure of described receiver module 20.Described interface module 20 is made of IC4, and IC4 is serial port chip, and model is MAX232.The output of IC4 is connected with the 31st pin (P31/TXD) with the 30th pin (P30/RXD) of IC1.
The host computer that is connected with described positioner comprises coordinate file processing module and communication module, user (as: pasting board personnel) can will need the BOM file of the PCB of pasting board to be stored in the host computer, the coordinate file processing module of host computer is carried out coordinate with this PCB and is divided, and according to the BOM file of this PCB the label of each coordinate position is formed coordinate file; Described host computer is stored the coordinate file of this PCB afterwards.Need to prove, host computer includes but not limited to: PC(Personal Computer, PC) terminal equipments such as machine, portable computer, smart mobile phone, the coordinate file processing module of host computer can be adopt VB(Visual Basic, programming language) program of writing.
The communication module of described host computer can be the RS232 serial communication modular, and its input with the IC4 that forms described receiver module 20 is connected.The communication module of described host computer is sent to described receiver module 20 with BOM file and the coordinate file of the PCB that needs pasting board of host computer storage, the needs that the host computer that described receiver module 20 receptions are connected with described positioner sends carry out BOM file and the coordinate file of the PCB of pasting board, and the BOM file of described PCB and coordinate file are sent to described main control module 10 store, in the fixed storage space that described main control module 10 is stored to self with BOM file and the coordinate file of described PCB.
State indicating module 30, be used to indicate the state of described positioner, comprise the item that shows that described main control module 10 is selected, in described main control module 10 is judged the coordinate file of default PCB, comprise when being complementary item with selected item output matching information; In judging the coordinate file of default PCB, described main control module 10 do not comprise when being complementary item with selected item output alarm information.
Please in the lump referring to Fig. 3, be the second schematic diagram of the circuit structure of positioner shown in Figure 1; Fig. 3 shows the circuit structure of described state indicating module 30.Described state indicating module 30 is made of components and parts such as IC5-IC8, resistance R 6-R9, Q1, BZ1, LED1, LED2, RJ01, RJ02, and wherein, IC5 and IC6 are data latches, and model is 74HC573; IC7 and IC8 are NOR gate, and model is 74HC08; BZ1 is buzzer.The input pin of IC5 and IC6 connects the data/address bus D[0-7 of IC1], the output pin of IC5 and IC6 connects group of four figures pipe, IC1 by/WR, CS0, CS1 pin control IC7 and IC8, thereby the demonstration of control group of four figures pipe, LED1 and LED2 are used to indicate the state of described positioner, and IC1 is by P12 pin control BZ1 buzzer state.
In the specific implementation, described state indicating module 30 shows the item that described main control module 10 is selected by group of four figures pipe; Comprise in described main control module 10 is judged the coordinate file of default PCB when being complementary item with selected item, described state indicating module 30 control LED1 light, and the light on and off of controlling simultaneously LED2 come output matching information; Do not comprise in described main control module 10 is judged the coordinate file of default PCB when being complementary item with selected item, described state indicating module 30 extinguishes LED1 and LED2 simultaneously, and BZ1 is sounded a buzzer with output alarm information.
Display module 40 is used for showing that components and parts corresponding to selected item mount the position on described PCB.
Described display module 40 comprises the LED dot matrix corresponding with described PCB.Please in the lump referring to Fig. 4, be the 3rd schematic diagram of the circuit structure of positioner shown in Figure 1; Fig. 4 shows the circuit structure of described display module 40.Described display module 40 is made of IC9-IC28, peripheral triode (Q represents) and LED dot matrix (a plurality of LED lamps that the IC9-IC28 pin connects form), and wherein, IC9-IC28 and peripheral triode consist of the drive circuit of LED dot matrix.IC9-IC13 is expansion IO(In/Out, input and output) chip, model is 8255; IC14-IC28 is SI PO shift register, and model is 74HC595, and peripheral triode is connected with the respective pins of IC14-IC28.The data/address bus D[0-7 of IC1], address bus A[0-15], control bus is connected with IC9-IC13, the P14 of IC1, P15 and P16 pin are connecting respectively data pin DSIN, clock pin CLK and the latch enable pin STR of IC14-IC28.The LED dot matrix is made of the surface label light-emitting diode of fixedly counting and the installation site is determined, the relative position of components and parts on PCB can be oriented in its luminous position on silk-screen figure.
In the specific implementation, described display module 40 shows that by lighting LED lamp on the described LED dot matrix components and parts corresponding to selected item mount the position on described PCB; The position of the described LED lamp of lighting in described LED dot matrix, components and parts corresponding to corresponding selected item mount the position on described PCB.
In order to be illustrated more clearly in the present invention, the below will describe in detail to the operation principle of positioner of the present invention.
After the transmission of host computer startup file, IC1 detects external control module action (the K4 key is pressed), and IC1 starts the RS232 serial communication modular and host computer carries out serial communication; In the BOM file of the PCB that the needs that IC1 sends host computer mount and the internal storage space that coordinate file is stored in self.Said process is the initialization procedure of described positioner, can break away from host computer through the positioner after the initialization and position operation.
When the user inputs the positioning action order by the external control module, IC1 detects the action of external control module, IC1 reads the BOM file of PCB internally in the memory space, and therefrom choose item corresponding to any components and parts, and sending data and control command to IC5 and IC6, control IC5 and IC6 show selected item at group of four figures pipe.IC1 compares the item in the coordinate file of the PCB in this item and the internal storage space, judges whether to exist the item that is complementary, if it fails to match, then controls LED1, LED2 extinguishes simultaneously, controls simultaneously the BZ1 buzzer warning; If the match is successful, it is bright then to control the LED1 lamp, and the light on and off of LED2 decide according to these components and parts residing layer on PCB then that (PCB is two-sided, determine that wherein one side is as top layer, another side is as bottom, if these components and parts are in the top layer position of PCB, then LED2 is bright, otherwise LED2 goes out); Simultaneously, IC1 reads the coordinate figure of the item that is complementary with selected item from the coordinate file of PCB, is understandable that, this coordinate figure is the coordinate figure of selected item on PCB; IC1 accesses the X coordinate figure of this item, and this X coordinate figure is transferred to IC9-IC13 by bus mode, and the row of control LED dot matrix shows that corresponding delegation is selected in the LED dot matrix at this moment; IC1 adopts serial data stream to send into IC14-IC28 the Y coordinate figure simultaneously, row in the control LED dot matrix show, corresponding row are selected in this moment LED lattice array, and the components and parts that the delegation one row position, crosspoint in the LED dot matrix of choosing is the location mount the position on PCB.The LED lamp bright spot at place, IC1 control crosspoint, thus the components and parts that the pasting board personnel can be located this location fast mount, and have improved pasting board efficient.
Need to prove that above-mentioned only is for example, other situations, such as: also may there be other circuit structures in each module of described positioner; Or described positioner can directly by preset BOM file and the coordinate file of the PCB that needs pasting board in main control module 10, need not to receive from host computer; Or described positioner can comprise in receiver module 20, state indicating module 30, the display module 40 any one or more, etc., but similar analysis in above-mentioned other situations is not repeated herein.
The embodiment of the invention can quick and precisely be located the position that mounts of components and parts, improves pasting board efficient.
In order to be illustrated more clearly in the present invention, the below will be to being described in detail by the performed localization method of above-mentioned positioner.
See also Fig. 5, be the flow chart of the first embodiment of localization method of the present invention; Described localization method comprises:
S101, positioner is chosen item corresponding to any components and parts from the BOM file of default PCB.
In the specific implementation, the BOM file of described PCB comprises: need to mount item and the components and parts corresponding to each item of the position of components and parts on the PCB, wherein, components and parts are corresponding one by one with item.
S102, according to selected item, described positioner is searched the coordinate figure of selected item on described PCB from the coordinate file of default PCB.
The coordinate file of described PCB comprises: the item and the coordinate of each item on PCB that need to mount the position of components and parts on the PCB.
S103, according to the coordinate figure of selected item on described PCB, components and parts corresponding to the selected item in described positioner location mount the position on described PCB.
The embodiment of the invention can quick and precisely be located the position that mounts of components and parts, improves pasting board efficient.
See also Fig. 6, be the flow chart of the second embodiment of localization method of the present invention; Described method comprises:
S201, the needs that the host computer that described positioner reception is connected with described positioner sends carry out BOM file and the coordinate file of the PCB of pasting board.
Described positioner can adopt the RS232 serial communication modular when carrying out S201, realize with described host computer between communicate by letter, the circuit structure of this RS232 serial communication modular is please in the lump referring to Fig. 2.The host computer that is connected with described positioner comprises coordinate file processing module and communication module, user (as: pasting board personnel) can will need the BOM file of the PCB of pasting board to be stored in the host computer, the coordinate file processing module of host computer is carried out coordinate with this PCB and is divided, and according to the BOM file of this PCB the label of each coordinate position is formed coordinate file; Described host computer is stored the coordinate file of this PCB afterwards.Need to prove that host computer includes but not limited to: the terminal equipments such as PC, portable computer, smart mobile phone, the coordinate file processing module of host computer can be the program that adopts VB to write.
The communication module of described host computer can be the RS232 serial communication modular, and it is connected with the RS232 serial communication modular that described S201 adopts.The communication module of described host computer is sent to described positioner with BOM file and the coordinate file of the PCB that needs pasting board of host computer storage, and the needs that the host computer that described S201 reception is connected with described positioner sends carry out BOM file and the coordinate file of the PCB of pasting board.Wherein, the BOM file of described PCB comprises: need to mount item and the components and parts corresponding to each item of the position of components and parts on the PCB, wherein, components and parts are corresponding one by one with item.The coordinate file of described PCB comprises: the item and the coordinate of each item on PCB that need to mount the position of components and parts on the PCB.
S202, BOM file and the coordinate file of the described PCB of described positioner storing received.
In the BOM file of the described PCB that described S202 receives described S201 and the fixed storage space that coordinate file is stored to described positioner, specifically can be in the lump referring to Fig. 2, in the internal storage space that described S202 is stored to IC1 with BOM file and the coordinate file of described PCB.
In the present embodiment, described S201-S202 is BOM file and the coordinate file process that described positioner sets in advance the PCB that need to mount, also be the initialization procedure of described positioner, can break away from host computer through the positioner after the initialization and position operation.
S203, described positioner is chosen item corresponding to any components and parts from the BOM file of default PCB.
In the present embodiment, described S203 is identical with the S101 step of a upper embodiment, is not repeated herein.
S204, described positioner shows selected item.
In the specific implementation, please in the lump referring to Fig. 3, described S204 adopts group of four figures pipe, shows the item that described positioner is selected.
S205, described positioner judge whether comprise in the coordinate file of default PCB and the selected item item that is complementary, if judged result is yes, change S206 over to; If the determination result is NO, change S212 over to, described positioner output alarm information.
S206, described positioner output matching information.
In the specific implementation, please in the lump referring to Fig. 3, described S206 adopts two LED lamps to export described match information, if described S205 judged result is yes, described S206 control LED1 shown in Figure 3 lights, the light on and off of controlling simultaneously LED2 come output matching information, particularly, the light on and off of LED2 decide according to components and parts corresponding to selected item residing layer on PCB then that (PCB is two-sided, determines that wherein one side is as top layer, and another side is as bottom, if these components and parts are in the top layer position of PCB, then LED2 is bright, otherwise LED2 goes out).
S207, described positioner extract the coordinate figure of item on described PCB that is complementary with selected item from the coordinate file of described default PCB.
In the present embodiment, described S205-207 and S212 are the concrete refinement step of the S102 of a upper embodiment.
S208, described positioner locate in the LED dot matrix corresponding with described PCB and go accordingly according to the X coordinate of selected item on described PCB.
S209, described positioner be according to the Y coordinate of selected item on described PCB, locates in the LED dot matrix corresponding with described PCB accordingly row.
S210, described positioner determine the row of locating in LED dot matrix corresponding to described PCB and the crosspoint of row, the position of described crosspoint in described LED dot matrix, and components and parts corresponding to corresponding selected item mount the position on described PCB.
S211, described positioner light the LED lamp on the described crosspoint, the position of the described LED lamp of lighting in described LED dot matrix, and components and parts corresponding to corresponding selected item mount the position on described PCB; Afterwards, change end over to.
Need to prove that the X coordinate on the described PCB is corresponding one by one with the row of described LED dot matrix, the Y coordinate on the described PCB is corresponding one by one with the row of described LED dot matrix.
In the present embodiment, described S208-S211 is the concrete refinement step of the S103 of a upper embodiment.
S212, described positioner output alarm information.
In the specific implementation, please in the lump referring to Fig. 3, described S212 adopts two LED lamps and a BZ1 buzzer to export described warning message, if described S205 judged result is yes, described S212 control LED1 and LED2 shown in Figure 3 extinguishes simultaneously, and makes BZ1 sound a buzzer output alarm information.
The positioner of the embodiment of the invention is chosen item corresponding to any components and parts from the BOM file of default PCB, according to this item of choosing, from the coordinate file of default PCB, search the coordinate figure of selected item on described PCB, and locate components and parts corresponding to selected item and on described PCB, mount the position, realize the quick and precisely location that mounts the position of components and parts that needs are mounted, improved pasting board efficient.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the relevant hardware of instruction to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process such as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or store-memory body (Random Access Memory, RAM) etc. at random.
Above disclosed only is preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, one of ordinary skill in the art will appreciate that all or part of flow process that realizes above-described embodiment, and according to the equivalent variations that claim of the present invention is done, still belong to the scope that invention is contained.