Modul 3 von 11 · 📖 5 min Lesezeit · ⏱ 30 min gesamt
FI-DV 03 OPC UA in der Praxis (EN)
Inhaltsverzeichnis (6 Abschnitte)
FI-DV 03 OPC UA in Practice
OPC UA (Open Platform Communications Unified Architecture) is the de-facto standard for machine-to-machine communication in Industry 4.0. In this module, you will learn the practical implementation of OPC UA, the construction of Information Models, the application of Companion Specifications, and the differences between Client/Server communication and Pub/Sub pattern. Special attention is paid to integration with Time-Sensitive Networking (TSN) for deterministic real-time communication.
Participants will be enabled to configure OPC UA Servers and Clients, create complex data models, and securely implement communication in heterogeneous IT/OT environments. Practical examples and configuration examples provide the necessary know-how for productive use.
Concepts and Background
- Information Model
- The structured hierarchy of objects, variables, and methods that defines the semantics of data and functions in an OPC UA system. It forms the basis for interoperable communication between devices and systems.
- Companion Specifications
- Industry-specific extensions of the OPC UA core standard that define semantics for specific use cases such as for mechanical engineering (OPC UA for Machinery), process automation (OPC UA for IEC 61131-3) or diagnostics (OPC UA for Diagnostics).
- OPC UA over TSN
- The combination of OPC UA with Time-Sensitive Networking (TSN) for deterministic, time-exact data transmission in industrial networks. This technology enables the convergence of IT and OT networks on a common infrastructure.
- Pub/Sub
- An alternative communication pattern to Client/Server, where data is distributed from Publishers to Subscribers via topics (Topics). It is particularly suitable for the efficient distribution of data to multiple recipients in real-time systems.
Architecture Diagram
flowchart TB
subgraph IT-Network
A[IT Server] --> B[OPC UA Server]
end
subgraph OT-Network
C[PLC] --> D[OPC UA Client]
E[SCADA] --> D
F[IIoT Platform] --> D
end
subgraph Network Infrastructure
G[TSN Switch] --> H[OPC UA Broker]
end
B --> G
D --> G
H --> A
H --> C
H --> E
H --> F
Practical Steps
- Install the OPC UA Server on a Linux system with the package
open62541-server. - Configure the server certificates with the command
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365. - Define your Information Model in an XML file with the necessary namespaces and object hierarchies.
- Import the Information Model into the server with the command
open62541-server -c server_config.xml. - Configure the TSN parameters on the switch with
tsnctl config --priority 3 --streamid 1. - Create a Companion Specification for your machine using the OPC UA Companion Specification Editor.
- Implement an OPC UA Client in Python using the
asyncualibrary for data querying. - Configure the OPC UA Broker for Pub/Sub with the configuration file
broker_config.json. - Test the communication with the tool
uaexpertoropcua-client. - Implement the security settings with certificates and Access Control Lists.
Common Pitfalls
Further Resources
- OPC UA Specifications and References
- OPC UA Companion Specifications
- Open Source OPC UA Stack (open62541)
- OPC UA over TSN Implementation Guide
- OPC UA Information Hub
Knowledge Check
Four questions for self-assessment. Click on each question to see the correct answer and explanation.
What is the main advantage of OPC UA over TSN compared to conventional OPC UA communication?
- A) Higher data compression rates
- B) Deterministic, time-exact data transmission
- C) Lower network utilization
- D) Easier implementation of security mechanisms
Correct Answer: B. OPC UA over TSN enables deterministic, time-exact data transmission through the combination of OPC UA with Time-Sensitive Networking, while the other options are not the core advantage of this combination.
What is the main difference between the Client/Server model and the Pub/Sub model in OPC UA?
- A) Client/Server uses TCP, Pub/Sub uses UDP
- B) Client/Server is bidirectional, Pub/Sub is unidirectional
- C) Client/Server requires a permanent connection, Pub/Sub is stateless
- D) Client/Server supports only one data type, Pub/Sub supports multiple
Correct Answer: C. Client/Server requires a permanent connection with state information, while Pub/Sub is stateless and is particularly suitable for efficient distribution to multiple recipients. The other options are not correct.
What is the purpose of Companion Specifications in OPC UA?
- A) The definition of security protocols
- B) The extension of the core standard for industry-specific use cases
- C) The description of physical connection specifications
- D) The definition of data compression algorithms
Correct Answer: B. Companion Specifications extend the core OPC UA standard with industry-specific semantics for particular use cases, while the other options describe different aspects of OPC UA implementation.