OPC UA support in Qt 5.11

OPC UA is a central element of the Industry 4.0 story providing seamless communication between IT and industrial production systems. basysKom has initiated Qt OPC UA in 2015 with the goal of providing an out of the box Qt API for OPC UA. In 2017 basysKom, together with The Qt Company, has finished up a Technology Preview of that API. It will be available with the upcoming Qt 5.11 release end of May.

The focus of Qt OPC UA is on HMI/application development and ease of use for client-side development. The Tech Preview implements a subset of the OPC UA standard. It allows to connect to servers, read and write attributes, call methods on the server, monitor values for data changes and browse nodes. All this functionality is provided by asynchronous APIs which integrate nicely into Qt applications.

Qt OPC UA is primarily an API and not a whole OPC UA stack. A plugin interface allows to integrate existing OPC UA stacks as API backends. Currently, plugins for the following stacks are available:

  • FreeOpcUa
  • open62541
  • Unified Automation C++ SDK 1.5

Qt OPC UA will be available directly from the Qt installer for those holding a Qt for Automation license. The source code itself is triple licensed (GPL, LGPL and commercial) with the exception of the Unified Automation backend which is only available under a commercial license. Users of one of the Open Source licenses will need to compile Qt OPC UA themselves. See here for a list of build recipes.

The backends for FreeOpcUa and open62541 are available under an Open Source license. When going for an Open Source solution, we recommend the open62541 plugin as it is the more complete implementation with an active community and a good momentum. It also has less dependencies, making usage on platforms such as Android or iOS much easier.

On the platform side, the technology preview will by available for

  • Windows with Visual Studio 2015 & 2017 as well as MinGW
  • Linux (Desktop and Embedded)
  • Android and iOS

Please note that not every backend is available on every platform.

On top of what is part of the Tech Preview, there are already a number of additions planned. Among them support for transport security, the discovery service, event support and filters.

We are looking forward to feedback and questions on this new module.

Want to give Qt OpcUa a try?

Update 02.03.2018: the steps outlined below have become outdated. Please see here for up to date build steps.

basysKom has initiated Qt OpcUa which is a module offering support for the industrial communication standard OPC UA. This module has been contributed by us to the Qt Project. The Qt OpcUa API wraps existing OPC UA implementations. Currently, implementations for freeopcua and open62541 are available.

Qt OpcUa will become part of the Qt 5.11 release as a Technology Preview. First alpha builds will be available by the end of February 2018. Qt 5.11 release is scheduled for end of May 2018.

Why not try out the current state of Qt OpcUa right now?

We have been asked by a number of people how to get started already now. We will provide short howtos for Ubuntu, Windows-MinGW and Visual Studio 2017 in the following article.

Two things are needed: Qt OpcUa itself and an OPC UA library. In this article, we use open62541 as it has very little dependencies (and is the more complete implementation anyway).

The easiest approach to build Qt OpcUa is as a drop-in for Qt 5.10. This spares us from creating a full Qt build based on the current dev branch.

The following recipes assume that you have cmake, python/pip, perl, git and other essential build tools installed. Paths used with the examples need to be adjusted to reflect your local situation.

Installation on Linux

These steps have been tested on Ubuntu 16.04 but can be applied to a wide range of desktop distributions.

Installation on Windows (Visual Studio 2017)

Start by running the Qt 5.10.0 64-bit for Desktop (MSVC 2017) shell shipped with Qt (have a look at the “Start Menu”). Use this shell to issue the following commands:

Above recipe will also work for Visual Studio 2015. 2013 is not supported (and will be dropped by Qt 5.11 anyways).

Installation on Windows (MinGW as shipped with Qt 5.10)

Start by running the Qt 5.10.0 for Desktop (MinGW 5.3.0 32 bit) shell shipped with Qt (have a look at the “Start Menu”). Use this shell to issue the following commands:

Usage

After successful completion of above steps Qt OpcUa will be available from your existing Qt5.10 installation. A documentation snapshot can be found here.

The following “Hello Qt OpcUa” example shows how to read an attribute from a server (add QT += opcua to your .pro).

Conclusion

Most of the API envisioned for the Technology Preview is available. We are currently busy testing and polishing, as well as adding more comprehensive examples and improving the documentation. Please leave a comment or get in contact with us if you have any questions or comments – you still have the chance to influence the final shape of the API.

