Presentation is loading. Please wait.

Presentation is loading. Please wait.

Generic OPC UA Server Framework

Similar presentations


Presentation on theme: "Generic OPC UA Server Framework"— Presentation transcript:

1 Generic OPC UA Server Framework
Piotr Nikiel For OPC UA Developers 3rd Mar 2015

2 Intro What is this? Where does rapidity come from?
A framework for rapid creation of OPC UA servers, using C++. Where does rapidity come from? Automatic generation of majority of source code Establishing common architecture and convention What does it base on? The OPC UA Toolkit A number of open source libraries and tools

3 Organization of Readout
Configurator OPC UA Address space Device Logic WinCC OA OPC UA Client Other OPC UA Client #1 Other OPC UA Client #2 Hardware access layer Hardware XML config file configures OPC UA Server TCP/IP

4 Modus Operandi START Get&Understand model of target device/system
Create(edit) design file Generate OPC UA Address Space and Configuration module (Re)generate device logic stubs (Re)implement device logic Build Test, evaluate … Device model is OK Y N N Device logic is OK Work to be done = design file + device logic + testing Roughly 50-90% lines of code generated Y END

5 Elements of the Design File
Very much alike traditional Object Oriented design Main elements Classes E.g. System, Crate, Channel, PowerSupply, Probe, Fan, … Relations between classes E.g. System has Crates, Crate has Channels and Fans, Channel has Probes Variables which belong to classes E.g. voltage, current, temperature, fan speed, on/off, … Various types: cache and source variable, for in-memory data as well as asynchronous and synchronous device access (and synchronization) XML Schema available Using Eclipse helps a lot in editing (like filling up a form)

6 Configuration Module Generated parts:
XSD Schema for server’s configuration file Configuration loader builds address space & device hierarchy accordingly Configuration validator C++ mappings Access configuration data from device logic without writing any XML handling code

7 Example – Simple 2 Class Design
TEXTUAL CONTENT VISUALIZATION DESIGN FILE CONFIGURATION FILE (generated diagram) <class name=“PowerSupplyChannel”> <cachevariable name=“current” dataType=“Float”/> </class> <class name=“PowerSupply”> <sourcevariable name=“state” dataType=“Int”/> <hasobjects class=“PowerSupplyChannel”/> In OPC UA client (from UA Toolkit): <PowerSupply name=“powerSupply1”> <PowerSupplyChannel name=“channel1”/> <PowerSupplyChannel name=“channel2”/> </PowerSupply>

8 Demo 1 Editing in Eclipse Design file Config file

9 Build System & Tools Build system Tools Provided out-of-the-box
Tightly integrated with the workflow Based around CMake Tools Consistency checker Visualization tools Design file validator and upgrade tool A tool for upgrading your project to newer framework version „Honky tonk” generator – quick way of testing your address space Easy RPM Generator Doxygen integrated by default

10 Demo 2 Building a project

11 For More Advanced Designs…

12 WinCC OA Integration Features: Generation of Data Point Types
basing on classes declared in design file (arriving soon) Creation of Data Points Basing on config file Generation of CTRL code for peripheral OPC UA address setup

13 WinCC OA Integration - Screenshot

14 Advantages Programming reduced to device logic implementation
No knowledge of OPC UA Toolkit required Coherency (single point of input: Design file, everything else generated from that) Profit from achievements of other OPC UA developments e.g. calculated items (based on CANopen server) Quick integration of custom components into SCADA

15 Current State Generic OPC UA Server framework: production-ready 0.96
Validated with SLC6.6 production systems Windows version is in progress OPC UA Servers using this approach: In production: ATLAS Wiener server for VME crates (custom protocol over CAN) ATLAS LAr Purity server (custom protocol over CAN) S7 TSPP PLC OPC UA Server (Siemens native protocol over TCP/IP) In development: EN-ICE Caen HV server (Caen protocol over TCP/IP) ATLAS IBL FEI4 server (custom protocol over TCP/IP) ATLAS TileCal HV Micro server (custom protocol over CAN) Test servers: Simple CANopen server (CANopen over CAN)

16 Deliverables The frameworks comes as a complete package ready to create new OPC UA server projects SVN Link: Documentation: Video tutorials on youtube Written documentation Have a look inside Documentation on SVN link above

17 BACKUP SLIDES

18 Software Dependencies
Mandatory: Suitable C++ compiler (gcc is assumed by default) The Unified Automation OPC UA Toolkit, version 1.3.3Boost development libraries. (In principle, boost-regex, boost-devel and boost-program-options should be sufficient) XSLT processor capable of XSLT2.0 processing. We use Saxon9 which is bundled with the package. Java run time environment, to run the Saxon XSLT Processor. Cmake version 2.8 or later. Available in SLC6 as cmake28 package. Recommended: Schema-aware XML editor. We use Eclipse, as can be seen in the screencasts. Good C++ IDE / editor. We use Eclipse, as can be seen in the screencasts. Good merge tool. We use kdiff3 (available as kdiff3 RPM in SLC6 Linux). ArtisticStyle – for formatting of automatically generated code Graphviz for UML visualization UnifiedAutomation UaExpert or any other OPC UA Client for exploring OPC UA address space. Valgrind, for checking memory-related problems. (valgrind RPM in SLC6) PDF viewer for opening UML-like diagrams created from design file. Doxygen for generating documentation. RPM Build tools for RPM generation

19 Transformations Diagram

20 What is generated from the design file? Backup
Complete address space Complete configuration Configuration file loader (aka “Configurator”) with config validator Schema for configuration file Device logic stubs Ready for providing implementation WinCC OA integration Generation of DPTs from classes description Generation of OPC UA Address Setup Autogenerated tools, diagrams, etc …


Download ppt "Generic OPC UA Server Framework"

Similar presentations


Ads by Google