Summary of the invention
Technical problem to be solved by this invention is to provide a kind of system and method for industrial data transmission, to realize the industrial data transmission of cross-system.
The present invention also provides a kind of system of industrial data transmission, comprise multiple the first objects, stipulations gateway and multiple second object, each first object is connected with described stipulations gateway respectively and carries out real time communication simultaneously, described stipulations gateway is connected respectively with each second object and carries out real time communication simultaneously, and described the first object or second object are the production equipment bus of instrument, single production equipment, multiple production equipment formation or the production system that multiple production equipment bus forms;
Described stipulations gateway comprises:
Distribution module, adopts different network interface/interfaces to be connected with each the first object for stipulations gateway, and the data communication protocol adopting according to each the first object arranges the parameter of described network interface/interface;
First selects module, for the first driver corresponding to data communication protocol of selecting to adopt with described the first object;
Data acquisition module, for calling described the first driver by corresponding network interface/interface and described the first object communication, respectively from each the first object acquisition industrial data and be saved in the memory address that initialized data base distributes for each the first object, described industrial data comprises with can data and/or production status data;
Second selects module, the data communication protocol passage adopting for configuring respectively each second object, for each second object, the data communication protocol adopting by described second object is selected corresponding network interface/interface and the second driver, and different second objects adopts different network interface/interfaces to be connected with described stipulations gateway;
Data conversion module, for the memory address of distributing for each the first object from described initialized data base, read the industrial data of at least one the first object, before sending industrial data to each second object, for each second object, read industrial data is converted to the form of the data communication protocol that meets described second object employing;
Data transmission blocks, communicates by letter with each second object respectively by network interface/interface of selecting for calling described the second driver, and the industrial data after format conversion is sent to respectively to each second object.
Preferably, for the first object that uses identical address, distribute the different network interface/interfaces of same type, make each the first object use separately a network interface/interface.
Preferably, described device also comprises:
Module is write in list, for for each the first object, writes data address list, and wherein record is for preserving from the memory address of the industrial data of described the first object acquisition;
Described data acquisition module, specifically for according to obtaining order and the time interval of setting in advance, reads industrial data from each the first object circulation respectively.
Preferably, described device also comprises:
Notification module carries out real time communication with each second object for calling described the second driver respectively by network interface/interface of selecting simultaneously, notifies described second object to drive according to described the second driver deployment;
Described notification module comprises:
Submodule is set, for driving parameter and the access rights of described the second driver are set;
Configuration submodule, communicate by letter with each second object respectively by network interface/interface of selecting for calling described the second driver, described driving parameter and described access rights are sent to described second object, with by described second object according to described driving parameter and described access rights configuration driven.
Preferably, described device also comprises:
Path Setup module, sets up respectively corresponding data transmission channel for described stipulations gateway, for the industrial data transmission between each network interface/interface and described the first object.
The present invention also provides a kind of method of industrial data transmission, comprising:
Stipulations gateway adopts different network interface/interfaces to be connected with each the first object, and the data communication protocol adopting according to each the first object arranges the parameter of described network interface/interface, each the first object is connected with described stipulations gateway respectively and carries out real time communication simultaneously, described stipulations gateway is connected respectively with multiple second objects and carries out real time communication simultaneously, and described the first object or second object are the production equipment bus of instrument, single production equipment, multiple production equipment formation or the production system that multiple production equipment bus forms;
Select the first driver corresponding to data communication protocol adopting with described the first object, call described the first driver by corresponding network interface/interface and described the first object communication, respectively from each the first object acquisition industrial data and be saved in the memory address that initialized data base distributes for each the first object, described industrial data comprises with can data and/or production status data;
Configure respectively the data communication protocol passage that each second object adopts, for each second object, the data communication protocol adopting by described second object is selected corresponding network interface/interface and the second driver, and different second objects adopts different network interface/interfaces to be connected with described stipulations gateway;
The memory address of distributing for each the first object from described initialized data base, read the industrial data of at least one the first object, before sending industrial data to each second object, for each second object, read industrial data is converted to the form of the data communication protocol that meets described second object employing;
Call described the second driver and communicate by letter with each second object respectively by network interface/interface of selecting, the industrial data after format conversion is sent to respectively to each second object.
Preferably, for the first object that uses identical address, distribute the different network interface/interfaces of same type, make each the first object use separately a network interface/interface.
Preferably, described method also comprises:
For each the first object, write data address list, wherein record is for preserving from the memory address of the industrial data of described the first object acquisition;
Describedly comprise from each the first object acquisition industrial data respectively:
According to obtaining order and the time interval of setting in advance, read industrial data from each the first object circulation respectively.
Preferably, described method also comprises:
Call described the second driver and carry out real time communication with each second object respectively by network interface/interface of selecting simultaneously, notify described second object to drive according to described the second driver deployment;
Described notify described second object according to described second driver deployment drive comprise:
Driving parameter and the access rights of described the second driver are set;
Calling described the second driver communicates by letter with each second object respectively by network interface/interface of selecting, described driving parameter and described access rights are sent to described second object, with by described second object according to described driving parameter and described access rights configuration driven.
Preferably, described method also comprises:
In described stipulations gateway, set up respectively corresponding data transmission channel, for the industrial data transmission between each network interface/interface and described the first object.
Compared with prior art, the present invention has the following advantages:
According to the embodiment of the present invention, stipulations gateway is used for carrying out real time communication with stipulations gateway for the different network interface/interface of multiple the first object dynamic assignment that connect simultaneously, stipulations gateway is by selecting the driver corresponding with the data communication protocol of the first object, call driver is communicated by letter with it by the network interface/interface distributing, gather industrial data and be kept at database from the first object, stipulations gateway is also connected with multiple second objects and carries out real time communication, the industrial data of collection is communicated by letter with it by the driver of selecting, and the industrial data that reads the first object of storage sends to multiple second objects simultaneously.
Pass through the embodiment of the present invention, realize the communication between striding equipment or system, the industrial data gathering simultaneously real time down is given multiple various level second objects, can make multiple equipment or system form more complicated network design, is applicable to more complicated applied environment.
Wherein, distribute different network interface/interfaces for the first different objects, communication between the first different objects is not disturbed mutually, use the equipment of identical ip addresses or the communication of system also not to disturb mutually, avoid network conflict time also without increasing new equipment, can ensure to transmit the safety of data simultaneously.
And, from the first object, collect data with variety of protocol form, no longer be confined to only change into a kind of protocol format, but be converted to respectively the protocol format of each second object, this multi-protocols by all kinds of means diversified channel of many data selections only adopt the outside pattern of transmitting of a kind of protocol type more convenient than traditional, adaptability is stronger, and for equipment variation, the numerous and diverse especially workshop of kind level is especially favourable.The step of format transformation is not just to carry out after getting data, carries out the operation of format transformation before issuing data to second object, and this only conversion needs the mode of the data that send can save a large amount of processing resource and processing time.
And, the stipulations gateway of the embodiment of the present invention can be to adopt the integrated stipulations conversion equipment of embedded computer, because embedded system is not lost the basic function of computer system, so carrying out the problem of data acquisition debugging, stipulations gateway also obtains solving well, the instrument that arranges of debugging acid, third party producer etc. can normal mounting in stipulations gateway, do not need the computer of the debugging use of extra band again, not only allow the process of debugging become easy, also allow the work of O&M more quick.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
The obstacle that the data of bringing based on agreement difference or protocol extension scarce capacity can not be transmitted, makes the transfer of data of cross-system in industrial circle become difficult.
Taking the simplest two systems as example, A system is expected the partial data of B system, need at least meet following three conditions:
1, A and B support a certain agreement, and A does client, and B does service end.
2, A and B possess the interface of this agreement of support, both are coupled together with transmission medium.
3, B provides sufficiently high access rights to A, allows the partial data of A access B.
From these three conditions, if only have A and two systems of B, how not complicated the data transmission procedure of cross-system is.But these are primary condition above, in industrial automation, many equipment is integrated or system combination, and skinny device or the large system of system combined one-tenth are carried out to centralized management, and the situation of United Dispatching is inevitable development trend.
In this process, not just only to have A and B so simple.Add after C and D, data may be staggered into netted, and A needs the data of BCD, and B needs the data of D, and C and D need the partial data of A.But A, B, C, D are very large, possibility is not supported same agreement, although may be even also to support same agreement, can use the limited or agreement expandability of interface cannot increase etc. again.This is all the obstacle that can not transmit based on agreement difference, interface is limited or protocol extension scarce capacity brings data.
For this obstacle, a kind of by protocol extension, by stipulations conversion, the get up scheme of unified management and scheduling of data centralization is arisen at the historic moment.This scheme, the data of each system of different agreement, is used the interface of their correspondences and agreement to collect in a new real-time data base, then by the data of real-time data base, uses corresponding interface and agreement to provide the user to needs.
At present, the equipment corresponding with the similar stipulations switch technology of this programme divides three classes:
1, without the small-sized protocol converter of operating system.
2, taking industrial computer as main body, the stipulations converting system that expansion board clamping and switch are interface.
3, use the integrated stipulations conversion equipment of embedded computer.
These three kinds of equipment cut both ways, and every kind of equipment has optimum environment for use separately, are the hardware schematic diagram corresponding to stipulations switch technology of background technology with reference to figure 1a, Fig. 1 b, Fig. 1 c and Fig. 1 d.
Showing the first with reference to figure 1a is protocol converter, and feature is:
1, volume is little, only has palm large, does not need specially for it joins a rack or control cabinet.
2, interface quantity is few, and function is simple, general only for a kind of agreement to another kind of protocol conversion, without memory function, the data volume of transmission is also little, wiring is simple, once program sizing, operation is got up reliable and stable.
3, program means is more original, and the only use order line program downloads program having, mostly is the Protocol Design for bus-type, and a stipulations conversion equipment can gather the signal of many subordinate equipments.
Therefore, this transducer is adapted at using in the integrated project of the system small-sized, device type is single, or as the special collector of a kind equipment, becomes the tributary subsystem of a large scale system integrated project.
Show the second centered by industrial computer with reference to figure 1b, patch board and increase the stipulations converting system that switch is interface, feature is:
1, interface quantity can be by increasing board expansion.
2, component number is many, need to take into account each element compatibility, system relate to drive and configuration software a lot.
3, system is huge, need to join special machine cabinet or operating desk etc.
4, energy consumption is large, its flying power to uninterrupted power supply require high.
5, need the factor of human intervention many, after being out of order, layman cannot safeguard.
6, software function is intrepid, and system quantity that can be integrated is many, and the data volume of transmission is large.
7, can history of forming database and carry out the more powerful functions such as network issue as server.
As can be seen from above, mostly the range of application of the stipulations converting system of such form is large-scale integrated project, and expensive cost and scrappy system configuration make it also need to be equipped with multiple attendants.
Show the third with reference to figure 1c and adopt the integrated stipulations conversion equipment of embedded computer, feature has:
1, integrated equipment, profile designs for network cabinet, easy for installation, and volume is little.
2, interface quantity is many, isolation mutually between interface, but interface quantity cannot be expanded.
3, use embedded OS, have every basic function of operating system, be convenient to carry out program and the configuration in network operation and remotely modifying gateway.
4, configuration, the debugging software on various bases can be installed in operating system, and support software can extension class equipment.
5, power consumption is little, less demanding to uninterrupted power supply.
Show the application thinking of stipulations conversions with reference to figure 1d, A system communicates by stipulations gateway and redundant gateway and B system and C system respectively.As can be seen from above, this equipment have sufficient interface quantity, has again operating system, and build is less, and software capability is also quite powerful.
Because the problem that first two scheme exists, one of core idea of the embodiment of the present invention is to provide the integrated stipulations of a kind of new embedded computer to change the mechanism, to realize the transfer of data of cross-system.
The mentality of designing of the embodiment of the present invention is as follows:
For the smart machine of using in industrial circle, this equipment can be analyzed from three angles.
The agreement complexity adopting in a, industrial automation is various, and interface type is also different, causes the limitation of Data Transport Protocol.
The hardware interface requirement of b, stipulations conversion equipment, and software performance requirement.
The integrated level level of c, stipulations conversion equipment.
In order to reach the object of this thinking, need hardware and software to support simultaneously.
In order to collect the data of each system, the interface that must have each system to need, this is the prerequisite basis of hardware, but also there is the situation that interface is identical, that will have multiple by same interface, and consider safety problem, and just needing between interface to isolate, any one goes wrong and can not have influence on other interface like this.Some interfaces are such as Ethernet interface, can arbitrarily expand, but the system of considering is limited to several factors, connect together and can cause network conflict, although this problem can solve by route, but collecting device itself possesses the network interface/interface of multiple isolation, just does not need to have increased new equipment again.
Packing transmitting-receiving and the parsing of protocol massages are all completed by software after all.Requirement to software has:
1, gather drive diversified, able to programme, can develop.These drive as memory bar, need that driving, just corresponding driving file is inserted in software and can be used, unwanted can pulling out, do not have can write code according to corresponding form after generate.
2, real time database management.The data that collect need to be temporarily stored in real-time data base, and the data of real-time data base are along with frequency acquisition and scan period are constantly updated.
3, data arithmetic.In order to facilitate transfer of data, often data are simplified to processing at data transmitter side, such as fixed-point number or floating number containing decimal point are simplified to the shaping number without decimal point.This just requires will reduce decimal point after data receiver side resolution data.
4, forwarding driving drives reason identical with gathering.The interface and the agreement that so conveniently have the user of demand that data are supported by oneself are read data in the system of oneself from real-time data base.
5, same data can be given multiple users by multiple interfaces and protocol forward.Such as tri-systems of BCD all need this situation of A system variable 1.
6,, for security consideration, collecting part and forwarding part all need corresponding security permission to retrain.
Finally, the hardware and software of realizing these functions has possessed simultaneously, also will consider the integrated level level of equipment.
Accordingly, according to above-mentioned mentality of designing, provide the design block diagram of the system embodiment of a kind of transfer of data of the present invention with reference to figure 2, below in conjunction with above-mentioned design block diagram, described design flow process:
1, basis thinking above, carries out hardware structure and software requirement design, determines the hardware configuration of embedded computer, and corresponding embedded system, and for software requirement, system is carried out to cutting design.
2, build embedded computer, and test interface, system compatibility and stability.
3, the program interface that exploitation can move under embedded system environment.Comprise database development, drive running environment exploitation, quadratic programming interface development.
4, pass through every programming and the test processs such as code is write, unit testing, system testing.
5, complete the development process of stipulations gateway.
6, build the running environment of stipulations gateway, continue Deta bearer ability and the operation stability reliability of test gateway.
7, finally form the stipulations gateway device of reliable and stable operation.
With reference to figure 2, show the structured flowchart of the system embodiment of a kind of industrial data transmission of the present invention, this system comprises:
Multiple the first objects 101, stipulations gateway 102 and multiple second object 103, each first object is connected with described stipulations gateway respectively and carries out real time communication simultaneously, described stipulations gateway is connected respectively with each second object and carries out real time communication simultaneously, and described the first object or second object are the production equipment bus of instrument, single production equipment, multiple production equipment formation or the production system that multiple production equipment bus forms.
For example, instrument is the electricity consumption situation of ammeter testing equipment or system, and single production equipment is product packing machine, is responsible for product packing, and multiple packing machines form a packaging production line, and multiple production lines form a whole set of and are responsible for the production system of packing.
Problem is both ways deposited in production equipment in industrial circle or production system communication, and a problem is different equipment or the data communication protocol difference of system employing, thereby causes realizing the communication between different equipment or system.In view of this, one of embodiment of the present invention core idea is, realize the communication between striding equipment or system, focus on, realize the industrial data while real time down gathering to multiple various level second objects, to be applicable to multiple production equipments or the more complicated network design of production system formation.
Described stipulations gateway 102 specifically can comprise with lower module:
Distribution module 1021, adopts different network interface/interfaces to be connected with each the first object for stipulations gateway, and the data communication protocol adopting according to each the first object arranges the parameter of described network interface/interface.
The stipulations gateway that the embodiment of the present invention adopts has the network interface/interface of multiple isolation, some production equipment uses network interface and gateway software to realize communication, some production equipment is realized communication with gateway software after by interface conversion, the data communication being connected between each network interface/interface is not disturbed mutually, distribute different network interface/interfaces for each production equipment or production system, thereby make the data communication between each production equipment or production system and stipulations gateway separate, do not interfere with each other.
Particularly, can be in advance for each the first object manual allocation network interface/interface, also dynamic assignment network interface/interface temporarily.Taking interface as example, the first object first for example, is connected with gateway by interface (cable), both can identify mutually, gateway is initiated configuring request to the first object connecting, the first object is encapsulated in the various interface parameter of communication protocol in a file and sends to gateway, gateway is write interface parameters in the relevant configuration file of incoming interface after receiving file, if interface communication success, feed back successful message to the first object, if interface communication failure, to the message of the first object feeding back unsuccessful.
Herein, different network interface/interfaces refers to for the first different objects and has distributed different network interface/interfaces, be that each first object has the own network interface/interface using separately, distribute different network interface/interfaces for the first different objects, communication between the first different objects is not disturbed mutually, avoid network conflict time also without increasing new equipment, can ensure to transmit the safety of data simultaneously.
In the embodiment of the present invention, preferably, for the first object that uses identical address, distribute the different network interface/interfaces of same type, make each the first object use separately a network interface/interface.
In the time distributing network interface/interface, the data communication protocol that network interface/interface that equipment or system are used adopts to it is relevant, can distribute corresponding network interface according to data communication protocol, multiple network interface/interfaces corresponding to a kind of data communication protocol possibility, also may be only the network interface/interface of a corresponding type, the network interface that different types of data communication protocol may corresponding same type.Corresponding being understandable that, what the first object of employing identical data communication protocol used may be the network interface/interface of same type, also may be dissimilar network interface/interface, what the first object of employing different pieces of information communication protocol used may be dissimilar network interface/interface, may be also the network interface/interface of same type.
For example, the agreements such as tcp, udp, http, dhcp, IEC103/104 are that network interface and network interface card communicate by network interface, and the agreements such as modbus, dlt/645, IEC101, can, MBUS for example, are realized and communicating by letter with gateway software by interface (rs485 interface).
For example, for existing different equipment or system to adopt identical address (IP address), can cause the problem that cannot communicate by letter with the external world because distinguishing.In the embodiment of the present invention, for the first object that uses identical address, distribute the different network interface/interfaces of same type, make each the first object use separately a network interface/interface, use the equipment of identical ip addresses or the communication of system also not to disturb mutually.
First selects module 1022, for the first driver corresponding to data communication protocol of selecting to adopt with described the first object.
Data acquisition module 1023, for calling described the first driver by corresponding network interface/interface and described the first object communication, respectively from each the first object acquisition industrial data and be saved in the memory address that initialized data base distributes for each the first object, described industrial data comprises with can data and/or production status data.
Stipulations gateway communicates by network interface/interface and each the first object, the driver that gateway adopts is corresponding with the data communication protocol that the first object of communication adopts, therefore, when stipulations gateway and the first object communication, first determine the first driver corresponding to data communication protocol adopting with the first object, then call the first driver and the first object communication, gather industrial data from each first object and be kept at preset database.In preset database, distribute respectively different memory addresss for each first object, for depositing the industrial data gathering from each the first object.
Industrial data can comprise the use energy data of the tests such as instrument, also can comprise the production status data of equipment or system, for example temperature, liquid level, flow, pressure etc.
Second selects module 1024, the data communication protocol passage adopting for configuring respectively each second object, for each second object, the data communication protocol adopting by described second object is selected corresponding network interface/interface and the second driver, and different second objects adopts different network interface/interfaces to be connected with described stipulations gateway.
Distribute different interfaces or network interface for each second object, and carry out real time communication by the data communication protocol passage configuring respectively for each second object, thereby can avoid the interference between transfer of data, can ensure to transmit the safety of data simultaneously.And, select to communicate with data communication protocol network interface/interface and second driver of second object.
Data conversion module 1025, for the memory address of distributing for each the first object from described initialized data base, read the industrial data of at least one the first object, before sending industrial data to each second object, for each second object, read industrial data are converted to the form of the data communication protocol that meets described second object employing.
Stipulations gateway calls network interface/interface and the second object that the second driver selects by upper step and communicates, and according to the demand of second object, from initialized data base, read industrial data, be specially from the address data memory of the first object, read the industrial data of the first object.
Because each second object may adopt different communication protocol, before sending data to each second object, need industrial data to be converted to and the form of data communication protocol of second object that receives data.
The stipulations gateway of the embodiment of the present invention compared with prior art, one of difference is the agreement of the rear side of stipulations conversion, in prior art, nearly all equipment is forming after database, all unify outwards to send data for a kind of stipulations form, and in this programme, be not to unify for a kind of stipulations form, but be converted to respectively the protocol format of each second object, be divergence expression, as one tree, open the loose leaf of branch.Data in database are preserved with various stipulations forms, and benefit is the stronger adaptability that various data transmission channel brings.The data of each the first object obtaining by each network interface/interface, leave in database, the data of the unified transmission of original piecemeal storage are dispersed as to the flexible system that individual data can independently transmit, when second object request access data, but directly according to the stipulations form of second object, extract corresponding data, instead of first examine second object whether can accept the agreement of gateway transmission data.This multi-protocols by all kinds of means diversified channel of many data selections only adopt a kind of protocol type outwards the pattern of transmission are more convenient than traditional, and adaptability is stronger, and for equipment variation, the numerous and diverse especially workshop of kind level is especially favourable.
And, the step of format transformation is not just to carry out after getting industrial data, before issuing industrial data to second object, carry out the operation of format transformation, this only conversion needs the mode of the industrial data sending can save a large amount of processing resource and processing time.
For example, tri-kinds of equipment of abc, respectively from the U.S., Japanese and domestic, the equipment of the U.S. can be by 123 these three kinds of agreements, the equipment of Japan can use 234 these three kinds of agreements, and home equipment can only use 4 one kinds of agreements, now tri-kinds of equipment of abc all need gateway for they provide data, gateway can use the modes such as 123456 outwards to send data, the advantage that can only use 3 modes outwards to send data with gateway displays naturally, only adopt pattern that a kind of protocol type outwards sends obviously not as this multi-protocols convenient and strong adaptability of the diversified channel of many data selections by all kinds of means.
Data transmission blocks 1026, communicates by letter with each second object respectively by network interface/interface of selecting for calling described the second driver, and the industrial data after format conversion is sent to respectively to each second object.
After stipulations gateway image data, the required data of extracting data that second object can gather from stipulations gateway, and send to second object, thus realize the transfer of data between the first object and second object.
Pass through the embodiment of the present invention, realize the communication between striding equipment or system, the industrial data gathering simultaneously real time down is given multiple various level second objects, can make multiple equipment or system form more complicated network design, is applicable to more complicated applied environment.
The equipment using in contemporary industry automated system is all high modularization, integrated equipment, the mode that adopts rack to install more.And the stipulations gateway of the embodiment of the present invention can be to adopt the integrated stipulations conversion equipment of embedded computer, for the combination of computer software and hardware, in order to meet modularization, integrated requirement, in computer with integrated, use embedded system environment to build software environment.Meanwhile, because embedded system is not lost the basic function of computer system, also obtained solving well so carry out the problem of data acquisition debugging in stipulations conversion equipment.The instrument that arranges of debugging acid, third party producer etc. can normal mounting in stipulations gateway, do not need the computer of the debugging use of extra band again, not only allow the process of debugging become easy, also allow the work of O&M more quick.
In the embodiment of the present invention, preferably, described device also comprises:
Module is write in list, for for each the first object, writes data address list, and wherein record is for preserving from the memory address of the industrial data of described the first object acquisition.
For each the first object, write data address list, data address list comprises multiple memory addresss, for depositing respectively the industrial data obtaining from the first object.
In the embodiment of the present invention, stipulations gateway can adopt various ways from the first object image data, for example gather the data of all the first objects simultaneously, or gather in batches, the data of all right each the first object of circle collection, preferably, described data acquisition module, specifically for according to obtaining order and the time interval of setting in advance, read industrial data from each the first object circulation respectively.
Can set in advance from the order of each the first object image data and the time interval of collection, according to default order and the time interval, circle collection data between each first object.
In the embodiment of the present invention, described device can also comprise:
Notification module carries out real time communication with each second object for calling described the second driver respectively by network interface/interface of selecting simultaneously, notifies described second object to drive according to described the second driver deployment.
Because second object also has oneself data communication protocol, when second object access protocol gateway, communicate by certain network interface/interface and stipulations gateway, can select corresponding network interface/interface according to data communication protocol, and determine the driver corresponding with data communication protocol, and notify second object corresponding driver to be installed to communicate with stipulations gateway.
Preferably, described notification module comprises:
Submodule is set, for driving parameter and the access rights of described the second driver are set;
Configuration submodule, communicate by letter with each second object respectively by network interface/interface of selecting for calling described the second driver, described driving parameter and described access rights are sent to described second object, with by described second object according to described driving parameter and described access rights configuration driven.
Stipulations gateway is arranged at according to the second driver of selecting the driving parameter that the second driver is relevant, based on security consideration, the data of second object access protocol gateway need corresponding security permission to retrain, the access rights of second object can be further set, driving parameter and access rights are sent to second object, by second object configuration driven accordingly.
In concrete realization, based on security consideration, can and forward security permission partly to collecting part and all retrain.
In the embodiment of the present invention, preferably, described device can also comprise:
Path Setup module, sets up respectively corresponding data transmission channel for described stipulations gateway, for the industrial data transmission between each network interface/interface and described the first object.
In sum, the method of the industrial data transmission that the embodiment of the present invention provides, can realize in System Integration Project, ensure under the prerequisite of original system safety, from original system, debug, collect industrial data with variety of protocol form, and be transmitted to and need multiple equipment of industrial data or the technical requirement of system with various protocols form.
For making those skilled in the art understand better the present invention, below by concrete example, the system of a kind of industrial data transmission described in the embodiment of the present invention is described.
This example is the use-case of the on-the-spot stipulations gateway of bright virtue.
There is DCS system (Distributed Control System at bright fragrant iron and steel scene, dcs), plc equipment (Programmable Logic Controller, programmable logic controller (PLC)), various instrument, electric power system 104 stipulations and ammeter with RS485 communication protocol, all data need to be changed into opc agreement and issue server on together and process.
The technical problem overcoming in this example comprises:
1.1, various device and the system size of access differ, hierarchical relationship complexity.Such as DCS system and an intelligent instrument with RS485 communication will access in a stipulations gateway.One is large-scale synthesis automated system, and one is an instrument, but before data surface, each equipment is all the same.
1.2, the agreement that each equipment or system are carried is varied.In steel-making subsidiary factory, ammeter has used the agreement of DLT-1997 and two kinds of versions of DLT-2007, and DCS system has been used OPC communications protocol, the IEC104 agreement that electric power system is used, part intelligent instrument has used modbus-rtu communications protocol, and these data all need in collected stipulations gateway.
1.3, when each autonomous system is joined to together, very likely there is network conflict.For example, smelting iron 1 factory and ironmaking 2 factories is that same company is the DCS system that bright fragrant iron and steel is made, this company has been used the subprogram of 1 factory to use in 2 factories, cause the subordinate of Liang Ge factory the same with the IP of superior system, if directly network interworking is done to by Liang Ge factory, Zhe Liangge factory can be because IP conflict makes host computer cannot gather the data of DCS system and paralyses.In prior art, address this problem and need to increase respectively 1 router to 1 factory and 2 factories, or on the basis of original router, configure an IP map information, allow router arrive the effect of isolation.In the embodiment of the present invention, owing to there being network interface and the interface of multiple mutual isolation on stipulations gateway, 1 factory and 2 factories are used respectively different network interfaces or interface, and this problem has just solved.
1.4, can not be to stop production as cost in system Construction.For construction of energy management system, can not allow blast furnace, converter stop production, normally carry out so can not affect production process in data acquisition.The debug process of stipulations gateway does not need the other side to stop etc., can in image data, not have influence on original system yet.
1.5, the fault of main system can not affect the normal operation of original system.After system made, when data acquisition equipment fault, can not cause the subordinate equipment of its collection or system to occur the faults such as paralysis.
For the problems referred to above, adopt the industrial data transmission method of the embodiment of the present invention, each equipment can communicate by stipulations gateway, provided stipulations gateway function sketch in an example of the embodiment of the present invention with reference to figure 4, data transmission procedure is as follows, with reference to figure 5, provide the data flow schematic diagram of an example of the embodiment of the present invention.
Wherein, equipment 1 is intelligent instrument, comprises communication processor and combines and protect, and equipment 2 is kilowatt-hour meter, and equipment 3 is electric power backstage, and equipment 4 is opc server, and equipment 5 is PLC, has another name called programmable logic controller (PLC).2.1, equipment 1 and equipment 2, by RS485 interface, use modbus-rtu agreement and DLT/645-1997 and stipulations gateway swap data.The safety problem that RS485 interface not should be noted that itself, therefore be directly connected to respectively the RS485 interface of gateway from equipment 1 and equipment 2.In gateway, set up passage 1 and passage 2, according to agreement separately, select corresponding driver, organized data address list, sets corresponding parameter and the time interval, the corresponding data of circulation fetch equipment 1 and equipment 2.
2.2, equipment 3 is connected to gateway by Ethernet interface with equipment 4, and they account for 1 network interface separately, ensures both independence.In gateway, set up passage 3 and passage 4, utilize agreement separately, select corresponding driver, organized data address list, circulation transmitting-receiving message, the data of collecting device 3 and equipment 4.
2.3, equipment 5 is PLC, and the interface of PLC may be RS232/RS422/RS485 serial ports class, may be also the Programme Line of USB interface, is likely also Ethernet interface.These three kinds of interface mode gateways can be accepted, after physical connection, the agreement using according to PLC is (such as the profinet agreement of Siemens PLC C use, the Device net agreement that AB plc uses etc.), select corresponding driver, organized data address table, the corresponding data of PLC is read in circulation
Setting up after the annexation of stipulations gateway and equipment or system, stipulations gateway is temporarily stored in all real time datas of collecting in real-time data base, and the data of real-time data base were upgraded according to the scan round cycle.In the time that its other party needs the data of lane database, the agreement of supporting according to the other side, connects by corresponding port, select to forward and drive, set and drive parameter and access rights, give demand data side by driving parameter and access rights and do drive arrangements, just can be by data sharing to the other side.
Wherein, in the time that the connection failure causing due to problems such as replacing instrument, equipment are restarted, equipment faults occurs, gateway can be attempted reconnecting at set intervals, until partner state recovers and successfully connects.
Can find out from above-mentioned example, realize the stipulations gateway of the stipulations net of distinct device or system communication, integrated degree is high, and stipulations gateway rolls into one interface, software, operating system; Flexibility is good, can remote operation, and adjustable in system, and a display can be further installed and mouse-keyboard can be made background computer; Programming is simple, and debugging still O&M does not all have technological difficulties; Reliable and stable, system moulding, after program sizing, can unattended operation; Power consumption is low, and flying power is good; Multiple devices are combined, and can form more complicated network design.
With reference to figure 6, show the flow chart of the embodiment of the method for a kind of industrial data transmission of the present invention, specifically can comprise the following steps:
Step 201, stipulations gateway adopt different network interface/interfaces to be connected with each the first object, and the data communication protocol adopting according to each the first object arranges the parameter of described network interface/interface, each the first object is connected with described stipulations gateway respectively and carries out real time communication simultaneously, described stipulations gateway is connected respectively with multiple second objects and carries out real time communication simultaneously, and described the first object or second object are the production equipment bus of instrument, single production equipment, multiple production equipment formation or the production system that multiple production equipment bus forms.
The first driver that step 202, selection and the data communication protocol that described the first object adopts are corresponding, call described the first driver by corresponding network interface/interface and described the first object communication, respectively from each the first object acquisition industrial data and be saved in the memory address that initialized data base distributes for each the first object, described industrial data comprises with can data and/or production status data.
Step 203, configure the data communication protocol passage that each second object adopts respectively, for each second object, the data communication protocol adopting by described second object is selected corresponding network interface/interface and the second driver, and different second objects adopts different network interface/interfaces to be connected with described stipulations gateway.
Step 204, the memory address of distributing for each the first object from described initialized data base, read the industrial data of at least one the first object, before sending industrial data to each second object, for each second object, read industrial data is converted to the form of the data communication protocol that meets described second object employing.
Step 205, call described the second driver by select network interface/interface communicate by letter with each second object respectively, the industrial data after format conversion is sent to respectively to each second object.
In the embodiment of the present invention, go back in the embodiment of the present invention, further preferably, for the first object that uses identical address, distribute the different network interface/interfaces of same type, make each the first object use separately a network interface/interface.
Before this, can also comprise the step for the first object memory allocated address, particularly, described method can also comprise:
For each the first object, write data address list, wherein record is for preserving from the memory address of the industrial data of described the first object acquisition.
Further preferably, describedly comprise from each the first object acquisition industrial data respectively:
What sub-step 2021, basis set in advance obtains order and the time interval, reads industrial data respectively from each the first object circulation.
Wherein, when the first object and stipulations gateway communicate, the data transmission channel building between the network interface/interface by stipulations gateway and the first object communicates, and described method can also comprise:
In described stipulations gateway, set up respectively corresponding data transmission channel, for the industrial data transmission between each network interface/interface and described the first object.
In the embodiment of the present invention, described method can also comprise:
Call described the second driver and carry out real time communication with each second object respectively by network interface/interface of selecting simultaneously, notify described second object to drive according to described the second driver deployment.
Further preferably, described notify described second object according to described second driver deployment drive comprise:
Sub-step 2031, driving parameter and the access rights of described the second driver are set.
Sub-step 2032, call described the second driver by select network interface/interface communicate by letter with each second object respectively, described driving parameter and described access rights are sent to described second object, with by described second object according to described driving parameter and described access rights configuration driven.
According to the embodiment of the present invention, stipulations gateway is used for carrying out real time communication with stipulations gateway for the different network interface/interface of multiple the first object dynamic assignment that connect simultaneously, stipulations gateway is by selecting the driver corresponding with the data communication protocol of the first object, call driver is communicated by letter with it by the network interface/interface distributing, gather industrial data and be kept at database from the first object, stipulations gateway is also connected with multiple second objects and carries out real time communication, the industrial data of collection is communicated by letter with it by the driver of selecting, and the industrial data that reads the first object of storage sends to multiple second objects simultaneously.
Pass through the embodiment of the present invention, realize the communication between striding equipment or system, the industrial data gathering simultaneously real time down is given multiple various level second objects, can make multiple equipment or system form more complicated network design, is applicable to more complicated applied environment.
Wherein, distribute different network interface/interfaces for the first different objects, communication between the first different objects is not disturbed mutually, use the equipment of identical ip addresses or the communication of system also not to disturb mutually, avoid network conflict time also without increasing new equipment, can ensure to transmit the safety of data simultaneously.
And, from the first object, collect data with variety of protocol form, no longer be confined to only change into a kind of protocol format, but be converted to respectively the protocol format of each second object, this multi-protocols by all kinds of means diversified channel of many data selections only adopt the outside pattern of transmitting of a kind of protocol type more convenient than traditional, adaptability is stronger, and for equipment variation, the numerous and diverse especially workshop of kind level is especially favourable.The step of format transformation is not just to carry out after getting data, carries out the operation of format transformation before issuing data to second object, and this only conversion needs the mode of the data that send can save a large amount of processing resource and processing time.
And, the stipulations gateway of the embodiment of the present invention can be to adopt the integrated stipulations conversion equipment of embedded computer, because embedded system is not lost the basic function of computer system, so carrying out the problem of data acquisition debugging, stipulations gateway also obtains solving well, the instrument that arranges of debugging acid, third party producer etc. can normal mounting in stipulations gateway, do not need the computer of the debugging use of extra band again, not only allow the process of debugging become easy, also allow the work of O&M more quick.
In sum, the method of the industrial data transmission that the embodiment of the present invention provides, can realize in System Integration Project, ensure under the prerequisite of original system safety, from original system, debug, collect data with variety of protocol form, and be transmitted to and need multiple equipment of data or the technical requirement of system with various protocols form.
For embodiment of the method, for simple description, therefore it is all expressed as to a series of combination of actions, but those skilled in the art should know, the present invention is not subject to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
Because said method embodiment is substantially corresponding to the system embodiment shown in aforementioned, therefore not detailed part in the description of the present embodiment can, referring to the related description in previous embodiment, just not repeat at this.
The present invention can be used in numerous general or special purpose computing system environment or configuration.For example: personal computer, server computer, handheld device or portable set, laptop device, multicomputer system, system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer, the distributed computing environment (DCE) that comprises above any system or equipment etc.
The present invention can describe in the general context of computer executable instructions, for example program module.Usually, program module comprises and carries out particular task or realize routine, program, object, assembly, data structure of particular abstract data type etc.Also can in distributed computing environment (DCE), put into practice the present invention, in these distributed computing environment (DCE), be executed the task by the teleprocessing equipment being connected by communication network.In distributed computing environment (DCE), program module can be arranged in the local and remote computer-readable storage medium including memory device.
In this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
System to a kind of industrial data transmission provided by the present invention above, and, a kind of method of industrial data transmission is described in detail, applied specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.