CN107222575A - Realize the method that OPC communicates between industrial control equipment - Google Patents
Realize the method that OPC communicates between industrial control equipment Download PDFInfo
- Publication number
- CN107222575A CN107222575A CN201710571801.7A CN201710571801A CN107222575A CN 107222575 A CN107222575 A CN 107222575A CN 201710571801 A CN201710571801 A CN 201710571801A CN 107222575 A CN107222575 A CN 107222575A
- Authority
- CN
- China
- Prior art keywords
- control equipment
- industrial control
- service end
- client
- opc
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer And Data Communications (AREA)
Abstract
The present invention disclose a kind of method for realizing that OPC communicates between industrial control equipment, and the industrial control equipment is equipped with the operating system of incompatible OPC agreements, and the industrial control equipment includes service end industrial control equipment and client industrial control equipment, and methods described includes:Service end industrial control equipment according to by 135 ports receive from the connection request of client industrial control equipment when, set up and the client industrial control equipment between first communication connection;When the service end industrial control equipment is not belonging to the first preset data bag by the described first DCE/RPC packets for being received from the client industrial control equipment, generates response data and feed back to the service end industrial control equipment.The embodiment of the present invention realizes the OPC communications between industrial control equipment, the need for realizing by OPC communication acquisition industrial datas, it is to avoid the potential safety hazard that special dimension is existed using Windows systems, it is ensured that the compatibility between equipment supporting OPC agreements.
Description
Technical field
The present invention relates to Safety Technology for Industry field, more particularly to a kind of method for realizing that OPC communicates between industrial control equipment.
Background technology
OPC agreements (OLE for Process Control) are the OLE/COM mechanism based on Microsoft in application layer protocol
DCE/RPC (Distributed Computing Environment/Remote Procedure Calls) transmitting data
Communication standard, realized, the data acquisition that is mainly used in industrial processes and patrolled with C/S (client and server) framework
Collect control.Various device categories are various in industrial environment, and a kind of general data are needed between the equipment and software of all big enterprises
Exchanged form, OPC protocol definitions standard set interface and method, major equipment and software vendor be also all based on Microsoft
OLE/COM technologies provide the support to OPC agreements.
But, with further speeding up for development of globalization, during industrial development, equipment that industry spot is used and
Software comes from world's every country, very likely occurs stealing National Industrial production information by equipment or software among these
Behavior, so in the industrial circle of some crucial, relation national security, some softwares or system can be prohibitted the use of, for example,
Windows systems are just prohibitted the use of in some electric power generation systems of country.Need to gather the number of various equipment in industrial production
Show it is believed that breath carries out concentration, for example, ERP (Enterprise Resource Planning) system of company will be concentrated and showed
The data of production environment, such case is accomplished by ERP system and carries out direct data access to various equipment, if necessary to only
The equipment of OPC agreements is supported to carry out data communication and support OPC agreements it is necessary to the operating system that ERP system is disposed, with regard to current
The Windows operating system that speech only has Microsoft supports OPC agreements, and (SuSE) Linux OS does not support OPC agreements.Therefore, for
Do not allow using Windows systems or only used in the environment of (SuSE) Linux OS, it is impossible to the equipment with supporting OPC agreements
Data communication is carried out, the use of equipment is limited.
The content of the invention
The embodiment of the present invention provides a kind of method for realizing that OPC communicates between industrial control equipment, at least solving above-mentioned technology
One of problem.
In a first aspect, the embodiment of the present invention provides a kind of method for realizing that OPC communicates between industrial control equipment, the industrial control equipment
Including service end industrial control equipment and client industrial control equipment, the industrial control equipment is equipped with the operating system of incompatible OPC agreements,
Methods described includes:
Service end industrial control equipment according to by 135 ports receive from the connection request of client industrial control equipment when, set up
The first communication connection between the client industrial control equipment;
When the service end industrial control equipment by described first is received from the client industrial control equipment
When DCE/RPC packets are not belonging to the first preset data bag, generate response data and feed back to the service end industrial control equipment.
Second aspect, the embodiment of the present invention is provided to be stored with a kind of computer-readable recording medium, the storage medium
One or more programs including execute instruction, the execute instruction (can include but is not limited to computer, clothes by electronic equipment
Business device, or network equipment etc.) read and perform, OPC leads between realizing industrial control equipment for execution any of the above-described of the present invention
The method of letter.
Fourth aspect is there is provided a kind of electronic equipment, and it includes:At least one processor, and with described at least one
The memory of device communication connection is managed, wherein, the memory storage has can be by the instruction of at least one computing device, institute
Instruction is stated by least one described computing device, so that at least one described processor is able to carry out any of the above-described of the present invention
Realize the method that OPC communicates between industrial control equipment.
5th aspect, the embodiment of the present invention also provides a kind of computer program product, and the computer program product includes
The computer program on computer-readable recording medium is stored in, the computer program includes programmed instruction, works as described program
When instruction is computer-executed, the computer is set to perform the method that any of the above-described realizes OPC communications between industrial control equipment.
In the embodiment of the present invention, the OPC realized between service end industrial control equipment and client industrial control equipment communicates.So as to
Avoiding some special dimensions by using the method for the embodiment of the present invention, safety that may be present is hidden using Windows systems
Suffer from, while the compatibility between can also ensure that and supporting the equipment of OPC agreements.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, being used required in being described below to embodiment
Accompanying drawing be briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, for ability
For the those of ordinary skill of domain, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached
Figure.
Fig. 1 for the present invention the flow chart for realizing the embodiment of method one that OPC communicates between industrial control equipment;
Fig. 2 for the present invention the flow chart for realizing another embodiment for the method that OPC communicates between industrial control equipment;
Fig. 3 for the present invention the flow chart for realizing the another embodiment for the method that OPC communicates between industrial control equipment;
Fig. 4 for the present invention the flow chart for realizing the another embodiment for the method that OPC communicates between industrial control equipment;
Fig. 5 for the present invention the flow chart for realizing the another embodiment for the method that OPC communicates between industrial control equipment;
Fig. 6 for the present invention the flow chart for realizing the another embodiment for the method that OPC communicates between industrial control equipment;
Fig. 7 be the embodiment of the present invention in data storage analytic modell analytical model structural representation;
Fig. 8 is the structural representation of an embodiment of the electronic equipment of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.Need
Illustrate, in the case where not conflicting, the feature in embodiment and embodiment in the application can be mutually combined.
The present invention can be described in the general context of computer executable instructions, such as program
Module.Usually, program module includes performing particular task or realizes routine, program, object, the member of particular abstract data type
Part, data structure etc..The present invention can also be put into practice in a distributed computing environment, in these DCEs, by
Remote processing devices connected by communication network perform task.In a distributed computing environment, program module can be with
Positioned at including in the local and remote computer-readable storage medium including storage device.
In the present invention, the application program or shell script that run on server, server can be elements.One
Or multiple element can be in the process and/or thread of execution, and element can be localized and/or be distributed on one computer
Between two or multiple stage computers, it is possible to run by various computer-readable mediums.Element can also be according to one
Or the signal of multiple packets, for example, interacted from one with another element in local system, distributed system, and/or
The network of internet is led to by signal with the signal of the data of other system interactions by locally and/or remotely process
Letter.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by
One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation
Between there is any this actual relation or order.Moreover, term " comprising ", "comprising", not only including those key elements, and
And also including other key elements being not expressly set out, or also include for this process, method, article or equipment institute inherently
Key element.In the absence of more restrictions, the key element limited by sentence " including ... ", it is not excluded that including it is described will
Also there is other identical element in process, method, article or the equipment of element.
As shown in figure 1, one embodiment of the invention realizes OPC communicates between industrial control equipment method, the industrial control equipment
The operating system of incompatible OPC agreements is equipped with, the industrial control equipment includes service end industrial control equipment and client industrial control equipment,
Methods described includes:
S11, service end industrial control equipment according to by 135 ports receive from the connection request of client industrial control equipment when,
The first communication connection set up between the client industrial control equipment;
S12, by described first it is received from the client industrial control equipment when the service end industrial control equipment
DCE/RPC packets when being not belonging to the first preset data bag, generation response data simultaneously feeds back to the service end industrial control equipment.
In the embodiment of the present invention, the operating system that the industrial control system in the present embodiment is carried can be Linux operations system
System either Unix operating systems.Realize the communication between service end industrial control equipment and client industrial control equipment.So as to pass through
Some special dimensions are avoided using Windows systems and potential safety hazard that may be present using the method for the embodiment of the present invention,
It can also ensure that and support simultaneously the compatibility between the equipment of OPC agreements.Perform the executive agent of the above embodiment of the present invention
Can be industrial control equipment, and the industrial control equipment can be that individual equipment can also be equipment group.
As shown in Fig. 2 realized in the present invention between industrial control equipment in some embodiments for the method that OPC communicates, in addition to:
S21, when the DCE/RPC packets of reception belong to the first preset data bag, obtain service end dynamic
Port;
S22, the service end industrial control equipment are based on the service end dynamic port and create TCP services, and by the service
End dynamic end slogan is sent to the client industrial control equipment;
S23, when the service end industrial control equipment receive from the client industrial control equipment send and the service end
When dynamic port sets up the TCP connection requests of connection, the second communication connection set up between the client industrial control equipment;
S24, the service end industrial control equipment are received from the client industrial control equipment by described second
OPC communication data packets;
S25, when the OPC communication data packets of reception are not belonging to the second preset data bag, parse the OPC data
Bag, and return to response data to the client industrial control equipment.
As shown in figure 3, realized in the present invention between industrial control equipment in some embodiments for the method that OPC communicates, in addition to:
S31, when the OPC communication data packets of reception belong to the second preset data bag, the service end industry control
Equipment is set up and the third communication company between the client industrial control equipment by 135 ports of the client industrial control equipment
Connect;
S32, the service end industrial control equipment are connected by the third communication and sent to the client industrial control equipment
DCE/RPC packets;
S33, the service end industrial control equipment are received from the client industrial control equipment for the DCE/RPC packets
Response data packet;
S34, when the response data packet include client dynamic port information when, the service end industrial control equipment be based on institute
Client dynamic port information is stated to set up and the fourth communication connection between the client industrial control equipment;
S35, the service end industrial control equipment are connected to the client industrial control equipment by the fourth communication and send OPC
Communication data packets.
Realized in the present invention between industrial control equipment in some embodiments for the method that OPC communicates, in addition to:When the service end
After sign off between industrial control equipment and the client industrial control equipment, disconnect described first and be communicatively connected to fourth communication
Connection, to discharge 135 ports, 135 ports of the client industrial control equipment, the service end of the service end industrial control equipment
Dynamic port and the client dynamic port.
As shown in figure 4, in certain embodiments, in the generation response data and the service end industrial control equipment is fed back to
Also include before:
S41, when belonging to Bind types by the DCE/RPC packets, determine the packet institute of the Bind types
The Bind GUIDs of corresponding interface;
The interface management dictionary that S42, inquiry are pre-established, to determine whether to include the Bind GUIDs;
S43, if it is, group Bind_ack bags are to generate response message, and the response message whether support connects
Mouth field is filled out;
S44, if it is not, then group Bind_ack bags are to generate response message, and the response message whether support connects
Mouth field fills out no.
The response to Bind type data packets is realized in the present embodiment, can be in the packet for judging to receive as Bind
According to the GUID of the Bind type data packets of acquisition during type, and by inquiring about the interface management word pre-established
Allusion quotation come determine whether support OPC equipment transmitted by Bind types packet request, if it is group bag be Bind_ack
Bag, and packet whether support field fills in "Yes", if otherwise group bag be Bind_ack bags, and packet whether
Field is supported to fill in "No".
In the present embodiment, interface management dictionary memory interface information, the interface message at least includes:The overall situation of interface
Unique identifier value, the type of interface, the reference count of interface, GUID constant mark, interface correspondence OPC editions
This, whether interface is supported indicates, the object identifier that associates, the GUID of owner, owner it is globally unique
One or more in the GUID type of type of identifier, the GUID of association and association.
Interface management dictionary is globally unique single class, has in OPC client and opc server is provided and only has
One, for store it is whole with GUID GUID (Globally Unique Identifier) be diacritics
Interface message.OPC agreements provide service by a series of interfaces, and interface is entered by the GUID GUID of 128
Row is distinguished, and is the numeric identifier that a kind of binary length generated by algorithm is 128, based on DCE/RPC agreements
OPC agreements in, IPID, UUID be same data with GUID, is only that language performance definition is different.
In order to recognize with memory interface information, set up in an interface management dictionary, interface management dictionary and to be tied with Map
Structure (in the data structure, key is not repeated uniquely) memory interface information, each interface message includes:The GUID value of interface,
The type of interface, the reference count of interface, GUID constants mark, interface correspondence OPC versions, whether interface is supported indicates, associates
OID, association OXID, the GUID of owner, the GUID-type of owner, association GUID, association GUID-type.
The function of interface management dictionary includes:
Store defined in DCE/RPC and OPCDA specifications, be related to the GUID value of OPC protocol interfaces, to carry out
Interface type is recognized during OPC protocols.For example, when Bind type data frames are received, according in data frame
The GUID of Abstract Syntax structures, goes query interface type in interface management dictionary, determines the status of support of the interface.
Record the interface message of the dynamic generation in program operation process.For example, IRemUnknown2 interfaces can be assisted in OPC
Application and realizing interface are used to during view communication.The RemQueryInterface methods of IRemUnknown2 interfaces are used
To apply for interface, when calling the method, the corresponding interface messages of an IPID need to be added into interface management dictionary.
The RemRelease methods of IRemUnknown2 interfaces are used for realizing interface, are deleted when calling the method, it is necessary to from this dictionary
Except deleting the corresponding interface messages of IPID in message.
In the case of being 1 in the PacketFlags of Request data frames Object positions, according to Object in data
UUID fields inquire about corresponding interface type in interface management dictionary, and interface message is determined for processing OPC data.
As shown in figure 5, in certain embodiments, in the generation response data and the service end industrial control equipment is fed back to
Also include before:
S51, when belonging to Alter types by the DCE/RPC packets, determine the packet of the Alter types
The Alter GUIDs of corresponding interface;
The interface management dictionary that S52, inquiry are pre-established, to determine whether to include the Alter GUIDs;
S53, if it is, group Alter_ack bags are to generate response message, and the response message whether support connects
Mouth field is filled out;
S54, if it is not, then group Alter_ack bags are to generate response message, and the response message whether support connects
Mouth field fills out no.
The response to Alter type data packets is realized in the present embodiment, can the packet for judging to receive as
According to the GUID of the Alter type data packets of acquisition during Alter types, and by inquiring about the interface pre-established
Management dictionary is to determine whether to support the request of the packet of the Alter types transmitted by OPC equipment, and if it is organizing bag is
Alter_ack bags, and packet whether support field fills in "Yes", if otherwise group bag is Alter_ack bags, and in number
According to bag whether support field fills in "No".
As shown in fig. 6, in certain embodiments, in the generation response data and the service end industrial control equipment is fed back to
Also include before:
S61, when the DCE/RPC packets belong to Request types, parse the mark of the DCE/RPC packets
Whether position information is 1 with the highest order for determining the zone bit information;
S62, when it is determined that the zone bit information highest order be 1 when, determine the heading institute of the DCE/RPC packets
Comprising GUID;
S63, the interface management dictionary that pre-establishes of inquiry are to determine the interface class corresponding to the GUID
Type;
S64, the Method type according to corresponding to the interface type of determination handle the data that the packet is included
Part is to generate response message.
In the present embodiment, when the packet received is Request types, determine whether whether the packet corresponds to
In ISystemActivator interfaces RemoteCreateInstance methods (during when server access client, packet
Corresponding to the ResolveOxid2 methods of IOXIDResolver interfaces), if it is, obtaining dynamic port.
In certain embodiments, realize that the method that OPC communicates between industrial control equipment also includes:In the service end industrial control equipment
Data storage analytic modell analytical model is set up before being communicated between the client industrial control equipment, the data storage analytic modell analytical model includes
First order storing and resolving model (StandardOpcServer), second level storing and resolving model (StandardOpcGroup) and
Third level storing and resolving model (StandardOpcItem).
It is illustrated in figure 7 the structural representation of data storage analytic modell analytical model.
The first order storing and resolving model is stored with the relevant interface objects of OPC protocol processes, and to described second
The increase of level storing and resolving model, deletion, modification, the method for inquiry;
The second level storing and resolving model is stored with the relevant interface objects of OPC protocol processes, and to the described 3rd
The increase of level storing and resolving model, deletion, modification, the method for inquiry;
The third level storing and resolving model is the least unit of read-write data in OPC agreements.
The attribute that second level storing and resolving model (StandardOpcGroup) possesses in the present embodiment mainly includes:Word
Most fast refreshing frequency (unit is millisecond), client handle, service end that symbol string title, the beautiful, client of activation are defined
Handle, deadzone parameter, language tag, time zone data.
StandardOpcItem reads and writes the least unit of data as OPC agreements, and the attribute possessed is:String name,
Value, timestamp, data type, the quality of data, activation marker, client handle, service end handle, access rights, character string ID.
According to OPC protocols, phase is respectively created in object StandardOpcServer, StandardOpcGroup
Close interface homonymous interfaces object, be data parsing use, these interface objects given in OPCDA interface, input parameter,
Output parameter defines explanation.Under non-windows system environment, according to form (client and the service end of message question-response
The general type of communication), the method that them are realized respectively, method four functions of correspondence.For example, IOPCServer
AddGroup methods, in order to provide the function of client, Build+ methods+Request function is the letter of organizing-request message
Number, Process+ method names+Response receives the function of response data for parsing.In order to provide the function of service end,
Process+ methods+Request function is the function of analysis request message, please according to Build+ method names+Response
Seek survival into the function of response data.
In certain embodiments, the opc server includes address space object model, the address space object mould
Type includes hierarchical address space model and flattening address space model.
Be stored with StandardOpcItem (abbreviation Item) list in opc server, and the Item lists include service
Whole Item of device, server needs to construct an address space, to support client to pass through standard
IOPCBrowseServerAddressSpace interfaces carry out all Item of browse queries.
The structure of address space can be divided into two types:Hierarchical address space and flattening address space.Address is empty
Between Object Model Structural mainly realize the character string ID (for example, a.b.c, peopleCount) and Item data class Item
Type (some data types that OPC transmission is supported) is added in address space object model, is included in address space object model
One Map and List storage organization (stores key-value key-value pairs, key does not allow to repeat in Map;It is in List
Value serialized datas, are repeated).Key in Map is character string, and element is the pointer of subaddressing spatial object model, main
To be used in and build hierarchical address space.List structures will be used in two kinds of address space models.
The prototype of hierarchical address space construction is tree, and whole address space is a tree that upside down, each Item's
Character string ID, is one and includes or the character string not comprising " ", if character string does not include " ", the Item information is used as root
Leaf, otherwise, in the character string include trunk.For example, Item character string ID is a.b, then a is the trunk on root, and b is a
Leaf on trunk.Trunk is showed in the form of a sub- address space, can include trunk or leaf again, but one
Trunk can not be both without trunk or without leaf.Therefore, using the concept of circular recursion, when Item character string ID include " ",
Using " " as separator, using the character string before first " " as Key, subaddressing spatial object model is created, is added to upper one
In the Map of level address space object model, and by the substring after " " as input, by the subaddressing space created just now
Model object is called, and repetition detects in remaining character string whether include point, if comprising point, repeating above-mentioned flow, if
Not comprising point, create substring and data type group into ItemInfoStruct, and be added to the address space object mould
In the List lists of type.
Flattening address space, is directly constituted together using Item ID as Key, and Item data type
ItemInfoStruct, and be added in the List lists of root address space object model.
In certain embodiments, realize that the method that OPC communicates between industrial control equipment also includes:
Between the service end industrial control equipment and the client industrial control equipment in communication process, client industrial control equipment
According to request end described in predetermined period Ping;
When the client industrial control equipment sound of the service end industrial control equipment to Ping message is not received continuous three times
At once, the resource shared by the connection between the client industrial control equipment and the service end industrial control equipment is discharged.
In the present embodiment, when OPC is communicated, service end industrial control equipment and client industrial control equipment must periodically " Ping "
Other side, to ensure that client is constantly in connection status with object, reaches the effect of heartbeat.Gathered according to Ping mechanism and Ping
Concept, Ping processors create corresponding Ping processing thread, by the ComplexPing of IOXIDResolver interfaces and
SimplePing methods, are attached the monitoring of state.Ping is carried out according to the ComplexPing of IOXIDResolver interfaces
The establishment (OID additions) and deletion (OID deletions) of set, SimplePing methods add what is returned according to ComplexPing
The ID of Ping set, carries out data communication heartbeat detection work once in every 2 minutes and (sends Ping messages, resolution response report
Text), if continuous 3 Ping it is unsuccessful (can not connect, Ping do not respond to or Ping returning result mistake), discharge phase
Correlate the resource connected, including release StandardOpcServer, StandardOpcGroup, StandardOpcItem mould
Type, deletes relevant interface information in structure management dictionary, and stop related data communication and Ping threads.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of
Action merge, but those skilled in the art should know, the present invention is not limited by described sequence of movement because
According to the present invention, some steps can be carried out sequentially or simultaneously using other.Secondly, those skilled in the art should also know
Know, embodiment described in this description belongs to preferred embodiment, involved action and module is not necessarily of the invention
It is necessary.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiment.
On the other hand, the embodiment of the present invention is provided is stored with a kind of computer-readable recording medium, the storage medium
One or more programs including execute instruction, the execute instruction (can include but is not limited to computer, clothes by electronic equipment
Business device, or network equipment etc.) read and perform, for performing the correlation step in above method embodiment, for example:
Service end industrial control equipment according to by 135 ports receive from the connection request of client industrial control equipment when, set up
The first communication connection between the client industrial control equipment;
When the service end industrial control equipment by described first is received from the client industrial control equipment
When DCE/RPC packets are not belonging to the first preset data bag, generate response data and feed back to the service end industrial control equipment.
On the other hand, a kind of electronic equipment is also disclosed in the embodiment of the present invention, and it includes:
At least one processor, and
The memory being connected with least one described processor communication, wherein, the memory storage have can by it is described extremely
The instruction of a few computing device, the instruction is by least one described computing device, so that at least one described processing
Device is able to carry out:
Service end industrial control equipment according to by 135 ports receive from the connection request of client industrial control equipment when, set up
The first communication connection between the client industrial control equipment;
When the service end industrial control equipment by described first is received from the client industrial control equipment
When DCE/RPC packets are not belonging to the first preset data bag, generate response data and feed back to the service end industrial control equipment.
Fig. 8 is the electronic equipment that the method for OPC communications between industrial control equipment is realized in executions that another embodiment of the application is provided
Hardware architecture diagram, as shown in figure 8, the equipment includes:
In one or more processors 810 and memory 820, Fig. 8 by taking a processor 810 as an example.
Perform and realize that the equipment of the method that OPC communicates between industrial control equipment can also include:Input unit 830 and output device
840。
Processor 810, memory 820, input unit 830 and output device 840 can pass through bus or other modes
In connection, Fig. 8 exemplified by being connected by bus.
Memory 820 is as a kind of non-volatile computer readable storage medium storing program for executing, available for storage non-volatile software journey
Sequence, non-volatile computer executable program and module, such as realizing in the embodiment of the present application, OPC communicates between industrial control equipment
Corresponding programmed instruction/the module of method.Processor 810 by operation be stored in non-volatile software program in memory 820,
Instruction and module, so that various function application and the data processing of execute server, that is, realize that above method embodiment is real
The method that OPC communicates between existing industrial control equipment.
Memory 820 can include storing program area and storage data field, wherein, storing program area can store operation system
Application program required for system, at least one function;Storage data field can be stored according to the dress for realizing that OPC communicates between industrial control equipment
That puts uses created data etc..In addition, memory 820 can include high-speed random access memory, it can also include non-
Volatile memory, for example, at least one disk memory, flush memory device or other non-volatile solid state memory parts.
In some embodiments, memory 820 is optional including the memory remotely located relative to processor 810, these remote memories
Network connection to the device for realizing that OPC communicates between industrial control equipment can be passed through.The example of above-mentioned network includes but is not limited to interconnection
Net, intranet, LAN, mobile radio communication and combinations thereof.
Input unit 830 can receive the numeral or character information of input, and produce with realize industrial control equipment between OPC communicate
Device user set and the relevant signal of function control.Output device 840 may include the display devices such as display screen.
One or more of modules are stored in the memory 820, when by one or more of processors
810 when performing, and performs the method that OPC communicates between industrial control equipment of realizing in above-mentioned any means embodiment.
The said goods can perform the method that the embodiment of the present application is provided, and possesses the corresponding functional module of execution method and has
Beneficial effect.Not ins and outs of detailed description in the present embodiment, reference can be made to the method that the embodiment of the present application is provided.
Device embodiment described above is only schematical, wherein the unit illustrated as separating component can
To be or may not be physically separate, the part shown as unit can be or may not be physics list
Member, you can with positioned at a place, or can also be distributed on multiple NEs.It can be selected according to the actual needs
In some or all of module realize the purpose of this embodiment scheme.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
Realized by the mode of software plus general hardware platform, naturally it is also possible to pass through hardware.Understood based on such, above-mentioned technology
The part that scheme substantially contributes to correlation technique in other words can be embodied in the form of software product, the computer
Software product can be stored in a computer-readable storage medium, and such as ROM/RAM, magnetic disc, CD, including some instructions are used to
So that a computer equipment (can be personal computer, server, or network equipment etc.) perform each embodiment or
Method described in some parts of embodiment.
Finally it should be noted that:Above example is only to the technical scheme for illustrating the application, rather than its limitations;Although
The application is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used
To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic;
And these modification or replace, do not make appropriate technical solution essence depart from each embodiment technical scheme of the application spirit and
Scope.
Claims (10)
1. a kind of method for realizing that OPC communicates between industrial control equipment, the industrial control equipment is equipped with the operation system of incompatible OPC agreements
System, the industrial control equipment includes service end industrial control equipment and client industrial control equipment, and methods described includes:
Service end industrial control equipment according to by 135 ports receive from the connection request of client industrial control equipment when, set up and institute
State the first communication connection between client industrial control equipment;
When the service end industrial control equipment passes through the described first DCE/RPC for being received from the client industrial control equipment
When packet is not belonging to the first preset data bag, generates response data and feed back to the service end industrial control equipment.
2. according to the method described in claim 1, wherein, in addition to:
When the DCE/RPC packets of reception belong to the first preset data bag, service end dynamic port is obtained;
The service end industrial control equipment is based on the service end dynamic port and creates TCP services, and by the service end dynamic end
Slogan is sent to the client industrial control equipment;
When the service end industrial control equipment is received from client industrial control equipment transmission and the service end dynamic port
When setting up the TCP connection requests of connection, the second communication connection set up between the client industrial control equipment;
The service end industrial control equipment communicates number by the described second OPC for being received from the client industrial control equipment
According to bag;
When the OPC communication data packets of reception are not belonging to the second preset data bag, the OPC data bag is parsed, and to institute
State client industrial control equipment and return to response data.
3. method according to claim 2, wherein, in addition to:
When the OPC communication data packets of reception belong to the second preset data bag, the service end industrial control equipment passes through
135 ports of the client industrial control equipment, the third communication set up between the client industrial control equipment is connected;
The service end industrial control equipment is connected to the client industrial control equipment by the third communication and sends DCE/RPC data
Bag;
The service end industrial control equipment is received from the response data that the client industrial control equipment is directed to the DCE/RPC packets
Bag;
When the response data packet includes client dynamic port information, the service end industrial control equipment is based on the client
The fourth communication that dynamic port information is set up between the client industrial control equipment is connected;
The service end industrial control equipment is connected to the client industrial control equipment by the fourth communication and sends OPC communication datas
Bag.
4. the method according to any one in claim 1-3, wherein, in addition to:
After sign off between the service end industrial control equipment and the client industrial control equipment, disconnect described first and lead to
Letter is connected to fourth communication connection, to discharge 135 ports of the service end industrial control equipment, the client industrial control equipment
135 ports, the service end dynamic port and the client dynamic port.
5. the method according to any one in claim 1-3, wherein, in the generation response data and feed back to described
Also include before service end industrial control equipment:
When belonging to Bind types by the DCE/RPC packets, connecing corresponding to the packet of the Bind types is determined
The Bind GUIDs of mouth;
The interface management dictionary pre-established is inquired about, to determine whether to include the Bind GUIDs;
If it is, group Bind_ack bags are to generate response message, and the response message whether supporting interface field is filled out
It is;
If it is not, then group Bind_ack bags are to generate response message, and the response message whether supporting interface field is filled out
It is no.
6. the method according to any one in claim 1-3, wherein, in the generation response data and feed back to described
Also include before service end industrial control equipment:
When belonging to Alter types by the DCE/RPC packets, corresponding to the packet for determining the Alter types
The Alter GUIDs of interface;
The interface management dictionary pre-established is inquired about, to determine whether to include the Alter GUIDs;
If it is, group Alter_ack bags are to generate response message, and the response message whether supporting interface field is filled out
It is;
If it is not, then group Alter_ack bags are to generate response message, and the response message whether supporting interface field is filled out
It is no.
7. the method according to any one in claim 1-3, wherein, in the generation response data and feed back to described
Also include before service end industrial control equipment:
When the DCE/RPC packets belong to Request types, parse the zone bit information of the DCE/RPC packets with
Whether the highest order for determining the zone bit information is 1;
When it is determined that the highest order of the zone bit information is 1, determine that the headings of the DCE/RPC packets is included complete
Office's unique identifier;
The interface management dictionary that pre-establishes is inquired about to determine the interface type corresponding to the GUID;
The data division that the Method type processing packet according to corresponding to the interface type of determination is included is with life
Into response message.
8. the method according to any one of claim 1-3, wherein, in addition to:
Data storage analytic modell analytical model is set up before being communicated between the service end industrial control equipment and the client industrial control equipment,
The data storage analytic modell analytical model includes first order storing and resolving model, second level storing and resolving model and third level storing and resolving
Model, wherein,
The first order storing and resolving model is stored with the relevant interface objects of OPC protocol processes, and the second level is deposited
The increase of storage analytic modell analytical model, deletion, modification, the method for inquiry;
The second level storing and resolving model is stored with the relevant interface objects of OPC protocol processes, and the third level is deposited
The increase of storage analytic modell analytical model, deletion, modification, the method for inquiry;
The third level storing and resolving model is the least unit of read-write data in OPC agreements.
9. a kind of computer-readable recording medium, is stored thereon with computer program, the computer program is executed by processor
When can realize the method in claim 1-8 described in any one.
10. a kind of electronic equipment, it includes:
At least one processor, and
The memory being connected with least one described processor communication, wherein, the memory storage has can be by described at least one
The instruction of individual computing device, the instruction is by least one described computing device, so that at least one described processor energy
Enough perform claims require the method in 1-8 described in any one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710571801.7A CN107222575B (en) | 2017-07-13 | 2017-07-13 | The method that OPC is communicated between realization industrial control equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710571801.7A CN107222575B (en) | 2017-07-13 | 2017-07-13 | The method that OPC is communicated between realization industrial control equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107222575A true CN107222575A (en) | 2017-09-29 |
CN107222575B CN107222575B (en) | 2019-08-06 |
Family
ID=59952353
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710571801.7A Active CN107222575B (en) | 2017-07-13 | 2017-07-13 | The method that OPC is communicated between realization industrial control equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107222575B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109257357A (en) * | 2018-09-26 | 2019-01-22 | 杭州安恒信息技术股份有限公司 | Industry control network safety protecting method and device based on OPC service |
CN110278148A (en) * | 2019-08-19 | 2019-09-24 | 江苏金恒信息科技股份有限公司 | A kind of data compatibility gateway system |
GB2580848A (en) * | 2019-08-19 | 2020-07-29 | Jiangsu Jinheng Information Tech Co Ltd | Data compatible gateway system |
CN115297173A (en) * | 2022-08-03 | 2022-11-04 | 国核自仪***工程有限公司 | OPC communication method and OPC communication system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140040431A1 (en) * | 2012-08-06 | 2014-02-06 | General Electric Company | Systems and methods for an opc ua server |
CN104753936A (en) * | 2015-03-24 | 2015-07-01 | 西北工业大学 | Opc security gateway system |
CN104767748A (en) * | 2015-03-30 | 2015-07-08 | 西北工业大学 | OPC server safety defending system |
CN105704145A (en) * | 2016-03-22 | 2016-06-22 | 英赛克科技(北京)有限公司 | Safety protection method and system for OPC protocol |
-
2017
- 2017-07-13 CN CN201710571801.7A patent/CN107222575B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140040431A1 (en) * | 2012-08-06 | 2014-02-06 | General Electric Company | Systems and methods for an opc ua server |
CN104753936A (en) * | 2015-03-24 | 2015-07-01 | 西北工业大学 | Opc security gateway system |
CN104767748A (en) * | 2015-03-30 | 2015-07-08 | 西北工业大学 | OPC server safety defending system |
CN105704145A (en) * | 2016-03-22 | 2016-06-22 | 英赛克科技(北京)有限公司 | Safety protection method and system for OPC protocol |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109257357A (en) * | 2018-09-26 | 2019-01-22 | 杭州安恒信息技术股份有限公司 | Industry control network safety protecting method and device based on OPC service |
CN110278148A (en) * | 2019-08-19 | 2019-09-24 | 江苏金恒信息科技股份有限公司 | A kind of data compatibility gateway system |
CN110278148B (en) * | 2019-08-19 | 2020-01-31 | 江苏金恒信息科技股份有限公司 | data compatibility gateway system |
GB2580848A (en) * | 2019-08-19 | 2020-07-29 | Jiangsu Jinheng Information Tech Co Ltd | Data compatible gateway system |
GB2580848B (en) * | 2019-08-19 | 2021-04-07 | Jiangsu Jinheng Information Tech Co Ltd | Data compatible gateway system |
CN115297173A (en) * | 2022-08-03 | 2022-11-04 | 国核自仪***工程有限公司 | OPC communication method and OPC communication system |
Also Published As
Publication number | Publication date |
---|---|
CN107222575B (en) | 2019-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6750054B2 (en) | A system for building and modeling web pages | |
US8396827B2 (en) | Relation-based hierarchy evaluation of recursive nodes | |
CN111831269A (en) | Application development system, operation method, equipment and storage medium | |
US20210405629A1 (en) | System and method for interoperable communication of an automation system component with multiple information sources | |
EP1061446A2 (en) | Web-based enterprise management with multiple repository capability | |
CN103608799B (en) | Automatic user interface object transformation and code building | |
CN1604031B (en) | Methods and systems for creating user interface to applications using generic user interface templates | |
US7937500B2 (en) | Dynamic, real-time integration of software resources through services of a content framework | |
US8335862B2 (en) | Programmatic management of software resources in a content framework environment | |
US20020016814A1 (en) | Method, system, and program for invoking stored procedures and accessing stored procedure data | |
US8056091B2 (en) | Systems and methods for using application services | |
US8060863B2 (en) | Conformance control module | |
US8074228B2 (en) | Systems and methods for providing mockup business objects | |
US20080162616A1 (en) | Skip relation pattern for graph structures | |
US20040117435A1 (en) | Common persistence layer | |
EP1873701A1 (en) | Systems and methods for providing a mockup data generator | |
US20070288508A1 (en) | Computer software development methods and systems | |
CN102576354A (en) | Extensible framework to support different deployment architectures | |
US20080162777A1 (en) | Graph abstraction pattern for generic graph evaluation | |
CN107222575A (en) | Realize the method that OPC communicates between industrial control equipment | |
CN101101550B (en) | Mapping a new user interface onto an existing integrated interface | |
US20120089931A1 (en) | Lightweight operation automation based on gui | |
US20080249994A1 (en) | System and process for server side stateless data interchange | |
US9665351B2 (en) | Generating in-memory database application | |
US20090063395A1 (en) | Mapping log sets between different log analysis tools in a problem determination environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |