CN105939253A - Industrial wireless gateway device and protocol conversion method thereof - Google Patents

Industrial wireless gateway device and protocol conversion method thereof Download PDF

Info

Publication number
CN105939253A
CN105939253A CN201610229743.5A CN201610229743A CN105939253A CN 105939253 A CN105939253 A CN 105939253A CN 201610229743 A CN201610229743 A CN 201610229743A CN 105939253 A CN105939253 A CN 105939253A
Authority
CN
China
Prior art keywords
microprocessor
zigbee
profibus
data
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610229743.5A
Other languages
Chinese (zh)
Inventor
叶杨婷
谭翠兰
王莉
吴向成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jianghan University
Original Assignee
Jianghan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jianghan University filed Critical Jianghan University
Priority to CN201610229743.5A priority Critical patent/CN105939253A/en
Publication of CN105939253A publication Critical patent/CN105939253A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/16Gateway arrangements

Abstract

The invention relates to an industrial wireless gateway device and a protocol conversion method thereof. The device comprises a double-CPU microprocessor module, a Profibus-DP bus communication module, a ZigBee communication module and a power supply management module. The double-CPU microprocessor module is composed of a CPU1 microprocessor, a CPU2 microprocessor and a double-port RAM memory. The Profibus-DP bus communication module is composed of an SPC3 protocol chip, an optical coupling isolating circuit and an RS485 driver. The ZigBee communication module is composed of a CC2530 chip and related peripheral circuits. According to the device and the method, the ZigBee wireless network and wire industrial network techniques are mutually combined well; the software programming complexity is simplified; the working efficiency of the system is greatly improved; and the problems of data loss and communication interruption due to the fact that the speed of a Profibus-DP network mismatches with the speed of the ZigBee network are effectively solved.

Description

