Installation variants
In the following, two installation variants are described, according to which the TwinCAT OPC UA Server can be installed depending on the application and infrastructure.
- 1. Server integrated directly into the control system
- 2. Operation of the server on a gateway PC
Server integrated directly into the control system
This scenario describes how the TwinCAT OPC UA Server should normally be operated. One of the biggest advantages of this software is that it can be integrated into even the smallest embedded platform, e.g. the CX8000 series. Thanks to this integration, general handling is very simple and convenient. OPC UA clients, e.g. HMI or MES/ERP systems, can establish a connection with the corresponding TwinCAT OPC UA Servers in the network and read and write symbol information originating from the TwinCAT runtime.
This scenario has the following advantages:
- Optimized network load, as OPC UA mechanisms such as subscriptions ("OnDataChange communication") can be used.
- Decentralized memory usage. Each TwinCAT OPC UA Server device is exclusively responsible for its own memory requirements, as only its "own" PLC symbols need to be provided in the server's address space.
- Secure communication right up to the control system. OPC UA features security mechanisms that are directly integrated in the protocol. Only the OPC UA server port is enabled in the controller firewall, which is then used for secure communication. In the case of the Reverse Connect functionality, there is even no need to open the (incoming) firewall port.
Operation of the server on a gateway PC
This scenario describes the use of the TwinCAT OPC UA Server on a gateway PC. This use case is often used in Brownfield scenarios where existing control systems are to be given an OPC UA interface. In this case, the TwinCAT OPC UA Server is installed on a gateway PC (often referred to as an "edge PC") and connects one or more subordinate TwinCAT PLC controllers. Communication between the server and PLC then takes place via TwinCAT ADS.
From a financial perspective, this scenario is very attractive, as only one TwinCAT OPC UA Server software license needs to be purchased. However, this scenario also has some technical disadvantages compared to integrating the server into the controller:
- Network load can be very high depending on the number of devices and symbols present. The TwinCAT OPC UA Server uses cyclic ADS sampling to query symbol values quickly and efficiently from the TwinCAT runtime and must also be able to serve thousands of symbols simultaneously. The more symbols (and the more connected PLC controllers) there are, the more cyclic communication there is in the network.
- The memory requirement on the central server is very high because the TwinCAT OPC UA Server has to import the symbol information from each TwinCAT PLC and store it in its address space.
- Communication between the server and PLC is based on TwinCAT ADS, which only enables integrated encryption of the transport channel in newer TwinCAT versions. This may not yet be available for older systems as part of a Brownfield application.
- The symbol files must be exchanged between the TwinCAT PLC and the central server each time the PLC program is changed. This step is not necessary if the server is operated directly in the PLC controller.