Wireless built controller based on factory automation Industrial Ethernet fieldbus
Technical field
The present invention relates to automation field, is a kind of wireless built controller based on factory automation (EPA, Ethernet for Plant Automation) Industrial Ethernet fieldbus specifically.
Background technology
Field control system mainly adopts Distributed Control System (DCS) at present.DCS adopts one or more control units that multiloop is controlled, and its control section is distributed on some control boards, and one or more loops are arranged on each control board.In the process that the DCS system forms, owing to be subjected to early stage this defect influence of system lock that exists of computer system, the product of each producer establishes one's own system, the equipment of different manufacturers can not be interconnected, this dedicated network is difficult to realize exchanging and interoperability, and there are a lot of difficulties in the network system of forming wider information sharing.
Along with Ethernet TCP/UDP (Transfer Control Protocol, User DatagramProtocol) technology rapid development, Ethernet has been widely used in the Internet, local area network (LAN), office network and business administration network, the particularly application of ethernet technology in Internet makes its technology ripe day by day.Because Ethernet protocol is comparatively simple, therefore obtained most computers equipment manufacturers and software developer and user's approval.The widely accepted fact of this just Ethernet makes the application of Ethernet have trend and the possibility that develops to the industrial control system bottom.Ethernet+TCP/UDP technology is applied to become control circle new developing direction in the control system.
EPA Industrial Ethernet fieldbus is to comply with the development trend that international fieldbus combines with ethernet technology, by the standard for Fieldbus with complete independent intellectual property right of China's formulation.The formulation of EPA Industrial Ethernet standard for Fieldbus has solved the real-time problem that Ethernet is applied to the key technology-data communication of industrial field device level communication, consistency problem for standard for Fieldbusization and network integration provides solution simultaneously, thoroughly changed the research and development present situation under one's control technically of China's field bus technique, had landmark effect for the field bus technique that develops China oneself.
With WLAN (wireless local area network) (IEEE 802.11b) is that the wireless communication technology of representative has been passed through years of development, can satisfy the requirement that Industry Control is used, particularly between Ethernet and WLAN (wireless local area network), can pass through access point (AP, Access Point) realization is seamless interconnected, thereby for the integrated advantage that provides of wireless network and cable network is provided; Wireless communication technology combined with EPA Industrial Ethernet technology be applied to the Industry Control scene and do not appear in the newspapers as yet.
Summary of the invention
In order to overcome the defective that closed system caused that dedicated network constitutes, the purpose of this invention is to provide a kind of wireless built controller based on EPA Industrial Ethernet fieldbus, it combines wireless communication technology and EPA Industrial Ethernet technology, rely on controller itself to realize the radio communication of control and equipment room, constitute the EPA Control Network with other equipment based on EPA Industrial Ethernet standard for Fieldbus.
To achieve these goals, technical scheme of the present invention is as follows:
The present invention relates to following several key technologies:
1) exploitation of EPA Industrial Ethernet field bus communication protocol stack;
2) exploitation of the application program of realization controlled function;
3) EPA Industrial Ethernet technology and wireless communication technology are combined, realize the seamless link of radio communication and ethernet technology;
Technical solution of the present invention comprises: comprise main controller module, wireless communication module two parts, wherein:
-main controller module, operation EPA Industrial Ethernet field bus communication protocol stack, execution control function; Store EPA Industrial Ethernet field bus communication protocol stack;
-wireless communication module, the radio communication function of responsible embedded controller links to each other with the main controller module by usb circuit;
Wherein: the main controller module is made up of microcontroller and storage area, is core with the microcontroller, and storage area is made of the first~two random asccess memory, flash memory, links to each other with microcontroller respectively; Wherein flash memory storage has EPA Industrial Ethernet field bus communication protocol stack; Microcontroller is by usb circuit and wireless communication module;
Described EPA Industrial Ethernet field bus communication protocol stack is made up of EPA management system module, EPA application layer module, EPA socket mapping block and EPA client layer application module, wherein the EPA management system module obtains the data from EPA socket mapping block from the pipeline of self, the response data after handling is sent to the pipeline of EPA socket mapping block; The EPA application layer module is obtained the data from EPA client layer application module, EPA socket mapping block from the pipeline of self, send to the pipeline of EPA socket mapping block or the pipeline of EPA client layer application module after handling; EPA socket mapping block obtains the data from EPA management system module, EPA application layer module, EPA Control Network from the pipeline of self, call the TCP/UDP data transport service after data from EPA management system module, EPA application layer module are encapsulated again data are sent to wireless communication module, simultaneously, EPA socket mapping block will send to the pipeline of EPA management system module or the pipeline of EPA application layer module after the data parsing from the EPA Control Network; EPA client layer application module obtains the data of EPA application layer module from the pipeline of self, finish control operation, dateout is sent in the pipeline of EPA application layer module;
Described EPA management system module specific tasks are: at first obtain the data from EPA socket mapping block from the pipeline of self, the data of obtaining are resolved, judge the type of service request, operate accordingly according to concrete service execution, the state of equipment is set, again response data is sent to the pipeline of EPA socket mapping block; Wherein the type of service request is divided into equipment query request service, the service of equipment query request-reply, the facility information service of reading, device asserts service, device attribute and service is set, removes the device attribute service;
Described EPA application layer module specific tasks are: obtain earlier the data from EPA socket mapping block, EPA client layer application module from the pipeline of self, to resolving from the data of EPA socket mapping block, judge the type of service, operate accordingly according to concrete service execution, wherein service is divided into territory download service, territory upload service, event notice service, the variable service of reading, variable is write service, information distribution services; If be territory download service and territory upload service, after executing corresponding operation response data is sent in the pipeline of EPA socket mapping block, if write service or information distribution services for the service of reading of event notice service, variable, variable, then data sent to the pipeline of EPA client layer application module; Send to the pipeline of EPA socket mapping block after data from EPA client layer application module are encapsulated;
Described EPA socket mapping block specific tasks are: obtain earlier the data from EPA management system module, EPA application layer module, EPA Control Network from the pipeline of self, then to whether being to judge from the data of EPA Control Network, if not data, then data are sent to wireless communication module by the TCP/UDP data transport service from the EPA Control Network; If, judge whether it is the data that send to the EPA management system module again from the data of EPA Control Network, be the data that send to the EPA management system module, then data are sent to the EPA management system module; Otherwise judge whether it is the data that send to the EPA application layer module again,, then data are sent to the EPA application layer module if send to the data of EPA application layer module; Otherwise be left intact and abandon data;
Described EPA client layer application module specific tasks are: the data of at first obtaining the EPA application layer module from the pipeline of self, finish control operation after resolving, and produce corresponding dateout, after being encapsulated, dateout sends in the pipeline of EPA application layer module.
The present invention is used for the wireless built controller of data acquisition and control in the complete process automatic field.The core technology of controller---EPA Industrial Ethernet field bus communication protocol stack, and combine with WLAN standard IEEE 802.11b wireless communication technology, have following advantage:
1. be widely used.Can be applied to the automation control area of industries such as chemical industry, petrochemical industry, pharmacy, metallurgy, mining, electric power, food processing, the energy, digital control system.
2. the characteristics that have full distributed control.Client layer application module among the present invention promptly can be finished data acquisition function, can finish controlled function again simultaneously, adopts the present invention can constitute full distributed control system.
3. the opening that has system.Because consistent the disclosing of communication protocol that the present invention followed can be realized information exchange between the equipment of each different manufacturers, can construct the open interconnected systems of automatic field by this product.
4. reduce cost.The present invention adopts communication, can save the wiring cost in the traditional control system, reduces system cost greatly.
5. seamless integrated with Ethernet.The present invention can realize seamless integrated with Ethernet easily by wireless communication module.
Because the present invention has above characteristics, makes the control system slave unit, is installed to normal operation and repair and maintenance thereof, all embodies superiority.As:
1. save hardware quantity and investment.Because the present invention can carry out data acquisition simultaneously and realize controlled function, thereby can save the usage quantity of transducer and actuator, thereby has saved a large number of hardware investment, and can reduce the floor space in control room.
2. saving mounting cost.Owing to adopted wireless communication technology, thereby the consumption of cable, terminal, groove box, crane span structure significantly reduces, and connecting line equipment also significantly reduces with the workload that joint is proofreaded.When needs increase field apparatus, need not to set up new cable, can directly use, both saved investment, also reduced the workload of design, installation.
3. saving maintenance costs.Owing to the invention provides Equipment Management Function, the operation that the user can the online query all devices, the diagnosis maintenance information is so that early stage analyzing failure cause and getting rid of has fast shortened and safeguarded downtime.
4. the accuracy and the reliability of system have been improved.Because intellectuality of the present invention, digitlization are compared with analog signal, it has fundamentally improved the accuracy of measuring with control, has reduced the transmission error; Because the present invention can realize controlled function at device interior, improved the functional reliability of system simultaneously.
Description of drawings
Fig. 1 is a hardware block diagram of the present invention.
Fig. 2-the 1st, main controller modular circuit schematic diagram of the present invention (containing microcontroller).
Fig. 2-the 2nd, main controller modular circuit schematic diagram of the present invention (storage area).
Fig. 3-the 1st, wireless communication module circuit theory diagrams of the present invention.
Fig. 3-the 2nd, usb circuit of the present invention.
Fig. 4 is an EPA Industrial Ethernet field bus communication protocol stack program structure diagram of the present invention.
Fig. 5 is an EPA management system module program flow diagram of the present invention.
Fig. 6 is an EPA application layer module program flow diagram of the present invention.
Fig. 7 is an EPA socket modular program flow chart of the present invention.
Fig. 8 is an EPA client layer application module program flow diagram of the present invention.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail.
As shown in Figure 1, the present invention includes main controller module and wireless communication module two parts, that is:
Main controller module operation EPA Industrial Ethernet field bus communication protocol stack is responsible for protocol data being handled execution control function.The main controller module is made up of shown in Fig. 2-1 microcontroller and storage area, and the main controller module is a core circuit, is controlling the normal operation of whole system and the realization of each function.This module is to be the hardware platform of core with microcontroller U1 (the ARM9 product of atmel corp---AT91RM9200 chip).Shown in Fig. 2-2, storage area is made of the first~two random asccess memory U2~U3, flash memory U4, links to each other with microcontroller U1 respectively; Wherein EPA Industrial Ethernet field bus communication protocol stack is stored in flash memory U4; Microcontroller U1 is by usb circuit and wireless communication module.
As shown in Figure 1, wireless communication module (for commercial product) has solidified the IEEE802.11b wireless LAN communication agreement of standard, described wireless communication module is as wireless built controller communication interface, the interface of compliant wireless local area networks standard is provided, wireless communication module is encoded to the data that send and receive, and the data that the energy automatic butt is received in receiving data procedures are carried out frame check simultaneously.The data that send and receive are encoded, and the data that the energy automatic butt is received in receiving data procedures are carried out frame check simultaneously.Shown in Fig. 3-1, wireless communication module mainly is made up of USB wireless controller U5 (the AT76C505 chip of atmel corp) and wireless transceiver U6 (RFMD company 2958 chips), electricallyerasable ROM (EEROM) U7, static random access memory U8, USB wireless controller U5 input links to each other with microcontroller U1 by usb circuit, and output is to wireless transceiver U6; USB wireless controller U5 is furnished with electricallyerasable ROM (EEROM) U7, static random access memory U8; Realization is based on the RFDC of IEEE802.11b agreement.
Shown in Fig. 3-2, described usb circuit is made up of the 12~15 resistance R 12~R15, the 16~17 capacitor C 16~C17, wherein: an end of the 12 resistance R 12 is connected with the USB interface U+ of microcontroller U1 end, the other end of the 12 resistance R 12 links to each other with an end of the 15 resistance R 15 and the 17 capacitor C 17 respectively, link to each other simultaneously with the USB interface of USB wireless controller U5, the 15 resistance R 15 and the other end of the 17 capacitor C 17 with digitally be connected; One end of the 13 resistance R 13 is connected with the USB interface U-of microcontroller U1 end, the other end of the 13 resistance R 13 links to each other with an end of the 14 resistance R 14 and the 16 capacitor C 16 respectively, link to each other simultaneously with the USB interface of USB wireless controller U5, the other end of the 14 resistance R 14 and the 16 capacitor C 16 with digitally be connected.
As shown in Figure 4, EPA Industrial Ethernet field bus communication protocol stack is made up of EPA management system module, EPA application layer module, EPA socket mapping block and EPA client layer application module, each module has a pipeline respectively, communicates by pipeline between the module.Wherein the EPA management system module obtains the data from EPA socket mapping block from the pipeline of self, and the response data after will finishing dealing with sends to the pipeline of EPA socket mapping block; The EPA application layer module is obtained the data from EPA client layer application module, EPA socket mapping block from the pipeline of self, send to the pipeline of EPA socket mapping block or the pipeline of EPA client layer application module to after handling from the data of EPA client layer application module, EPA socket mapping block; EPA socket mapping block obtains the data from EPA management system module, EPA application layer module, EPA Control Network from the pipeline of self, call after data from EPA management system module, EPA application layer module are encapsulated again in the USB wireless controller U5 that the TCP/UDP data transport service sends to data wireless communication module (passing through driver), simultaneously, EPA socket mapping block will send to the pipeline of EPA management system module or the pipeline of EPA application layer module after the data parsing from the EPA Control Network; EPA client layer application module obtains the data of EPA application layer module from the pipeline of self, finish control operation on this basis, and dateout is sent in the pipeline of EPA application layer module.EPA Industrial Ethernet field bus communication protocol stack runs on the TCP/UDP/IP, realizes on wireless communication module and the communicating by letter of EPA network.
As shown in Figure 5, EPA management system module specific tasks are: at first obtain the data from EPA socket mapping block from the pipeline of self, then the data of obtaining are resolved, judge the type of service request, operate accordingly according to concrete service execution, wherein the type of service request is divided into equipment query request service, the service of equipment query request-reply, facility information reads service, the device asserts service, device attribute is provided with service, the service of removing device attribute, the EPA management system module is made corresponding operation according to different services, equipment state is set, then response data is sent to the pipeline of EPA socket mapping block.
As shown in Figure 6, EPA application layer module specific tasks are: obtain from the pipeline of self from EPA socket mapping block earlier, the data of EPA client layer application module, to resolving from the data of EPA socket mapping block, judge the type of service, operate accordingly according to concrete service execution, if wherein be territory download service and territory upload service, after executing corresponding operation response data is sent in the pipeline of EPA socket mapping block, if be the event notice service, the variable service of reading, variable is write service or information distribution services, then data is sent to the pipeline of EPA client layer application module; Send to the pipeline of EPA socket mapping block after data from EPA client layer application module are encapsulated.
As shown in Figure 7, EPA socket mapping block specific tasks are: obtain earlier the data from EPA management system module, EPA application layer module, EPA Control Network from the pipeline of self, then to whether being to judge from the data of EPA Control Network through TCP/UDP, if not through the data of TCP/UDP, then data are sent in the USB wireless controller U5 of wireless communication module by the TCP/UDP data transport service from the EPA Control Network; If through the data of TCP/UDP from the EPA Control Network, judge whether it is the data that send to the EPA management system module again, be the data that send to the EPA management system module, then data are sent to the EPA management system module; Otherwise judge whether it is the data that send to the EPA application layer module again,, then data are sent to the EPA application layer module if send to the data of EPA application layer module; Otherwise be left intact and abandon data.
As shown in Figure 8, EPA client layer application module specific tasks are: the data of at first obtaining the EPA application layer module from the pipeline of self, to resolve from the data of EPA application layer module, obtain needed data, on the basis of these data, finish control operation, and produce corresponding dateout, send in the pipeline of EPA application layer module after then dateout being encapsulated.