OPC UA (OPC Unified Structure) is a platform-independent, service-oriented, open, and safe communication structure. It permits interoperability of commercial automation units, methods, and software program purposes from completely different distributors. The OPC UA info mannequin defines the codes and codecs for exchanging information utilizing numerous transport protocols.
The identical basis developed OPC UA and its predecessor, Open Platform Communications (OPC), however they’re considerably completely different. The muse continues to develop OPC UA to create an structure that’s extra fascinating than the unique OPC communications and extra in step with the wants of evolving industrial automation.
The OPC Basis launched the primary model of the OPC UA specification in 2006, and as of right this moment, OPC UA is at model 1.05. Along with the Shopper-Server (Subscriptions) mannequin, OPC UA features a Pub-Sub mechanism, which permits pushing JSON specs (additionally utilizing the standard-defined binary specification – UADP) over the UDP protocol, MQTT protocol, or AMQP protocol.
By means of the quick, safe, and dependable transport channel supplied by the MQTT protocol, OPC UA can straight use the web for information switch whereas retaining the important thing advantages of OPC UA’s end-to-end safety and standardized information modeling.
Options of OPC UA
- Purposeful equivalence – All OPC Traditional specs map to the UA, and the OPC UA consists of the DA, A&E, and HDA performance present in OPC Traditional:
Performance | Descriptions |
---|---|
Discovery | Discover out there OPC servers in your native PC and/or community |
Tackle area | All information is represented hierarchically (e.g. information and folders), permitting OPC purchasers to find and make the most of easy and sophisticated information constructions |
On-demand | Learn and write information/info primarily based on entry rights |
Subscription | Monitor information/info and report exceptions when values change past the shopper’s settings |
Occasion | Shopper-based settings notify necessary info |
Methodology | Purchasers can execute packages primarily based on strategies outlined on the server, and so on. |
- Safety – Message encryption, authentication, and auditing, one of the crucial necessary issues for a company when selecting a know-how customary is safety. OPC UA addresses safety by offering a set of controls when passing via firewalls:
Performance | Descriptions |
---|---|
Transport | Quite a lot of protocols are outlined, offering choices akin to ultra-fast OPC binary transfers or the extra common SOAP-HTTPS |
Session encryption | Data is transmitted securely with 128-bit or 256-bit encryption ranges |
Message Signature | The signature have to be equivalent when the message is obtained as when it’s despatched. |
Sequencing Knowledge Packages | Recognized message replay assaults eradicated via sequencing |
Authenticate | Every UA shopper and server is recognized by an OpenSSL certificates, which gives management over how purposes and methods join to one another. |
Consumer management | Purposes can require person authentication (login credentials, certificates, and so on.) and may additional limit or improve person entry to permissions and deal with area “views”. |
Audits | Logging of person and/or system exercise to offer an entry audit path |
- Complete Data Modelling: The OPC UA Data Modeling Framework, used to outline advanced info, converts information into info. It permits modeling and increasing even essentially the most advanced multi-level constructions via totally object-oriented performance, with the aptitude to outline information sorts and constructions in configuration information.
Data Mannequin for OPC UA
The OPC UA info mannequin, the deal with area, is a community of nodes and references forming a structured graph.
Objects in a typical type are represented within the deal with area, the place mannequin components are referred to as nodes. The deal with area represents objects and their elements as a set of nodes, described by attributes and related by references. OPC UA modeling is all about creating nodes and references between nodes.
Object Mannequin
OPC UA makes use of objects as the premise for representing information and actions within the processing system. Variables, occasions, and strategies are interconnected by reference inside objects.
Node Mannequin
- Attributes describe nodes, and completely different node lessons have completely different units of attributes. The definition of a node class consists of defining attributes, so the deal with area doesn’t embrace attributes.
- A Reference represents a relationship between nodes. An occasion of a node of the reference kind that exists within the deal with area defines a reference.
- Generic properties of the node mannequin
Reference Mannequin
The supply node is the node containing the reference, and the goal node is the referenced node. The referenced goal node could be in the identical deal with area because the supply node, or within the deal with area of one other OPC server, and even the goal node could be non-existent.
Node Sorts
Crucial node classes in OPC UA are objects, variables, and strategies.
- Object nodes: Customers use object nodes to type deal with areas, and these nodes don’t include information. They use variables to reveal values for objects. Customers can use object nodes to group administration objects, variables, or strategies; variables and strategies at all times belong to an object.
- Variable node: Variable node represents a price. The information kind of the worth is determined by the variable. The shopper can learn, write, and subscribe to the worth.
- Methodology node: The strategy node represents a technique within the server that the shopper calls and receives the outcome. The enter parameters and the output outcome are within the type of variables as a part of the strategy node. The shopper specifies the enter parameters and will get the output outcome after the decision.
Why Bridge OPC UA to MQTT?
MQTT is a light-weight, environment friendly, and dependable messaging protocol for IoT, utilizing a publish-and-subscribe mannequin to assist real-time communication. MQTT is well-suited for resource-constrained environments, particularly situations requiring environment friendly energy and bandwidth use.
Constructed on MQTT 3.1.1, SparkplugB ensures versatile, environment friendly fundamental information modeling for industrial IoT via an industry-established specification. SparkPlugB achieves sturdy interoperability and community state consciousness, because of MQTT’s glorious design.
OPC UA and MQTT have a sure diploma of performance overlap, however their use of situations could be very completely different:
- OPC UA facilitates seamless communication amongst various gear and methods within the {industry} by utilizing a standardized language.
- MQTT effectively handles real-time sensor information over the Web, addressing low bandwidth and unreliable community situations in IoT purposes. Its learn/publish mechanism gives exceptional flexibility in utilization.
In industrial situations, MQTT excels at messaging in distributed methods, whereas OPC UA focuses on offering interoperability. OPC UA abstracts and aggregates enterprise information, and MQTT facilitates seamless, distributed information trade with its sturdy connectivity capabilities.
OPC UA over MQTT
The Pub-Sub mannequin proposed by the OPC Basis within the newest specification of OPC UA permits information modifications to be pushed to subscribers utilizing the MQTT Dealer.
Pub-Sub safety is a little more advanced than that in shopper/server, and the specification is just not as detailed. In an MQTT community, safety relies on SSL/TLS, and the dealer can outline application-level authentication along with enabling SSL/TLS for transport.
In precept, these safety fashions are both all or nothing for each subscriber and writer that may be a part of the community. The continuing standardization of OPC UA continues to be a piece in progress, and it stays unclear how one can finest map the wealthy OPC UA info mannequin to MQTT.