A kind of wireless industrial gateway device and method for converting protocol thereof
Technical field
The present invention relates to industrial communication technical field, particularly relate to a kind of wireless industrial gateway device and method for converting protocol thereof.
Background technology
Along with developing rapidly of industrial automation, field bus technique plays very important effect in industrial communication field, and particularly Profibus fieldbus is good with its real-time, stability advantages of higher becomes one of fieldbus with the fastest developing speed in China.But when industrial environment is severe or on-site terminal equipment excessively disperses, difficult wiring becomes inevitable problem in field bus technique.In recent years, technology of Internet of things is fast-developing, wireless sensor network ZigBee technology related to this have also been obtained and develops rapidly, and ZigBee technology, with numerous advantages such as the high and low cost of its reliability, low-power consumption, flexible layout, is increasingly paid attention to by industrial communication field.If ZigBee wireless terminal node is replaced traditional executor or sensor, access Profibus fieldbus networks and form moveable hybrid network, just can solve the problems such as above-mentioned fieldbus difficult wiring.Therefore to solve this compatibility, between research Profibus fieldbus and ZigBee, the wireless industrial gateway of protocol conversion is necessary.In prior art, it is " protocol conversion apparatus between PROFIBUS-DP industrial field bus and wireless ZIGBEE and method " such as patent and paper " Design of radio gateway of Profibus bus " all describes the method for converting protocol between Profibus-DP fieldbus and ZigBee wireless sensor network, but these technical research all use the hardware configuration of single CPU, single cpu not only to complete the control to two kinds of communication networks, also to complete data exchange and the protocol conversion of two kinds of networks, over-burden to make CPU, software nesting is complicated, so necessarily affect the speed of gateway protocol conversion, the requirement of real-time of fieldbus can not be met.
Summary of the invention
The invention aims to overcome the deficiencies in the prior art, provide a kind of wireless industrial gateway device and method for converting protocol thereof, built-in two CPU microprocessor of this device, respectively Profibus-Dp fieldbus networks and ZigBee are controlled without the data of on-the-spot sensor network and process, and connected by dual port RAM, it is achieved sharing and exchange of data.Reliability of the present invention is high, real-time, software programming simple, well achieves the mutual fusion of wireless network and wired industrial network technology.
The present invention is to be achieved through the following technical solutions:
A kind of wireless industrial gateway device and method for converting protocol thereof, including dual processors microprocessor module, Profibus-DP bus communication module, ZigBee communication module and power management module;Described dual processors microprocessor module is made up of CPU1 microprocessor, CPU2 microprocessor and RAM, described Profibus-DP bus communication module is made up of SPC3 protocol chip, optical coupling isolation circuit and RS485 driver, and described ZigBee communication module is made up of CC2530 chip and associated peripheral circuits.
Further, centered by described dual processors microprocessor module, described dual processors microprocessor module two ends are connected with Profibus-DP bus communication module and ZigBee communication module respectively;Described CPU1 microprocessor is connected with SPC3 protocol chip by data/address bus and Read-write Catrol bus;Described SPC3 protocol chip is connected with RS485 driver by optical coupling isolation circuit, described RS485 driver is connected with Profibus-DP fieldbus networks, described Profibus-DP bus communication module, as the DP slave station of Profibus network, can communicate with Profibus-DP main website;Described CPU2 microprocessor is connected with CC2530 chip by UART serial ports, described ZigBee communication module is as the coordinator of ZigBee wireless sensor network, it is responsible for setting up ZigBee-network, radio communication can be carried out with ZigBee router node or terminal node, described CPU1 microprocessor is connected with the two ends of RAM by respective data/address bus and Read-write Catrol bus with CPU2 microprocessor, it is achieved the data exchange of two kinds of networks and protocol conversion;Described power management module is connected with dual processors processor module, Profibus-DP bus communication module and ZigBee communication module respectively, the working power needed for providing for three modules.
Further, this gateway in Profibus-DP network side as DP slave station, in ZigBee-network side as coordinator, its operation principle is CPU1 microprocessor and CPU2 microprocessor concurrent working, respectively the data of Profibus-DP bus communication module and ZigBee communication module it is controlled and processes, and connected by dual port RAM, it is achieved the data exchange of two kinds of networks and protocol conversion.
Further, described dual port RAM is divided into data and sends relief area and data receiver relief area, what described data sent that relief area deposits is the data that send to ZigBee-network of Profibus-DP network, data that ZigBee-network sends to Profibus-DP network that what described data receiver relief area was deposited is;Described CPU1 microprocessor can only send relief area to the data of dual port RAM and carry out write operation, data receiver relief area is carried out read operation, described CPU2 microprocessor can only send relief area to the data of dual port RAM and carry out read operation, data receiver relief area is carried out write operation, therefore data send relief area and receive the relief area that relief area is all single-input single-output, so dual port RAM is divided into different data areas and both sides can be avoided to clash when accessing data.
Further, described dual port RAM typically avoids data hazard problem by hardware mediation or interrupt arbitrage mode, in order to ensure the real-time of system, the present invention uses the interrupt arbitrage mode of dual port RAM to notify that the other side CPU carries out data exchange and protocol conversion, and specific works step is as follows:
Step one: CPU1 microprocessor and CPU2 microprocessor are initialized, and Profibus-DP bus communication module and ZigBee communication module are initialized.
Step 2: the built-in vertical address mapping table of CPU2 microprocessor.In Profibus communicates, main website is to be communicated with slave station by address information, ZigBee-network is also distinguish different equipment with the network address, therefore can realize the address between master-salve station by the binding of Profibus-DP device address and the ZigBee node network address and orient.It is achieved in that: after ZigBee coordinator is set up network and allowed ZigBee node to add network, coordinator can be that each ZigBee node distributes the network address according to network topology structure, ZigBee node sends it to coordinator behind the allocated network address, it is sent to CPU2 microprocessor again by serial ports, thus can set up a ZigBee node network address address mapping table corresponding with Profibus-DP device address in CPU2 microprocessor, when occurring device powers down to cause the network address to change, the address mapping table that has only to upgrade in time ensures that the proper communication of equipment.
Step 3: SPC3 protocol chip waits that Profibus-DP main website carries out parameter setting to it, configuration is arranged, and new address is arranged.SPC3 according to the different message received, notifies that CPU1 microprocessor carries out above event handling by the way of interruption, after these work are fully completed, main website just can circulate with slave station exchanging user data.
Step 4: enter data exchange phase.Whether the inquiry of first CPU1 microprocessor receives Profibus-DP main website and sends the data of coming, if, then Profibus-DP Frame is put into the transmission relief area of dual port RAM, and the right-hand member interruption mailbox of dual port RAM is carried out write operation, send out/INTR interruption to CPU2 microprocessor.Whether CPU2 microprocessor inquiry simultaneously receives ZigBee communication module and sends the data of coming, if the data of receiving, the address mapping table that then inquiry ZigBee-network is corresponding with Profibus-DP network, and ZigBee Frame is analyzed and is repackaged into the packet meeting Profibus-DP agreement, it is stored in the reception relief area of dual port RAM.
Step 5: if CPU2 microprocessor receives interrupt event, response/INTR interrupts, after reading the Profibus-DP Frame that dual port RAM sends relief area, Profibus-DP Frame is analyzed and is repackaged into the packet meeting Zigbee protocol, and inquire about the address mapping table that Profibus-DP network is corresponding with ZigBee-network, being sent to the ZigBee node that address in ZigBee-network is corresponding, finally the right-hand member to dual port RAM interrupts mailbox and carries out read operation, removes and interrupts.Left end to dual port RAM interrupts mailbox and carries out write operation simultaneously, sends out/INTL interruption to CPU1 microprocessor.
Step 6: if CPU1 microprocessor receives interrupt event, response/INTL interrupts, and after reading Frame the most packed in dual port RAM receives relief area, is sent to Profibus-DP main website, finally the left end to dual port RAM interrupts mailbox and carries out read operation, removes and interrupts.So this system just completes the most complete data exchange and protocol conversion process, returns again to step 4 afterwards, enters the data exchange of next round.
The present invention compared with prior art, has feature highlighted below and a marked improvement:
1, when field bus technique cannot connect up because industrial environment is severe, introduce ZigBee wireless sensor technology, well achieve be combineding with each other of ZigBee wireless network and wired industrial network technology.
2, the present invention uses the hardware configuration of dual processors so that two CPU concurrent workings, does not interfere with each other, has both alleviated the work load of CPU, also simplify the complexity of software programming, substantially increases the work efficiency of system.
3, realize the high-speed communication of two CPU by the stamping-out mode of interrupting of dual port RAM, effectively solve and produce the problem such as loss of data, communication disruption because Profibus-DP network does not mates with ZigBee-network speed.
Accompanying drawing explanation
Fig. 1 is the hardware structure diagram of the present invention a kind of wireless industrial gateway device.
Fig. 2 is the circuit connection diagram of Profibus-DP bus communication module in Fig. 1.
Fig. 3 is dual processors microprocessor module and the circuit connection diagram of ZigBee communication interface module in Fig. 1.
Fig. 4 is one wireless industrial gateway device of the present invention and method for converting protocol flow chart thereof.
Fig. 5 is that CPU1 microprocessor 4 process micro-with CPU2 6 is realized by dual port RAM
The working timing figure of data exchange.
In figure: 1, RS485 driver, 2, optical coupling isolation circuit, 3, SPC3 protocol chip, 4, CPU1 microprocessor, 5, RAM, 6, CPU2,7, ZigBee communication module, 8, dual processors microprocessor module, 9, power management module, 10, Profibus-DP bus communication module.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Referring to Fig. 1-5, Fig. 1 is the hardware structure diagram of the present invention a kind of wireless industrial gateway device;Fig. 2 is the circuit connection diagram of Profibus-DP bus communication module in Fig. 1;Fig. 3 is dual processors microprocessor module and the circuit connection diagram of ZigBee communication interface module in Fig. 1;Fig. 4 is one wireless industrial gateway device of the present invention and method for converting protocol flow chart thereof;Fig. 5 is that CPU1 microprocessor 4 realizes, by dual port RAM, the working timing figure that data exchange with the micro-process of CPU2 6.
A kind of wireless industrial gateway device and method for converting protocol thereof, including dual processors microprocessor module 8, Profibus-DP bus communication module 10, ZigBee communication module 7 and power management module 9.Wherein, dual processors microprocessor module 8 is made up of CPU1 microprocessor 4, CPU2 microprocessor 6 and RAM 5, Profibus-DP bus communication module 10 is made up of SPC3 protocol chip 3, optical coupling isolation circuit 2 and RS485 driver 1, and ZigBee communication module 7 is made up of CC2530 chip and associated peripheral circuits.
Centered by described CPU microprocessor module 8, two ends are connected with Profibus-DP bus communication module 10 and ZigBee communication module 7 respectively.CPU1 microprocessor 4 is connected with SPC3 protocol chip 3 by data/address bus and Read-write Catrol bus, SPC3 protocol chip 3 is connected with RS485 driver 1 by optical coupling isolation circuit 2, RS485 driver 1 is connected with Profibus-DP fieldbus networks, Profibus-DP bus communication module 10, as the DP slave station of Profibus network, can communicate with Profibus-DP main website.CPU2 microprocessor 6 is connected with CC2530 chip by UART serial ports, and ZigBee communication module 7, as the coordinator of ZigBee wireless sensor network, is responsible for setting up ZigBee-network, can be carried out radio communication with ZigBee router node or terminal node.CPU1 microprocessor 4 is connected with the two ends of RAM 5 by respective data/address bus and Read-write Catrol bus with CPU2 microprocessor 6, it is achieved the data exchange of two kinds of networks and protocol conversion.Power management module 9 is connected with dual processors processor module 8, Profibus-DP bus communication module 10 and ZigBee communication module 7 respectively, the working power needed for providing for three modules.
Described CPU1 microprocessor and CPU2 microprocessor are SOC single-chip microcomputer C8051F021, and this single-chip microcomputer is compared with 8051 structures of standard, and instruction execution speed improves a lot.8051 single-chip microcomputers of standard perform an one-cycle instruction needs 12 system clock cycles, and C8051F021 performs an one-cycle instruction and has only to a system clock cycle.
Described RAM 5 selects the IDT7130 chip of high speed 1K*8 twoport static state RAM, SPC3 protocol chip 3 is the Profibus-DP protocol chip that Siemens Company produces, and CC2530 chip is the on-chip system chip (SOC) of the support Zigbee protocol stack that TI company produces.
The circuit of described Pofibus-DP bus communication interface module 10 connects as in figure 2 it is shown, be made up of SPC3 protocol chip 3, optical coupling isolation circuit 2 and RS485 driver 1.null8 bit data of SPC3 protocol chip 3/least-significant byte address end DB [7 ... 0]、Most-significant byte address end AB [7 ... 0] and the corresponding 8 bit data/least-significant byte address end P3 [7 ... 0] of interrupt signal end X/INT and CPU1 microprocessor 4、Most-significant byte address end P2 [7 ... 0] and interrupt signal end/INT0 connects,The read signal end XRD of SPC3 protocol chip 3、Write signal end XWR and the corresponding read signal end/RD of address latch signal end ALE and CPU1 microprocessor 4、Write signal end/WR and address latch signal end ALE connects,The serial transmitting terminal TXD of SPC3 protocol chip、Serial interface receiving end RXD that receiving terminal RXD and request transmitting terminal RTS is corresponding with optical coupling isolation circuit 2、Transmitting terminal TXD and request transmitting terminal RTS connects;Serial transmitting terminal TXD1, the receiving terminal RXD1 of optical coupling isolation circuit 2 and request transmitting terminal RTS1 and corresponding serial interface receiving end RXD1 of RS485 driver 1, transmitting terminal TXD1 and request transmitting terminal RTS1 connect;RS485 driver 1 is connected with Profibus-DP fieldbus networks.
The circuit of described dual processors microprocessor module 8 connects as it is shown on figure 3, be made up of CPU1 microprocessor 4, CPU2 microprocessor 6 and RAM 5.null8 bit data end D7L-D0L that 8 bit data end P3 [7 ... 0] of CPU1 microprocessor 4 are corresponding with RAM 5 connect,The least-significant byte address end P3 [7 ... 0] of CPU1 microprocessor 4 is connected by the least-significant byte address end A7L-A0L that latch is corresponding with RAM 5,The high 2 bit address end A9L-A8L that the high 2 bit address end P2 [1 ... 0] of CPU1 microprocessor 4 are corresponding with RAM 5 connect,Read signal end/the RD of CPU1 microprocessor 4、Write signal end/WR、Interrupt signal end/INT1、Output Enable Pin/OEL that I/O mouth P2.2 end is corresponding with RAM 5、Read-write Enable Pin R/WL、Interrupt signal end/INTL and/CEL sheet select end to connect;null8 bit data end D7R-D0R that 8 bit data end P0 [7 ... 0] of CPU2 microprocessor 6 are corresponding with RAM 5 connect,The least-significant byte address end P3 [7 ... 0] of CPU2 microprocessor 6 is connected by the least-significant byte address end A7R-A0R that latch is corresponding with RAM 5,The high 2 bit address end A9R-A8R that the high 2 bit address end P2 [1 ... 0] of CPU2 microprocessor 6 are corresponding with RAM 5 connect,Read signal end/the RD of CPU2 microprocessor 6、Write signal end/WR、Interrupt signal end/INT0、I/O mouth P2.2 end corresponding with RAM 5 output Enable Pin/OER、Read-write Enable Pin R/WR、Interrupt signal end/INTR and/CER sheet select end to connect.
The circuit of described ZigBee communication interface module 7 connects as it is shown on figure 3, be made up of CC2530 chip and associated peripheral circuits.The receiving terminal RXD of CC2530 chip, transmitting terminal TXD connect transmitting terminal TXD, the receiving terminal RXD corresponding with CPU2 microprocessor 6 and connect.This gateway in Profibus-DP network side as DP slave station, in ZigBee-network side as coordinator, its operation principle is CPU1 microprocessor 4 and CPU2 microprocessor 6 concurrent working, respectively the data of Profibus-DP bus communication module 10 and ZigBee communication module 7 it is controlled and processes, and connected by RAM 5, it is achieved the data exchange of two kinds of networks and protocol conversion.Wherein, RAM 5 is divided into two regions, relief area and data receiver relief area is sent including data, what data sent that relief area deposits is the data that send to ZigBee-network of Profibus-DP network, data that ZigBee-network sends to Profibus-DP network that what data receiver relief area was deposited is.CPU1 microprocessor 4 can only send relief area to the data of RAM 5 and carry out write operation, data receiver relief area is carried out read operation, and CPU2 microprocessor 6 can only send relief area to the data of RAM 5 and carry out read operation, data receiver relief area is carried out write operation, therefore data send relief area and receive the relief area that relief area is all single-input single-output, so RAM 5 is divided into different data areas and both sides can be avoided to clash when accessing data.
As originally seeming by a novel preferred embodiment, dual port RAM typically avoids data hazard problem by hardware mediation or interrupt arbitrage mode, in order to ensure the real-time of system, the present invention uses the interrupt arbitrage mode of dual port RAM to notify that the other side CPU carries out data exchange and protocol conversion, and specific works step is refering to shown in Fig. 2:
Step one: CPU1 microprocessor 4 and CPU2 microprocessor 6 is initialized, and Profibus-DP bus communication module 10 and ZigBee communication module 7 are initialized.
1) initialization of CPU1 microprocessor 4 and CPU2 microprocessor 6 mainly includes house dog, I/O mouth, interrupt register and some variable initializer show, and CPU2 microprocessor 6 also needs to initialize UART serial ports.
2) initialization of Profibus-DP bus communication module 10 refers mainly to the initialization of SPC3 protocol chip 3, the depositor needed including configuration, the interruption arranging protocol chip allows, the address of write slave station identification id number, SPC3 mode register is set, diagnosis buffer, parameter buffer, configuration relief area, address buffer, initialization length are set, and obtain the pointer to individual relief area and the pointer of supplementary buffer according to above initialization value, according to the data length of transmission, determine output buffer, input block and pointer.
3) initialization of ZigBee communication module 7 refers mainly to the initialization of ZigBee coordinator CC2530, the initialization of hardware module and the initialization of operating system such as including system clock, I/O mouth, intervalometer.
Step 2: the built-in vertical address mapping table of CPU2 microprocessor 6.In Profibus communicates, main website is to be communicated with slave station by address information, ZigBee-network is also distinguish different equipment with the network address, therefore can realize the address between master-salve station by the binding of Profibus-DP device address and the ZigBee node network address and orient.It is achieved in that: after ZigBee coordinator is set up network and allowed ZigBee node to add network, coordinator can be that each ZigBee node distributes the network address according to network topology structure, ZigBee node sends it to coordinator behind the allocated network address, it is sent to CPU2 microprocessor 6 again by serial ports, thus can set up a ZigBee node network address address mapping table corresponding with Profibus-DP device address in CPU2 microprocessor 6, when occurring device powers down to cause the network address to change, the address mapping table that has only to upgrade in time ensures that the proper communication of equipment.
Step 3: SPC3 protocol chip 3 waits that Profibus-DP main website carries out parameter setting to it, configuration is arranged, and new address is arranged.SPC3 protocol chip 3 according to the different message received, notifies that CPU1 microprocessor 4 carries out above event handling by the way of interruption, after these work are fully completed, main website just can circulate with slave station exchanging user data.
1) parameter is arranged.Including slave station type, from station identification numbers, supplemental characteristic length, supplemental characteristic, tributary address etc., it is consistent that these must inner with the device data library file (GSD) of gateway describe.When CPU1 microprocessor 4 receives new parameter message, can compare with the actual parameter of SPC3 protocol chip 3 Initialize installation, if identical time DP slave station just receive this message.
2) configuration is arranged.The form of input/output data and length including slave station, if the practical communication interface configuration consistency arranged when initializing with SPC3 protocol chip 3, gateway can send response message to main website, and main website asks the diagnosis data of gateway again, to find out whether gateway is ready for user data exchange.Owing to ZigBee terminal node data type is the most, form and length for every kind of node type input/output data of configuration can be cumbersome, here need the data structure defining each ZigBee node identical.
3) new address is arranged.In view of hanging multiple wireless gateway apparatus in Profibus-DP bus, the tributary address of gateway address need to be positioned to allow for the pattern of user's amendment.
Step 4: enter data exchange phase.First CPU1 microprocessor 4 inquires about whether receive the data that the transmission of Profibus-DP main website comes, if, then Profibus-DP Frame is put into the transmission relief area of RAM 5, and the 03FF unit of RAM 5 is carried out write operation, interrupt to 6/INTR of CPU2 microprocessor.CPU2 microprocessor 6 is inquired about and whether is received the data that ZigBee communication module 7 transmission comes simultaneously, if the data of receiving, the address mapping table that then inquiry ZigBee-network is corresponding with Profibus-DP network, and ZigBee Frame is analyzed and is repackaged into the packet meeting Profibus-DP agreement, it is stored in the reception relief area of RAM 5.
The capacity of the IDT7130 dual port RAM selected in the present embodiment is 1K, therefore interruption mailbox when two memory element 03FE the highest and 03FF are used as dual port RAM interruption of work, wherein 03FE is that left port interrupts mailbox, 03FF is that right output port interrupts mailbox, it is not limited to the amount of capacity of dual port RAM herein, the dual port RAM that memory capacity is bigger can be selected.
Step 5: if CPU2 microprocessor 6 receives interrupt event, response/INTR interrupts, after reading the Profibus-DP Frame that RAM 5 sends relief area, Profibus-DP Frame is analyzed and is repackaged into the packet meeting Zigbee protocol, and inquire about the address mapping table that Profibus-DP network is corresponding with ZigBee-network, it is sent to the ZigBee node that address in ZigBee-network is corresponding, finally the 03FF unit to RAM 5 carries out read operation, removes and interrupts.The 03FE unit of RAM 5 is carried out write operation simultaneously, interrupt to 4/INTL of CPU1 microprocessor.
Step 6: if CPU1 microprocessor 4 receives interrupt event, response/INTL interrupts, and after reading Frame the most packed in RAM 5 receives relief area, is sent to Profibus-DP main website, finally the 03FE unit to dual port RAM carries out read operation, removes and interrupts.So this system just completes the most complete data exchange and protocol conversion process, returns again to step 4 afterwards, enters the data exchange of next round.
CPU1 microprocessor 4 realizes the sequential chart of data exchange as shown in Figure 3 with CPU2 microprocessor 6 by RAM 5, the waveform of sequential chart is the most schematically, concrete time span and the speed of two CPU microprocessor, Profibus-DP bus and the message transmission rate of ZigBee-network, data conveying length, and ZigBee node number are relevant with characteristics such as node data frequency acquisitions.
Configuration in step 3 arranges inner regulation, and the communication interface of gateway is configured by main website for convenience, and the form and the length that define the input/output data of each ZigBee node are identical.This embodiment assumes that and in ZigBee-network, have the ZigBee terminal node of three kinds of different sensors (temperature, pressure, humidity) to prepare to communicate with Profibus-DP main website, therefore the data length designing each ZigBee node is 8 byte inputs and the output of 2 bytes, and its configuration data is 0X17 and 0X21.
Input data are the data that ZigBee node is sent to Profibus-DP main website, a length of 8 bytes.Definition first character joint is node type, and node type refers to that ZigBee node is router node or terminal node;Second byte is the network address of ZigBee node to the 3rd byte;Nybble representative sensor type, sensor type refers to it is temperature sensor, pressure transducer or humidity sensor;5th byte is the data length of sensor measurement;6th byte is the data of sensor measurement to the 7th byte;8th byte is Profibus-DP device address.When ZigBee node sends data to gateway, the most only send above seven bytes, and gateway is after receiving the data that ZigBee node transmission comes, corresponding Profibus-DP device address can be inquired according to address mapping table, and write the 8th byte and be sent to Profibus-DP main website, such main website is known that it is the data that send of which ZigBee node.
Output data are the data that Profibus-DP main website is sent to ZigBee node, and a length of 2 bytes, namely main website sends commands to gateway, needs to read the data of which ZigBee node.Defining the first byte is Profibus-DP device address;Second byte is sensor type.After Profibus-DP main website sends commands to gateway, corresponding ZigBee-network address can be inquired equally according to address mapping table, and it is sent to ZigBee coordinator after the network address is write the 3rd byte, coordinator is then forwarded to the ZigBee node that address is pointed to, and such main website just can send commands to the ZigBee node specified accurately.
Being not limited to length and the structure of packet of regulation input output data in the present embodiment, user can input length and the packet implication of output data according to the requirement definition of oneself.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all any amendment, equivalent and improvement etc. made within the spirit and principles in the present invention, should be included within the scope of the present invention.