QtWs17: Practical Qt Lite

The Qt World Summit recordings 2017 are online. basysKom presented “Practical Qt Lite”.

Qt Lite is a project within Qt geared towards optimizing Qt for smaller devices. One important feature of the overall Qt Lite story is the ability to create size optimized, application specific builds of Qt. These require less flash, less RAM and also load faster.

In this presentation we show how to create such size optimized builds with and without Qt Lite and  present some actual numbers on achievable savings. Have fun!

Qt World Summit 2017 – Berlin

This year the Qt World Summit is back in Europe. It will be held October 11th and 12th in Berlin. basysKom is proud to sponsor and to participate in a number of ways.

At the exhibition we will showcase a distributed industrial automation scenario based on Qt Quick and QOpcUa. QOpcUa is an upcoming Qt module basysKom initiated, aiming for simple integration between industrial controllers and HMIs. The showcase also features integration of telemetry data into a Microsoft Azure-based Cloud-Application via MQTT. To highlight the cross platform capabilities of Qt, the HMI is deployed to a number of different devices.

At the conference we will present our Qt Lite experience. “Practical Qt Lite” will be held Wednesday at 15:00, Room A03. Come visit us if you are interested in having smaller Qt builds for your embedded project.

This year, the Qt Contributor Summit is co-located with the World Summit. Contributors to Qt discuss the development and directions of the Qt project. The Contributor summit happens Monday and Tuesday, right before the World Summit. basysKom will offer a session on QOpcUa on Tuesday at 15:00 in Room2. If your are interested in OPC-UA and its integration into Qt please join the session!

We are looking forward to meeting you in Berlin!

Qt Lite

Qt Lite is an initiative driven by The Qt Company striving for smaller and leaner Qt builds. It utilizes the new configuration system introduced with Qt 5.8 to create custom builds stripped of features or classes that aren’t needed for a given application. Focus is mostly on Embedded Linux with the goal of making Qt a feasible option on smaller systems. In this post we will have a look at the current state of affairs and we will provide guidance on how to experiment with Qt Lite on your own. Continue reading Qt Lite

QtCon 2016 – Berlin

QtCon 2016basysKom will sponsor the biggest Qt event in Europe, QtCon 2016 in Berlin.

Our Development Lead is looking forward to visiting this event in order to have exciting technical discussions with you. If you want to schedule a meeting upfront, please send an email to info@basyskom.com.

See you in Berlin!

Storage of QML defined properties explained (Part 1)

How much does a property you define in QML code cost in terms of memory? This simple question led me down a merry chase into the source of the QML engine. The result is this article and in the end a contribution to Qt5.6.

Before we get started, let’s do a quick recap of what we know about Qt properties on the C++ side. Qt has compile time properties which can be added to QObject derived classes. The various methods associated with such a property (read/write/reset/notify/…) are specified using the Q_PROPERTY macro. The properties themselves are typically stored as C++ member variables. They integrate with the meta object system and are therefore also accessible from the QML-side.

Back to the initial question: how much memory is needed for a QML defined property? To answer this, one first needs to figure out how and where they are Continue reading Storage of QML defined properties explained (Part 1)

Introducing QtOpcUa

basysKom has been working on the new Qt module QtOpcUa which brings support for the industrial communication standard OPC UA into the Qt world. We recently have offered this module as a contribution to the Qt-project. It is currently under review, we aim to make it a tech preview in Qt 5.7.

basysKom will show QtOpcUa based demos at the Qt World Summit 06./07.10.2015 in Berlin. We are happy to discuss use cases, improvements and OPC UA in general. Looking forward to see you in Berlin.

What is OPC UA?

OPC UA is a communication suite for industrial applications like process or factory automation. Its specification is developed and maintained by the OPC Foundation. The first version has been released in 2008. OPC UA is the successor of the popular original OPC standard (which is now OPC Classic). Unlike its predecessor which was based on Microsoft DCOM, OPC UA is designed with the focus on platform independence and scalability. Beside others, it includes features such as data modeling and much improved security mechanisms. This lines the vision of OPC UA to provide a standard communication protocol to be used on all levels of an industrial plant, ranging from field devices to the ERP system. The involvement of companies like Bosch, Siemens and Honeywell within the OPC Foundation as well as the development of the OPC UA specification itself shows that OPC UA will play an important role in future projects and products.

Continue reading Introducing QtOpcUa