Windows for real-time applications through Real-time Accelerator technology

Overview

Nowadays, more and more applications, particularly in the fields of industrial automation, medical technology, data acquisition, and measurement technology, require a deterministic real-time behavior. The acontis Real-time Accelerator technology (RtaccWin) enables you to run hard real-time capable applications deterministically under Windows. This is accomplished by exclusively reserving one or more CPUs for the real-time application, setting up the proper parameterization of Windows, and utilizing the acontis kernel drivers for precise timing and direct hardware access.

Software Architecture

Windows (IoT Enterprise or Professional) based PCs can benefit from acontis' RtaccWin software for stable real-time operation of applications with a guaranteed cycle time of 1 ms. In principle, faster cycle times can also be achieved. To achieve this, at least one CPU is exclusively reserved for the real-time application while the other CPUs remain available for standard Windows applications.

RtaccWin includes a Windows system driver that provides a precise and adjustable clock for the entire application. To ensure deterministic behavior, standard Windows drivers are typically not used for the real-time application. Instead, the kernel driver in RtaccWin allows direct access to hardware, such as network cards, fieldbus cards, etc., from Windows user mode, resulting in lower jitter, significantly lower CPU utilization, and a deterministic behavior. This also enables sending and receiving Ethernet frames without using the Windows network stack, and there are no adverse effects when using other network interfaces in parallel.

Configuration Tool: RtaccWinConfig

The software configuration tool, RtaccWinConfig, is used to prepare the Windows system for real-time applications. Firstly, it isolates at least one CPU, which means that regular Windows processes and services no longer use that CPU. The isolated CPU is then made exclusively available for real-time applications.

Another function of the RtaccWinConfig tool is assigning hardware to a real-time application. This means the regular Windows driver is unloaded, and the hardware can be accessed from the Windows user space. The acontis kernel driver enables fast and direct access to all memory areas of the assigned hardware.

Software development

The process of developing a real-time application is similar to that of a standard Windows application. Here are the steps to follow:

  • Use the RtaccWinConfig tool to set up the system
  • Create one or more threads for the real-time tasks
  • Assign these threads to the previously isolated CPU
  • Assign a very high priority to the threads to make them "Real-time threads"
  • Optionally, generate a stable and precise clock via the acontis Windows system driver

A Windows process can include both "non-real-time threads" and "real-time threads." Both thread types can access global variables and use standard synchronization mechanisms like Events, Critical Sections, Mutexes, and Semaphores. The popular Win32 API is also available in the "Real-time threads." You can use the full functionality of Microsoft Visual Studio for the entire development process. In debug mode, all resources can be accessed by all threads. Of course, you can also execute "Real-time threads" step-by-step without real-time behavior.

Performance

A stable and precise clock with low jitter is crucial for real-time applications, particularly for executing control loops every millisecond. While an application should ideally be triggered precisely every 1000 microseconds, deviations can occur in practice, leading to longer or shorter intervals. With the acontis Real-time Accelerator technology, these deviations, also known as jitter, can be significantly reduced under Windows.

The RtaccWinConfig software tool can measure performance on an isolated CPU with a specific cycle time. It displays graphical representations of the maximum and minimum deviation values. The maximum jitter allowed depends on the application, but a deviation of up to 10% of the cycle time is generally acceptable. For instance, with a cycle time of 1000 microseconds, the minimum value should be no less than 900 microseconds, and the maximum value should be no greater than 1100 microseconds.

Without the Real-Time Accelerator technology, the cycle time can fluctuate significantly. After eight hours, tests conducted on a Minis Forum U820 (i5-8279U CPU) running Windows IoT, and heavily loaded with a Passmark burn-in test, revealed significant fluctuations.

Enabling Real-Time Accelerator technology, however, guarantees a precise clock with minimal deviations, as demonstrated by tests conducted on the same system after eight hours.

Real-time TCP and UDP communication with lwIP (light weight TCP/IP Stack)

Using Windows it is not possible to guarantee fast network communication via TCP or UDP sockets. As one example it is not possible to use or receive and process a UDP packet every 5 milliseconds. The reason for this is not only the lack of real-time capability of the Windows operating system, but also the lack of real-time capability of the NDIS TCP/IP stack and the network card drivers.

In order to establish a stable, guaranteed, cyclical communication via sockets on Windows, a suitable TCP/IP stack and network driver must therefore be used in addition to the RtaccWin technology.

The widely used open-source software lwIP (light weight IP) is a TCP/IP stack and supports a large variety of protocols, including IP, IPv6, ICMP, ND, MLD, UDP, TCP, IGMP, ARP, PPPoS, PPPoE and contains clients for DHCP, DNS, an SNMP agent and supports AutoIP/APIPA (Zeroconf).

The lwIP TCP/IP stack is operated as a process within the Windows user space on an isolated CPU. The access to the Ethernet interface is realized using acontis Real-time Ethernet drivers. These drivers communicate directly with the hardware without usage of Windows kernel drivers. This enables the real-time threads to communicate quickly and in real time via Ethernet using the TCP and UDP protocols.

Measurements show a significant reduction of jitter

To determine the effective maximum pass-through times as well as the jitter, both for transmitting and receiving a UDP frame, acontis has set up a suitable test system: The network interface of the computer (Minis Forum U820 i5-8279U) with Windows 10 IoT is directly connected to an EtherCAT SubDevice (Beckhoff EK1100) via an Ethernet cable. The transmission rate is 100 Mbit/s and the SubDevice has a very short and uniform throughput delay of approximately one microsecond. In addition to the measurement program, a very high load using by a burn-in test running in parallel was generated on the computer to generate maximum load and stress on the system.

The measurement results clearly show the advantages of the RtaccWin technology in conjunction with the lwIP stack and the acontis Real-time Ethernet drivers:
With the standard Windows setup, it can take more than 26.000 μs in the worst case until the sent UDP frame is received again.
When using RtaccWin but still in combination with standard Windows NDIS stack and drivers, this value drops to 4.896 µs.
If the lwIP stack is used in combination with RtaccWin, the worst-case value is reduced to an impressively low 396 µs.

This enables to realize a stable exchange of cyclical data with a cycle time of one millisecond.

Features

  • Fast response times within microseconds
  • Hard real-time with Real-Time Accelerator technology using CPU isolation
    • Real-time functions and standard functions in one process on one isolated CPU
    • RtaccTimer driver to generate a precise, stable clock
    • RtaccDevice driver for direct access to hardware without kernel driver
  • Comfortable configuration tool RtaccWinConfig

Advantages

  • Real-time applications can be developed like normal Windows applications
  • Standard Win32 API also available in real-time threads
  • Microsoft Visual Studio support. Convenient development and debugging of the entire real-time application
  • Simple data exchange via variables. No complicated communication between real-time and non-real-time part of the application required.
  • Very easy handling and low training effort

System requirements

  • Windows 10 IoT Enterprise or Windows 11 IoT Enterprise
  • Windows 11 Professional
  • Quad Core CPU

More Information

Free Evaluation Request