Claims (10)

1. a wireless industrial gateway device and method for converting protocol thereof, it is characterised in that: include dual processors microprocessor module, Profibus-DP bus communication module, ZigBee communication module and power management module;Described dual processors microprocessor module is made up of CPU1 microprocessor, CPU2 microprocessor and RAM, described Profibus-DP bus communication module is made up of SPC3 protocol chip, optical coupling isolation circuit and RS485 driver, and described ZigBee communication module is made up of CC2530 chip and associated peripheral circuits.
A kind of wireless industrial gateway device the most according to claim 1 and method for converting protocol thereof, it is characterized in that: centered by described dual processors microprocessor module, described dual processors microprocessor module two ends are connected with Profibus-DP bus communication module and ZigBee communication module respectively;Described CPU1 microprocessor is connected with SPC3 protocol chip by data/address bus and Read-write Catrol bus, described SPC3 protocol chip is connected with RS485 driver by optical coupling isolation circuit, described RS485 driver is connected with Profibus-DP fieldbus networks, described Profibus-DP bus communication module, as the DP slave station of Profibus network, can communicate with Profibus-DP main website;Described CPU2 microprocessor is connected with CC2530 chip by UART serial ports, and described ZigBee communication module, as the coordinator of ZigBee wireless sensor network, is responsible for setting up ZigBee-network, can be carried out radio communication with ZigBee router node or terminal node;Described CPU1 microprocessor is connected with the two ends of RAM by respective data/address bus and Read-write Catrol bus with CPU2 microprocessor, it is achieved the data exchange of two kinds of networks and protocol conversion;Described power management module is connected with dual processors processor module, Profibus-DP bus communication module and ZigBee communication module respectively, the working power needed for providing for three modules.
A kind of wireless industrial gateway device the most according to claim 1 and method for converting protocol thereof, it is characterised in that: described CPU1 microprocessor and CPU2 microprocessor are SOC single-chip microcomputer C8051F021.
A kind of wireless industrial gateway device the most according to claim 1 and method for converting protocol thereof, it is characterized in that: described RAM selects the IDT7130 chip of high speed 1K*8 twoport static state RAM, described SPC3 protocol chip is the Profibus-DP protocol chip that Siemens Company produces, and described CC2530 chip is the on-chip system chip of the support Zigbee protocol stack that TI company produces.
A kind of wireless industrial gateway device the most according to claim 1 and method for converting protocol thereof, it is characterised in that: described ZigBee communication interface module is made up of CC2530 chip and associated peripheral circuits;The receiving terminal RXD of described CC2530 chip, transmitting terminal TXD connect transmitting terminal TXD, the receiving terminal RXD corresponding with CPU2 microprocessor and connect.
A kind of wireless industrial gateway device the most according to claim 1 and method for converting protocol thereof, it is characterized in that: described CPU1 microprocessor and CPU2 microprocessor concurrent working, respectively the data of Profibus-DP bus communication module and ZigBee communication module it is controlled and processes, and connected by RAM, it is achieved the data exchange of two kinds of networks and protocol conversion.
A kind of wireless industrial gateway device the most according to claim 1 and method for converting protocol thereof, it is characterized in that: described RAM is divided into data and sends relief area and data receiver relief area, what described data sent that relief area deposits is the data that send to ZigBee-network of Profibus-DP network, data that ZigBee-network sends to Profibus-DP network that what described data receiver relief area was deposited is;Described CPU1 microprocessor can only send relief area to the data of RAM and carry out write operation, data receiver relief area is carried out read operation, described CPU2 microprocessor can only send relief area to the data of RAM and carry out read operation, and data receiver relief area is carried out write operation.
A kind of wireless industrial gateway device the most according to claim 1 and method for converting protocol thereof, it is characterised in that: using the interrupt arbitrage mode of dual port RAM to notify that the other side CPU carries out data exchange and protocol conversion, specific works step is as follows:
Step one: CPU1 microprocessor and CPU2 microprocessor are initialized, and Profibus-DP bus communication module and ZigBee communication module are initialized;
1) initialization of CPU1 microprocessor and CPU2 microprocessor mainly includes house dog, I/O mouth, interrupt register and some variable initializer show, and CPU2 microprocessor also needs to initialize UART serial ports;
2) initialization of Profibus-DP bus communication module refers mainly to the initialization of SPC3 protocol chip, the depositor needed including configuration, the interruption arranging protocol chip allows, the address of write slave station identification id number, SPC3 mode register is set, diagnosis buffer, parameter buffer, configuration relief area, address buffer, initialization length are set, and obtain the pointer to individual relief area and the pointer of supplementary buffer according to above initialization value, according to the data length of transmission, determine output buffer, input block and pointer;
3) initialization of ZigBee communication module refers mainly to the initialization of ZigBee coordinator CC2530, the initialization of hardware module and the initialization of operating system such as including system clock, I/O mouth, intervalometer;
Step 2: the built-in vertical address mapping table of CPU2 microprocessor, in Profibus communicates, main website is to be communicated with slave station by address information, ZigBee-network is also distinguish different equipment with the network address, therefore can realize the address between master-salve station by the binding of Profibus-DP device address and the ZigBee node network address and orient;It is achieved in that: after ZigBee coordinator is set up network and allowed ZigBee node to add network, coordinator can be that each ZigBee node distributes the network address according to network topology structure, ZigBee node sends it to coordinator behind the allocated network address, it is sent to CPU2 microprocessor again by serial ports, thus can set up a ZigBee node network address address mapping table corresponding with Profibus-DP device address in CPU2 microprocessor, when occurring device powers down to cause the network address to change, the address mapping table that has only to upgrade in time ensures that the proper communication of equipment;
Step 3: SPC3 protocol chip 3 waits that Profibus-DP main website carries out parameter setting to it, configuration is arranged, and new address is arranged;SPC3 protocol chip according to the different message received, notifies that CPU1 microprocessor carries out above event handling by the way of interruption, after these work are fully completed, main website just can circulate with slave station exchanging user data;
1) parameter is arranged, and including slave station type, from station identification numbers, supplemental characteristic length, supplemental characteristic, tributary address etc., it is consistent that these must inner with the device data library file (GSD) of gateway describe;When CPU1 microprocessor receives new parameter message, can compare with the actual parameter of SPC3 protocol chip 3 Initialize installation, if identical time DP slave station just receive this message;
2) configuration is arranged, the form of input/output data and length including slave station, if the practical communication interface configuration consistency arranged when initializing with SPC3 protocol chip, gateway can send response message to main website, main website asks the diagnosis data of gateway again, to find out whether gateway is ready for user data exchange;
Owing to ZigBee terminal node data type is the most, form and length for every kind of node type input/output data of configuration can be cumbersome, here need the data structure defining each ZigBee node identical;
3) new address is arranged, it is contemplated that may hang multiple wireless gateway apparatus in Profibus-DP bus, the tributary address of gateway address need to be positioned to allow for the pattern of user's amendment;
Step 4: enter data exchange phase, whether the inquiry of first CPU1 microprocessor receives Profibus-DP main website and sends the data of coming, if, then Profibus-DP Frame is put into the transmission relief area of dual port RAM, and the right-hand member interruption mailbox of dual port RAM is carried out write operation, send out/INTR interruption to CPU2 microprocessor;Whether CPU2 microprocessor inquiry simultaneously receives ZigBee communication module and sends the data of coming, if the data of receiving, the address mapping table that then inquiry ZigBee-network is corresponding with Profibus-DP network, and ZigBee Frame is analyzed and is repackaged into the packet meeting Profibus-DP agreement, it is stored in the reception relief area of dual port RAM;
Step 5: if CPU2 microprocessor receives interrupt event, response/INTR interrupts, after reading the Profibus-DP Frame that dual port RAM sends relief area, Profibus-DP Frame is analyzed and is repackaged into the packet meeting Zigbee protocol, and inquire about the address mapping table that Profibus-DP network is corresponding with ZigBee-network, be sent to address in ZigBee-network corresponding ZigBee node, finally the right-hand member of dual port RAM is interrupted mailbox and carries out read operation, remove and interrupt;Left end to dual port RAM interrupts mailbox and carries out write operation simultaneously, sends out/INTL interruption to CPU1 microprocessor;
Step 6: if CPU1 microprocessor receives interrupt event, response/INTL interrupts, and after reading Frame the most packed in dual port RAM receives relief area, is sent to Profibus-DP main website, finally the left end to dual port RAM interrupts mailbox and carries out read operation, removes and interrupts;So this system just completes the most complete data exchange and protocol conversion process, returns again to step 4 afterwards, enters the data exchange of next round.
A kind of wireless industrial gateway device and method for converting protocol thereof, described CPU1 microprocessor and CPU2 microprocessor realize the concrete time span of the sequential chart of data exchange and the speed of two CPU microprocessor by RAM, Profibus-DP bus and the message transmission rate of ZigBee-network, data conveying length, and ZigBee node number are relevant with characteristics such as node data frequency acquisitions.
A kind of wireless industrial gateway device and method for converting protocol thereof, in described step 3, configuration arranges inner regulation, the communication interface of gateway is configured by main website for convenience, and the form and the length that define the input/output data of each ZigBee node are identical.
CN201610229743.5A 2016-04-14 2016-04-14 Industrial wireless gateway device and protocol conversion method thereof Pending CN105939253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610229743.5A CN105939253A (en) 2016-04-14 2016-04-14 Industrial wireless gateway device and protocol conversion method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610229743.5A CN105939253A (en) 2016-04-14 2016-04-14 Industrial wireless gateway device and protocol conversion method thereof

