Introduction of Qt for Automation
Guest blog from The Qt Company
Today, Industry 4.0 and the IIoT have introduced a whole new set of challenges: There will be more connected devices, which will generate more data, that in turn will lead to even more complex software applications. The playing field will change at an exponentially accelerating pace, including the state of device infrastructure, application complexity, and development. To address this, architects came up with a common infrastructure design for the future of IoT:
Within this design, Qt and Toradex play in the field of Human Machine Interfaces (HMI) and Edge devices/controllers. There, Qt's strengths such as cross-platform, user experience, the large number of libraries and tools, can be used without restriction.
The Qt Company sees challenges like scalability, interoperability and performance requirements when creating smart devices as well as HMI solutions. As the implementations vary within the field of Industrial Automation, it is important to create scalable software that fits any device size, is cross-platform and can be maintained with dynamic updates.
A while back, The Qt Company posted a series of blog posts to discuss fast booting of devices. Depending on the usage of the application, it is critical to consider the boot times, application optimization, optimization of the software stack and of course, the selection of the hardware.
Hardware selection and hardware architecture, in general, can have a big impact on the actual startup time even when using the same CPU. Based on a simple side-by-side test, the Toradex Computer on Module was a clear winner with 19% (294 ms) faster startup time. The differences came from the fact that powering up of the board is faster with a Toradex module and that kernel can access eMMC earlier resulting in a faster kernel startup time.
- Application: Base software, including your company’s secret sauce – libraries that control your custom hardware or encode your particular algorithms
- UX: Bridge between your app and the user. Although written by your team, it uses the full power of the Qt framework
- Third party components: Software libraries, databases, or protocol stacks – things your app relies on that your company didn’t write
- Qt runtime libraries: UI components of Qt, containing a large number of support functions and libraries
- C++ runtime libraries: Runtime components and libraries provided by your C++ compiler
- Operating system: Interface to your hardware. Depending on requirements, this may be a desktop OS, a Linux variant, or an RTOS
A bundle of technologies, Qt for Automation is specifically designed to address many common industrial requirements. Developers can pick and choose what components they need from automation protocols, virtual keyboards, charts, table view, internationalization (Multilanguage), remote UI with a 0-installation approach via multiclient browser connection, and configuration tools.
In addition, Qt for Automation includes several technologies for a common problem – securely and reliably managing objects and devices across a widely distributed network:
QtMQTT is a client implementation, which can be used for creating devices to send, but also to monitor solutions for receiving and managing data. QtMQTT does not focus on the broker side. One important item to mention is that QtMQTT is aimed to be fully specification compliant compared to other solutions. This implies to support for protocol level 3.1 and 3.1.1, all QoS levels, wildcards, authentication, SSL connections and Last Will support. With regards to security, QtMQTT provides two means to achieve this: Authentication via username and password when a connection is established and using SSL/TLS sockets as a connection channel. It is also easily extensible as it allows you to specify additional transport methods, which are based on either QIODevice or QAbstractSocket. This implies that you can create your own transport and pass it over to QMqttClient before establishing a connection. One concrete example is to use MQTT over websockets, for which Qt provides a separate module. QWebsocket is not based on QAbstractSocket due to different means of sending and receiving data. However, the specification is very clear on how MQTT data has to be pushed via websocket (send as binary data, must fit one datagram, etc.). Hence, a convenience class can be implemented. The specific showcase can be found in the examples of the QtMQTT module.
With all this, QtMQTT ideal for IoT applications because of its small size, low power usage, minimized data packets, and efficient distribution of information to one or many receivers. Last but not least QtMqtt has no external dependencies you otherwise might have to deal with.
Presentation about MQTT at the Qt World Summit:
KNX is the European leader for smart home and building protocol (https://www.knx.org), with its own PC based software for programming and controlling installations. KNX aims for the most ambitious setups and their standard is ubiquitous and widely supported by manufacturers. However, KNX’s long-standing challenge has been that it is relatively difficult to develop and deploy client applications. The QtKnx library, which is part of Qt for Automation, offers an open source and commercially deployable alternative for this technology and closes the gap to make it easier for companies to create tailor-made UIs for smart buildings. It allows the possibility to integrate different functionalities (e.g. speech recognition) and technologies (e.g. BLE).
As a first step, QtKNX can be used to build the KNX client implementation that discovers KNX servers, and then controls and manages the installation behind the server. In the demo presented at the Qt World Summit 2017, Qt showcases how you can control e.g. the lights in your home by using KNX as the communication protocol between the control board and the lights.
QtKNX demo video from Qt World Summit 2017:
The development of this offering continues and we are excited about the new functionality coming along!
QtWebGL Streaming allows exclusive and lossless remote access (no mirroring) of Qt Quick applications in a browser. When the remote application runs using this new platform plug-in, the application will create a lightweight web server. When a user connects to the application, a web socket connection is opened between the server and the client, using QWebSocketServer. The application running on a remote computer will serialize all GL calls to binary data and sends it using the web socket connection. The local browser will send the event (mouse, touch or keyboard) to the remote application, so user interaction is allowed. Even multi-touch functionality up to 6 fingers is supported.
WebGL streaming is not an exclusive part of the Qt for Automation offering but rather being available for Qt for Device Creation and Application Development. But the power of WebGL streaming shines especially in Automation and IIoT implementation scenarios.
Qt WebGL Streaming from the Qt World Summit 2017:
Qt recently announced a collaboration with Microsoft to streamline the integration of Microsoft Azure Cloud Platform and Services into the Industrial Internet of Things (IIoT) for the industrial automation market. (https://www1.qt.io/qt-news/qt-company-collaborates-microsoft-simplify-cloud-connectivity-industrial-automation)
At various fairs Qt has demonstrated how easy it is to utilize Microsoft Azure service out of Qt Applications. With the help of our partners, we have shown the Qt for Automation capabilities on different platforms. One of our showcases at Embedded Technology 2017 in Yokohama, Japan was the Qt Electric Charging Station (EVSE) demo that has been built with Toradex Colibri iMX6 Computer Module featuring NXP®/Freescale i.MX 6 SoC. Qt has a pre-configured Boot2Qt stack for Toradex System on Modules (SoMs). This allows for simple getting started. With this combination, customers can optimize the performance and build scalable software for different types of implementations.
Toradex and Qt are working hand in hand to optimize Qt on Toradex hardware. This includes performance improvements such as 2D rendering for low power modules not featuring a 3D GPU, or boot time optimizing such as the 1.2 Second Cold Boot time.
Another focus of the collaboration is the developer experience. Pre-configured Boot2Qt stacks are available for most Toradex SoMs, and soon you will be able to install Boot2Qt with a single click via the new Toradex Easy Installer.
Qt for Automation is available with Qt 5.10. To get started, visit https://www.qt.io/qt-in-automation/. To learn more about Qt on Toradex see https://developer.toradex.com/knowledge-base/getting-started-with-qt.#IoT (Internet of Things) #NXP® i.MX6 #NXP® i.MX7 #Qt #WebGL
Leave a comment
Your email ID will be kept confidential. Required fields are marked *
* Your comment will be reviewed and then added. Thank you.