OPC.UA & EPICS Device Support Interfacing Industrial Controllers
Getting insights into OPC.UA & EPICS device support for interfacing industrial controllers. Explore connecting records to hardware, choices between standard or flexibility, wishlist for controller integration, OPC.UA standard for SCADA to controllers, and why OPC.UA is the strategic choice.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
OPC UA EPICS Device Support INTERFACING INDUSTRIAL CONTROLLERS Ralph Lange
Context: Device Support Connecting Records to Hardware 2 EPICS clients connect using the pvAccess and Channel Access network protocols EPICS IOC PVA & CA Network Servers EPICS Process Database Configurable interconnected objects (records) provide flexibility and functionality Records that represent I/O channels use the Device Support layer to connect to hardware Device Support Modules
Choices: Standard or Flexibility EPICS Principle: Configuration over Coding 3 High-level communication standard 1. Rich standard covers everything you ever need On-the-wire protocol: standard Shifts integration effort to the device (vendor) Low-level communication abstraction with a flexible configuration 2. Transport of messages is handled by fixed (coded) parts, Content of messages is handled by a configurable engine StreamDevice On-the-wire protocol: device specific Shifts integration effort to the IOC (control system engineer)
Controller Integration Wishlist Also the OPC UA Feature List 4 Symbolic addressing names, not numbers Subscription mechanism update on change No PLC programming keep contractors happy Server-side queues handle bursts well Industrial standard one to connect them all Browsing support find variables easily Portability at least Linux, Windows Security (TLS, X.509) encrypt, sign, authenticate User-defined structures for reusable PLC objects Remote procedure calls with parameters and results
The OPC UA Standard Interfacing SCADA to Controllers (PLCs) 5 Industrial standard (2008) to interface controllers Covers data, alarms, events, historical data, remote methods Symbolic addressing Browsable Based on OPC Classic (Microsoft, 1996), adding Portability (does not require DCOM/Windows) WAN Support (TCP instead of DCOM) Safety/security (certificate-based authentication and encrypted connection) Information modeling (user-defined structures)
Why OPC UA? Strategic and Conceptual Arguments 6 OPC UA is gaining momentum as universal industrial integration standard across vendors and application fields Open standard, managed by the OPC Foundation, which provides a reference implementation Vendors can have their products certified by authorized labs, ensuring compliance and compatibility More and more controllers (e.g., Siemens S7 PLCs, Beckhoff TwinCAT, LabVIEW) offer an embedded OPC UA server
OPC Unified Architecture Overview The Big Picture 7 Source: Unified Automation
OPC UA Subscription Concept Context Necessary to Subscribe to Data Changes 8 Monitored Item One piece of data (simple or structured) that the client is interested in Subscription Updates are grouped and sent together Session Logical connection Specific user authN/authZ Secure Channel Connection to an OPC UA server Source: Unified Automation Secured (encrypted and/or signed)
OPC UA Subscription Concept Settings for Subscription and Monitored Items 9 Source: Unified Automation Not Supported (Yet)
EPICS Device Support Module Brief History 10 Evaluation of client library options and Device Support prototype Bernhard Kuner (HZB/BESSY) ITER use cases tested by F4E (Spain) and TCS (India) Against S7-1516/1518 embedded OPC UA server Against WinCC-OA embedded OPC UA server Current implementation, using a design that allows integrating different low-level client libraries Recent major contributions from PSI, HZB/BESSY and ESS
EPICS Device Support Module Low-Level OPC UA Client Choices 11 Stable: Use of commercial C++ Client SDK by Unified Automation 4k for source code and 1 year support (extend support: 20% per year) one developer/many products or many developers/one product Binaries can be deployed/distributed royalty-free Platforms: Windows and Linux; evaluation bundles available Newest versions (1.7.9 and 1.8) have issues New: Use of free open62541 SDK client libraries Work by Dirk Zimoch (PSI) and Carsten Winkler (HZB/BESSY) Not trivial to set up More complexity on the Device Support side Less documentation than the Unified Automation SDK
EPICS Device Support Module Status 12 Requirements Specification v1.1: https://bit.ly/opcua-srs-11 Design done (no formal doc) Implementation nearly complete All basic data types and arrays thereof (read/write/subscribe) Supporting all applicable EPICS record types (bidirectional outputs) User-defined structures (read/write/subscribe), timestamps from data Server-side queues, configurable connection behavior OPC UA Security (encrypt, sign, authenticate) Lots of testing help by Roland Fleischhauer (HZB/BESSY) Integrated end-to-end test against a software server Work by Ross Elliot and Karl Vestin (ESS)
EPICS Device Support Module Roadmap 13 Started: Wiki pages: List of servers that have been integrated Useful tricks and hints Currently: User Manual (Ralph) ~30% done: integration of current READMEs and Cheat Sheet Server-side deadband filters (Dirk) Better enum support (read choices from server) (Dirk) Soon: Support for OPC UA methods (remote execution of PLC code) (Ralph) Support for servers that change structures on-the-fly (Karl)
EPICS Device Support Module Download 14 Device Support under EPICS license Upstream repository, Wiki pages, binaries, (future manual): https://github.com/epics-modules/opcua The GitHub download area has statically linked shared libraries containing the Unified Automation SDK client (i.e., plug-in libraries to link your IOCs against) Easy to use, fully functional, free forever Needs to match exactly your Linux distro and EPICS Base Used in the hands-on part
Users (2022) Facility ASIPP 15 OPC UA Server LabVIEW PLC Siemens S7-1500 PLC Siemens S7-1500F PLC Siemens S7-1500 Phoenix Contact Softing uaGate PLC Siemens S7-1500 LabVIEW PLC Siemens S7-1500F ABB Power SCADA Siemens DESIGO Kepware KEPServerEX PLC Siemens S7-400 PLC Siemens S7-1500 PLC Siemens S7-1500 Siemens WinCC OA PCVue LabVIEW PLC Siemens S7-1500 PLC Siemens S7 PLC Beckhoff Status production production near production production production production development development production near production development testing development testing production production production prototyping development production production Australian Synchrotron BESSY II @HZB CHIMERA @CCFE ESS Fermilab IPR ITER KATRIN @KIT PSI Varian ProBeam
OPC UA Integration Workflow Step 1: Browse the Server 16 Free browsing tool: UaExpert
OPC UA Integration Workflow Step 2: Configure the IOC 17 Configure the OPC UA server connections from the startup script opcuaSession PLC1 opc.tcp://plc1.controls.local:4840 sec-mode=None opcuaSubscription SUB1 PLC1 200 Add an EPICS record to your database record(ai, "$(DEVICE):dbl1") { field(DTYP, "OPCUA") field(INP, "@SUB1 ns=3;s=\"Data_block_1\".\"myDouble\"") field(PREC, "3") }
OPC UA Integration Workflow Step 3: Design Your Client Applications and Connect 18
Performance It All Depends Mostly on the Server 19 Early tests by TCS, comparing TCP Data Block transfer with OPC UA: big S7-1518, 32kB data(integers), empty / 40ms cycle artificial load
Performance It All Depends Mostly on the Server 20 Test in 2021 for ITER building automation integration Trying to verify realistic conditions 3x the estimated size (500kB data, mixed types) On a mid-size S7-1516 250ms sampling/publishing period No performance fine-tuning Results: Fit for this purpose Best performance when using few large structures
Limitations It All Depends Mostly on the Server 21 Limits found on the server end S7-1500: depends on the model (S/M/L) and data organization How many, how large, how often? Client-side fine tuning available e.g., registering items to cache server-side name resolution Servers separate from PLCs introduce additional latency Found one limit in the client LabVIEW serving 600 arrays of 7500 doubles each (~36MB data) -> SDK client has a limit of ~16MB for the serializer Solved by splitting to three subscriptions of 200 arrays each
22 Out-of-Scope INTERESTING IDEAS
An IOC as an OPC UA Server? Complicated and Hard to Do 23 This way of operation has not been requested by anyone EPICS is usually the top SCADA system used for integration Two exceptions: teams that wanted to use an EPICS IOC as a controller in the context of an industrial control system The open62541 server could be run on the IOC In EPICS 7, there is a server API that both CA and PVA servers use QSRV could work as a model for the Database integration The big task: getting the information model right Needs considerable experience with OPC UA server design The Companion Information Model needs to be done right to assure interoperability
A Generic OPC UA EPICS Bridge? Even More Complicated and Harder to Do 24 OPC UA has well-defined, located namespaces EPICS has a single global namespace Scalability: a single OPC UA server can t serve a complete facility Unlike EPICS, OPC UA has the concept of a device OPC UA always needs the server name first CA/PVA only use the PV name, never the server OPC UA is completely browsable CA is not browsable, PVA only if the server implements it Companion Information Model would need to cover PVA in a generic way Can the Normative Types be mapped to standard OPC UA structures?