Publications (1)

Publication Number Publication Date
CN105939253A true CN105939253A (en) 2016-09-14

Family

ID=57152246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610229743.5A Pending CN105939253A (en) 2016-04-14 2016-04-14 Industrial wireless gateway device and protocol conversion method thereof

Country Status (1)

Country Link
CN (1) CN105939253A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547719A (en) * 2016-09-26 2017-03-29 中国电子科技集团公司第二十九研究所 A kind of system communication and control process synchronous method
CN107465620A (en) * 2017-08-03 2017-12-12 爱普(福建)科技有限公司 A kind of conventional data router and its communication means
CN107819621A (en) * 2017-11-06 2018-03-20 珠海格力电器股份有限公司 A kind of collocation method of gateway, device and gateway
CN108173723A (en) * 2017-12-26 2018-06-15 深圳市英威腾电气股份有限公司 A kind of Profinet communications protocol transition card and conversion method
CN108494648A (en) * 2018-01-26 2018-09-04 扬州海通电子科技有限公司 A kind of Profibus signal wireless transmission systems
CN108768887A (en) * 2018-05-31 2018-11-06 江汉大学 A kind of dispatching method, device and electronic equipment based on CICQ
CN109218149A (en) * 2018-10-24 2019-01-15 深圳绿米联创科技有限公司 Equipment cut-in method, device, network system and gateway
CN109947019A (en) * 2019-03-27 2019-06-28 中国铁道科学研究院集团有限公司 The processing unit and concurrent working control method of train network input-output system
CN110413591A (en) * 2019-07-10 2019-11-05 广州博依特智能信息科技有限公司 A kind of industrial data acquisition method and edge calculations gateway
CN113098873A (en) * 2021-04-02 2021-07-09 北京天融信网络安全技术有限公司 Data transmission method, data transmission device, computer equipment and computer readable storage medium
CN113612801A (en) * 2021-09-30 2021-11-05 浙江国利信安科技有限公司 EPA gateway equipment and EPA cross-network communication method
CN113890785A (en) * 2021-11-03 2022-01-04 西安热工研究院有限公司 Communication system and method for field bus hybrid networking
CN117792831A (en) * 2024-02-27 2024-03-29 天津大学四川创新研究院 Multi-protocol Modbus gateway control system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567903A (en) * 2003-07-07 2005-01-19 浙江中控技术股份有限公司 Ethernet gateway based on field bus and implementing method thereof
CN1889543A (en) * 2006-07-17 2007-01-03 朱宁宁 A communication gate in automatic system
CN201435738Y (en) * 2009-05-22 2010-03-31 浙江天正电气股份有限公司 PROFIBUS-DP and CAN field bus protocol converter
US20140156819A1 (en) * 2012-11-30 2014-06-05 Alexandros Cavgalar Communications modules for a gateway device, system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567903A (en) * 2003-07-07 2005-01-19 浙江中控技术股份有限公司 Ethernet gateway based on field bus and implementing method thereof
CN1889543A (en) * 2006-07-17 2007-01-03 朱宁宁 A communication gate in automatic system
CN201435738Y (en) * 2009-05-22 2010-03-31 浙江天正电气股份有限公司 PROFIBUS-DP and CAN field bus protocol converter
US20140156819A1 (en) * 2012-11-30 2014-06-05 Alexandros Cavgalar Communications modules for a gateway device, system and method

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547719A (en) * 2016-09-26 2017-03-29 中国电子科技集团公司第二十九研究所 A kind of system communication and control process synchronous method
CN107465620B (en) * 2017-08-03 2020-07-10 爱普(福建)科技有限公司 General data router and communication method thereof
CN107465620A (en) * 2017-08-03 2017-12-12 爱普(福建)科技有限公司 A kind of conventional data router and its communication means
CN107819621A (en) * 2017-11-06 2018-03-20 珠海格力电器股份有限公司 A kind of collocation method of gateway, device and gateway
CN108173723A (en) * 2017-12-26 2018-06-15 深圳市英威腾电气股份有限公司 A kind of Profinet communications protocol transition card and conversion method
CN108494648A (en) * 2018-01-26 2018-09-04 扬州海通电子科技有限公司 A kind of Profibus signal wireless transmission systems
CN108494648B (en) * 2018-01-26 2020-08-25 扬州海通电子科技有限公司 Profibus signal wireless transmission system
CN108768887B (en) * 2018-05-31 2021-09-28 江汉大学 Scheduling method and device based on CICQ and electronic equipment
CN108768887A (en) * 2018-05-31 2018-11-06 江汉大学 A kind of dispatching method, device and electronic equipment based on CICQ
CN109218149A (en) * 2018-10-24 2019-01-15 深圳绿米联创科技有限公司 Equipment cut-in method, device, network system and gateway
CN109947019A (en) * 2019-03-27 2019-06-28 中国铁道科学研究院集团有限公司 The processing unit and concurrent working control method of train network input-output system
CN110413591A (en) * 2019-07-10 2019-11-05 广州博依特智能信息科技有限公司 A kind of industrial data acquisition method and edge calculations gateway
CN113098873A (en) * 2021-04-02 2021-07-09 北京天融信网络安全技术有限公司 Data transmission method, data transmission device, computer equipment and computer readable storage medium
CN113098873B (en) * 2021-04-02 2021-11-16 北京天融信网络安全技术有限公司 Data transmission method, data transmission device, computer equipment and computer readable storage medium
CN113612801A (en) * 2021-09-30 2021-11-05 浙江国利信安科技有限公司 EPA gateway equipment and EPA cross-network communication method
CN113612801B (en) * 2021-09-30 2022-01-04 浙江国利信安科技有限公司 EPA gateway equipment and EPA cross-network communication method
CN113890785A (en) * 2021-11-03 2022-01-04 西安热工研究院有限公司 Communication system and method for field bus hybrid networking
CN113890785B (en) * 2021-11-03 2022-12-27 西安热工研究院有限公司 Communication system and method for field bus hybrid networking
CN117792831A (en) * 2024-02-27 2024-03-29 天津大学四川创新研究院 Multi-protocol Modbus gateway control system and method

