Utility model content
Technical problem to be solved in the utility model is: in order to overcome deficiency of the prior art, the utility model provides a kind of welding stage control system of any main frame, adopt multi host control, when bus free, all unit can carry out transmission message, compared by the arbitration of inside, improve the efficiency of communication.
The utility model solves the technical scheme that its technical problem will adopt: a kind of welding stage control system of any main frame, comprise CAN, described CAN connects at least one group of performance element, described performance element adopts bus type topological structure to connect, often organize described performance element comprise a main frame performance element and several by main frame performance element control from machine performance element, described main frame performance element and can changing arbitrarily between machine performance element, and same group can directly intercom mutually between machine performance element.CAN adopts CAN2.0 bus, and this control system often group has two performance elements at least, one as main frame another as from machine, and master slave relation can be exchanged arbitrarily; In addition, each performance element can carry out other any performance elements on control bus as main frame, and in bus, performance element can carry out arbitrarily grouping according to need of production and controls, can reversed order arbitrarily, does not interfere with each other, is easy to operate.Performance element adopts bus type topological structure to connect, and type of attachment is simple, be easy to install, cost is low, increases and to cancel the network equipment all more flexible.
Further, described performance element has arm processor.Adopt arm processor data processing speed fast.
Further, also comprise PC, described PC is connected with described CAN.CAN can be connected the unified control of realization with PC.
Adopt the welding stage control method of any main frame of the welding stage control system of above-mentioned any main frame, comprise ARM, described ARM inside is provided with packet filtering device and receives mailbox FIFO, and comprises the following steps:
(1) according to the demand of producing, each performance element of the welding stage control system be connected with CAN is divided into groups, often organize at least two performance elements, and be set as same geocoding by unified for the geocoding of the performance element of the same assembly welding bench control system be connected in bus;
Performance element in bus can be carried out arbitrarily grouping according to the actual requirements to control, and can reversed order arbitrarily, do not interfere with each other.If all performance elements do not divide into groups, this situation can be regarded grouping as and only have one group.
(2) adjust the parameter value of a certain performance element that CAN connects, other that any one performance element of the welding stage control system of the same grouping linked together is carried out same grouping on control bus as main frame performance element are arbitrarily from machine performance element;
Performance element in whole bus all divides into groups according to geocoding, and each grouping has a main frame, can communicate between the performance element with group; The performance element of different group also can by bus one group integrally communicate.
(3) message data is sent
Need send message data main frame or from machine performance element transmission message data before, judge that whether bus is idle, if the free time, main frame or from machine performance element can ask send message data to CAN, and can message data transmit operation be carried out, the transmission mailbox that message data is sent completely in rear ARM is vacant, then send end;
Message data is all stored in the transmission mailbox in ARM.
Multi host control, when CAN is idle, All hosts or can carry out transmission message from machine performance element, is compared by the arbitration of inside, improves the efficiency of communication.
(4) message data is received
Main frame in a.CAN bus or the message data information received from machine performance element CAN, filter out the message data of the welding stage control system of identical address coding in CAN by the packet filtering device in ARM;
B. main frame or judge whether reception mailbox FIFO ARM is empty from machine performance element, if be sky, receives effective message data and stored in reception mailbox FIFO; If it be empty for receiving mailbox FIFO, then the message data etc. in pending reception mailbox FIFO, until be sky; Message data receives rear email address and adds 1, and namely FIFO registers and adds 1.
The hardware packet filtering device adopting ARM built-in in welding stage control system, can realize the equipment of different control system at the enterprising Serial Communication of same CAN.
(5) message data is extracted
When reception mailbox FIFO is not empty, main frame or the reception message data received from the arm processor extraction of machine performance element mailbox FIFO, receive message data in mailbox FIFO to have extracted rear reception mailbox fifo address and subtract 1, the reception message data extracted passes through software filtering, compare by this main frame or from the geocoding of machine performance element and the geocoding of reception message data, identical, carry out process and receive message data, change parameter according to reception message data and preserve, otherwise then not processing reception message data;
Employing arranges software filter in a program and carries out software filtering to message data, identifies useful signal and interference signal with software, and filtering interference signals.
(6) communication is completed.
Further, multiple main frame or when simultaneously carrying out transmission message data from machine performance element in step (3), welding stage control system can be carried out bit-by-bit arbitration according to each position of data ID and be compared, arbitration is compared with the height of priority for foundation, carries out message data transmission according to priority orders.The advanced row data that priority is high send, and when guaranteeing multiple main frame or carry out transmission message data from machine performance element simultaneously, system can correctly process.
Further, in order to ensure the accuracy that message data sends, step (3-1) is also comprised in step (3), main frame or from machine performance element send message data time carry out detection mistake, sending message data main frame or from machine performance element once detect mistake, can force to terminate current transmission, force the main frame of end transmission or constantly can resend this message repeatedly until successfully send message data from machine performance element.
Further, main frame described in step (3) or from machine performance element send message data frame comprise seven sections, be respectively frame initial, arbitration section, control section, data segment, CRC section, ACK section and frame end.It is as shown in table 1,
Table 1
Concrete, described message data section comprises eight bytes, respectively is geocoding, pattern, warning mark, gray scale, alarm temperature and three temperature bytes.It is as shown in table 2,
Table 2
Further, in order to improve the efficiency that message data receives and extracts, described step (4) and step (5) synchronous concatenation operate.
The beneficial effects of the utility model are: the welding stage control system of a kind of any main frame that the utility model provides, make the control system of any welding stage can at an enterprising Serial Communication of bus, and can directly intercom mutually between the performance element of identical address coding, improve communication efficiency and networking efficiency; Grouping can be realized control in a bus, not interfere with each other, be easy to operation, enhance reliability and the versatility of communication system.
Embodiment
By reference to the accompanying drawings the utility model is described in detail now.This figure is the schematic diagram simplified, and only basic structure of the present utility model is described in a schematic way, therefore it only shows the formation relevant with the utility model.
As shown in Figure 1, the welding stage control system of a kind of any main frame of the present utility model, comprise CAN, described CAN connects at least one group of performance element, described performance element adopts bus type topological structure to connect, often organize described performance element comprise a main frame performance element and several by main frame performance element control from machine performance element, described main frame performance element and can changing arbitrarily between machine performance element, and same group can directly intercom mutually between machine performance element.CAN adopts CAN2.0 bus, and this control system often group has two performance elements at least, one as main frame another as from machine, and master slave relation can be exchanged arbitrarily; In addition, each performance element can carry out other any performance elements on control bus as main frame, and in bus, performance element can carry out arbitrarily grouping according to need of production and controls, can reversed order arbitrarily, does not interfere with each other, is easy to operate.Performance element adopts bus type topological structure to connect, and type of attachment is simple, be easy to install, cost is low, increases and to cancel the network equipment all more flexible.
Further, in order to improve speed and the data-handling capacity of data processing, described performance element has arm processor.
Further, also comprise PC, described PC is connected with described CAN.CAN can be connected the unified control of realization with PC.
Adopt the welding stage control method of any main frame of the welding stage control system of above-mentioned any main frame, comprise ARM, described ARM inside is provided with packet filtering device and receives mailbox FIFO, and comprises the following steps:
(1) according to the demand of producing, each performance element of the welding stage control system be connected with CAN is divided into groups, often organize at least two performance elements, and be set as same geocoding by unified for the geocoding of the performance element of the same assembly welding bench control system be connected in bus;
Performance element in bus can be carried out arbitrarily grouping according to the actual requirements to control, and can reversed order arbitrarily, do not interfere with each other.If all performance elements do not divide into groups, this situation can be regarded grouping as and only have one group.
(2) adjust the parameter value of a certain performance element that bus connects, other that any one performance element of the welding stage control system of the same grouping linked together is carried out same grouping on control bus as main frame performance element are arbitrarily from machine performance element;
Performance element in whole bus all divides into groups according to geocoding, and each grouping has a main frame, can communicate between the performance element with group; The performance element of different group also can by bus one group integrally communicate.
(3) message data is sent
Need send message data main frame or from machine performance element transmission message data before, judge that whether bus is idle, if the free time, main frame or from machine performance element can ask send message data to CAN, and can message data transmit operation be carried out, the transmission mailbox that message data is sent completely in rear ARM is vacant, then send end;
Message data is all stored in the transmission mailbox in ARM.
Multi host control, when CAN is idle, All hosts or can carry out transmission message from machine performance element, is compared by the arbitration of inside, improves the efficiency of communication.
(4) message data is received
The message data information received from machine performance element CAN in a.CAN bus, filters out the message data of the welding stage control system of identical address coding in bus by the packet filtering device in ARM;
B. main frame or judge whether reception mailbox FIFO ARM is empty from machine performance element, if be sky, receives effective message data and stored in reception mailbox FIFO; If it be empty for receiving mailbox FIFO, then the message data etc. in pending reception mailbox FIFO, until be sky; Message data receives rear email address and adds 1, and namely FIFO registers and adds 1.
The hardware packet filtering device adopting ARM built-in in welding stage control system, can realize the equipment of different control system at the enterprising Serial Communication of same bus.
(5) message data is extracted
When reception mailbox FIFO is not empty, main frame or the reception message data received from the extraction of machine performance element arm processor mailbox FIFO, receive message data in mailbox FIFO to have extracted rear reception mailbox fifo address and subtract 1, the reception message data extracted passes through software filtering, compare by this main frame or from the geocoding of machine performance element and the geocoding of reception message data, identical, carry out process and receive message data, change parameter according to reception message data and preserve, otherwise then not processing reception message data;
Employing arranges software filter in a program and carries out software filtering to message data, identifies useful signal and interference signal with software, and filtering interference signals.
(6) communication is completed.
Further, multiple main frame or when simultaneously carrying out transmission message data from machine performance element in step (3), welding stage control system can be carried out bit-by-bit arbitration according to each position of data ID and be compared, arbitration is compared with the height of priority for foundation, carries out message data transmission according to priority orders.The advanced row data that priority is high send, and when guaranteeing multiple main frame or carry out transmission message data from machine performance element simultaneously, system can correctly process.
Further, in order to ensure the accuracy that message data sends, step (3-1) is also comprised in step (3), main frame or from machine performance element send message data time carry out detection mistake, sending message data main frame or from machine performance element once detect mistake, can force to terminate current transmission, force the main frame of end transmission or constantly can resend this message repeatedly until successfully send message data from machine performance element.
Further, hold main frame described in step (3) or comprise seven sections from the message data frame that the capable unit of machine sends, be respectively that frame is initial, arbitration section, control section, data segment, CRC section, ACK section and frame end.It is as shown in table 1,
Table 1
Concrete, described message data section comprises eight bytes, respectively is geocoding, pattern, warning mark, gray scale, alarm temperature and three temperature bytes.It is as shown in table 2,
Table 2
Further, in order to improve the efficiency that message data receives and extracts, described step (4) and step (5) synchronous concatenation operate.
Example one: any performance element in CAN communicates with other performance elements as main frame, namely only has a grouping.
A. be set as 1 by unified for the geocoding of the performance element of the same welding stage control system be connected in CAN, namely all belong to grouping 1, and have two performance elements at least;
B. adjust the parameter value of a certain performance element that CAN connects, this performance element is set to the main frame performance element in CAN, the parameter of adjustment is packaged into the message data section of 8 bytes by it;
If c. bus enters idle condition, message data frame is then sent in CAN by main frame performance element;
D. need to carry out detection mistake when main frame performance element sends message data, sending the main frame performance element of message data once detect mistake, can force to terminate current transmission, force the performance element terminating to send constantly can resend this message repeatedly until successfully send message data.
The message data information received from machine performance element CAN in e.CAN bus, whether the geocoding being compared data 0 information in message data section by the packet filtering device in ARM is consistent from the geocoding of machine performance element with this, if inconsistent, abandon this Frame, if consistent, the parameter originally from machine performance element is adjusted according to the message data information received;
F. communicate complete.
Example two: be divided into two groups to communicate the performance element in CAN, wherein the main frame performance element of a group sends message data.
A. the performance element of the same welding stage control system be connected in CAN is divided into two groups according to geocoding, namely divide into groups 1 and grouping 2, and each grouping all have two performance elements at least;
B. adjust the parameter value of a certain performance element in the grouping 1 that CAN connects, this performance element is set to the main frame performance element in grouping 1 in CAN, the parameter of adjustment is packaged into the message data section of 8 bytes by it; Meanwhile, the parameter value of a certain performance element in the grouping 2 that adjustment CAN connects, is set to the main frame performance element in grouping 2 in CAN by this performance element;
If c. bus enters idle condition, message data frame is then sent in CAN by the main frame performance element of grouping 1;
The message data information received from machine performance element CAN in d.CAN bus, in grouping 1 from the geocoding of machine performance element and to receive the geocoding of data 0 information message data section consistent, carry out parameter adjustment according to receiving message data information; Inconsistent from the geocoding of data 0 information the geocoding of machine performance element and reception message data section in grouping 2, then abandon this message data bag, do not perform any parameter adjustment;
E. communicate complete.
Example three: be divided into two groups to communicate the performance element in CAN, the main frame performance element of two groups sends message data simultaneously.
A. the performance element of the same welding stage control system be connected in CAN is divided into two groups according to geocoding, namely divide into groups 1 and grouping 2, and each grouping all have two performance elements at least;
B. adjust the parameter value of a certain performance element in the grouping 1 that CAN connects, this performance element is set to the main frame performance element in grouping 1 in CAN, the parameter of adjustment is packaged into the message data section of 8 bytes by it; Meanwhile, the parameter value of a certain performance element in the grouping 2 that adjustment CAN connects, this performance element is set to the main frame performance element in grouping 2 in CAN, the parameter of adjustment is packaged into the message data section of 8 bytes by it;
If c. bus enters idle condition, message data frame is then sent in CAN by the main frame performance element of grouping 1 and grouping 2 simultaneously, welding stage control system can be carried out bit-by-bit arbitration according to each position of data ID and be compared, arbitration is compared with the height of priority for foundation, carries out message data transmission according to priority orders.
If the message data priority that the main frame performance element that the message data priority that the main frame performance element d. dividing into groups 1 sends is greater than grouping 2 sends, other message data information sent from the main frame performance element that machine performance element first receives the grouping 1 CAN then in CAN, consistent with the geocoding of data 0 information the reception message data section that the main frame performance element of grouping 1 sends from the geocoding of machine performance element in grouping 1, parameter adjustment is carried out according to reception message data information, inconsistent from the geocoding of data 0 information the reception message data section that the geocoding of machine performance element and the main frame performance element of grouping 1 send in grouping 2, then abandon this packet, do not perform any parameter adjustment, then, other message data information sent from the main frame performance element that machine performance element receives the grouping 2 CAN again in CAN, consistent with the geocoding of data 0 information the reception message data section that the main frame performance element of grouping 2 sends from the geocoding of machine performance element in grouping 2, parameter adjustment is carried out according to reception message data information, inconsistent from the geocoding of data 0 information the reception message data section that the geocoding of machine performance element and the main frame performance element of grouping 2 send in grouping 1, then abandon this packet, do not perform any parameter adjustment,
E. communicate complete.
The utility model achieves the communication mode of one-to-many, shortens call duration time, improves communication efficiency; Broken away from the dependence to main frame in original communication mode, even if bus there is one or more performance element collapse, remaining performance element still can proper communication; In bus, performance element adopts unique geocoding to be numbered can to carry out packet communication, improve versatility and the networking efficiency of production line.
With above-mentioned according to desirable embodiment of the present utility model for enlightenment, by above-mentioned description, relevant staff not departing from scope of the present utility model, can carry out various change and amendment completely.The technical scope of this utility model is not limited to the content on specification, must determine its technical scope according to right.