Similar Documents

Publication Publication Date Title
CN105939253A (en) Industrial wireless gateway device and protocol conversion method thereof
CN104734980B (en) Industrial field bus MPR and multi protocol conversion method
CN101345629B (en) Double on-site bus interface converter
CN103425106B (en) The master/slave station control system of a kind of EtherCAT based on Linux and method
CN100524122C (en) Bus controller for numerical control system of full digital ring bus
CN107707447A (en) A kind of slave station system and control method based on EtherCAT
JP5084908B2 (en) Programming device for network of control nodes and system having the same
CN109901469B (en) Method for realizing PROFIBUS-PA bus communication based on FPGA technology
CN103825883A (en) Multi-protocol conversion equipment based on wireless ZigBee, CAN bus and MODBUS/TCP and realization method thereof
JP2011040095A (en) Interface module for use with modbus device network and fieldbus device network
CN102710478A (en) Integration slave node device of Profibus-DP (profibus-data processing) and Modbus
CN104636301B (en) A kind of extensive PLC High speed rear panels bus system based on PCI E interfaces
CN100504688C (en) Private chip for implementing bus controller function in ring bus numerical control system
CN201435738Y (en) PROFIBUS-DP and CAN field bus protocol converter
CN101013315A (en) General numerical control system based on full digital ring bus
CN101013314A (en) Integrated numerical control system based on full digital ring bus
JPWO2008146477A1 (en) PLC with communication function
CN102724090A (en) Process field bus (PROFIBUS) DP/PA integrated embedded slave node communication device based on DP controller with integrated 8031 core (DPC31)
CN200997073Y (en) Universal digital-controlled system based on digital ring bus
CN115967592A (en) Gateway equipment for interconnecting EtherCAT bus and Profinet bus
CN105245424A (en) Interconnection method for PROFIBUS DP and PROFINET communication networks through sharing storage unit
CN107229586B (en) Communication means based on RS485 bridge circuit device
CN201601690U (en) Input-output module based on EtherCAT technique
CN205647565U (en) Wireless gateway device of industry
CN100473176C (en) Device for judging single board in position

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160914