Real-time multitasking

PC-based industrial automation sets specific requirements for Windows real-time extension:

  • deterministic execution of single tasks
  • coordinated properties of multiple applications
  • highly accurate timestamps
  • immediate reaction to external events
  • lowest possible deviations (Jitter) during cyclic acquisition of measurement data
  • accurate monitoring of process states in real time
  • not just simply "fast PCs" at fair-weather conditions, but actual "hard" real-time capabilities

Real-time for Windows

Kithara RealTime Suite is a modular real-time extension that provides several mechanisms to optimally meet such requirements. Here are some core features of the real-time system:

  • Utilization of the highest system priority (prior to other Windows applications)
  • thereby uninterrupted execution of priority functions for important tasks
  • highly accurate reaction to external events (e. g. timer, interrupts, communication interfaces etc.)
  • programmable high frequency and periodic timers (time-equidistant)
  • Priority-based preemptive real-time multitasking
  • Utilization of hardware parallelism (multicore CPUs, real-time task allocation)
  • Scalability of real-time execution up to extreme real-time capabilities with exclusively used CPU cores
  • Supports Windows 10 and 11 (32 bit and 64 bit) as well as Windows Server 2016, 2019 and 2022

Our high-frequency timers for Windows are widely used in robotics, machine vision, measurement, control and automation. The Kithara environment reaches the same level of performance as pure real-time systems and provides special real-time timers, that can be programmed with frequencies of up to several kilohertz. The deviation (jitter) amounts to only a few microseconds. On exclusively used CPU cores, real-time capabilities can be increased even further, with timers having a maximum jitter of only about 1 microsecond. Thus, it is possible to program and use accurate cyclic timers with frequencies of up tp 20 kHz. For fast data exchange between real-time and application level, events, shared memory, pipe mechanisms and sockets are available.

Many applications can only be implemented by using a complex model of processes. Therefore, powerful tools are required for implementation. The best appropriate approach for this purpose is a priority-based, preemptive multitasking system. The real-time tasks, which provide up to 255 different priority levels reliably ensure that only the task with the highest priority is executed.

real-time timer, real-time multitasking

Modules

Real-time multitasking with the modular sytem of Kithara RealTime Suite consists of the following components:

  • Highly accurate calibrated monitoring of system time and short delays Timer Module,
  • Accurate real-time timer routines and priority-driven preemptive real-time multitasking RealTime Tasking Module,
  • Precise synchronization of multiple network participants PTP Module.

Timer Module

Highly accurate and calibrated detection of system time as well as short time delays

  • Common
  • Features

The Timer Module with its clock functions represents the basis for all real-time tasks. It provides a calibrated access to all hardware time bases in the system. Time information can be freely converted into any time formats, even user specific ones. Short time delays are accurate within a few nanoseconds depending on the utilized hardware. Additionally, it can generate simple timers without real time in millisecond resolution based on Windows mechanisms.

  • Detection of all operating time bases in the system
  • Calibration of different timer/clocks
  • Long-term synchronization of system clocks
  • Monitoring the system time in different time and user-specific formats, resolution up to 0.1 μs
  • Highly accurate short time delays in 0.1 µs steps
  • Programming of user-specific time formats
  • Reliable prevention of overflows caused by internal 96-bit operations
  • Creation of simple timers in millisecond resolution based on Windows-mechanisms (no real time)

RealTime Tasking Module

Programming of high frequency real-time timer routines and priority-driven, preemptive real-time multitasking

  • Common
  • Features
  • Extensions

The RealTime Tasking Module complements the Timer Module and enables the programming of timers, which can trigger the application code in different ways. The context of the program execution can be selected. Signalable objects can be events or callbacks at application or kernel level, as well as real-time tasks. Also included is a priority-driven, preemptive real-time multitasking system for the mutual prioritization of single real-time tasks. This allows for detailed handling of which processes come prior to others, halting less important ones as well as which tasks can be interrupted by more important ones, which is equivalent to the mechanisms of a pure real-time operating system (RTOS).

Maximum of two dedicated CPUs, above requires Dedicated CPU Extension.

Real Time

  • Development of high frequency real-time timer routines
  • Cyclical or one-time timer programmable
  • Simple debug and test option with callbacks at application level
  • Option for timers to directly start, exit or kill
  • Easy implementation of watchdog mechanisms
  • Start time can be set in a 0.1 µs resolution (e. g. for synchronization with other processes)
  • Timer frequencies of up to 20 kHz and more
  • Jitter in the one-digit microsecond range
  • Timer period dynamically adjustable

Multitasking

  • Preemptive real-time system
  • Real-time tasks with up to 255 different priority levels programmable
  • Dynamic modification of priority levels
  • Multiple tasks with the same priority level as "round-robin"
  • Including priority inheritance to avoid priority inversion
  • Real-time semaphores for synchronization between real-time tasks
  • Real-time events for triggering of external tasks
  • Tasks can be suspended, continued, triggered, exited and killed
  • Tasks can be delayed (0.1 µs resolution)
  • Operation of CPU cores exclusively in real-time mode in order to avoid Windows influence
  • Very short task switching times
  • Speedloop mode for high-precision cyclical execution

Requires Timer Module

Dedicated CPU Extension

requires RealTime Tasking Module
Extension for using additional logical dedicated CPUs

  • Extended Level: up to 8
  • Maximum Level (requires Extended Level): up to 47 (more on request)

PTP Module

Real-time synchronization with Precision Time Protocol

  • Common
  • Features
  • Extensions

The PTP Module allows for multiple network participants within a distributed system to accurately synchronize with each other and to be controlled in real time. The Kithara real-time system generates precise timestamps with deviations in the sub-microsecond range in order to match the clock of all participants. The API provides access to the BMCA (Best Master Clock Algorithm), which determines the Master clock according to configurable parameters. Alternatively, master and slaves can be set manually.

  • Precise synchronization of multiple network participants
  • Accurate timestamps with deviations in the sub-microsecond range
  • Configurable BMCA (Best Master Clock Algorithm)
  • Manual setting of master and slaves
  • Requires Network Module

NMEA Extension

Real-time communication and synchronization with NMEA 0183.

gPTP Extension

The gPTP Extension complements the PTP Module with support for the “generalized Precision Time Protocol” (defined in IEEE 802.1AS), a simplified PTP profile. The gPTP Extension allows for highly accurate synchronization of all clocks within a distributed system but limits itself to a more straightforward set of functions, making it suitable for a broader range of applications. For example, clocks do not have to be configured individually but are all standardized.

  • Precise synchronization of multiple network participants
  • Simplified PTP profile
  • All clocks standardized
  • Easier configuration of the BMCA (Best Master Clock Algorithm)


Further features

In order to gain “hard” real-time capabilities, it is necessary to run the application code in the kernel mode of the system.

  • Code execution at kernel level is supported by C, C++ and Delphi as well as C# (by transferring the code into a DLL)

Due to the fact that the system library is available for the customers, they benefit from a lean and on-demand programming, which the developers control down to the smallest detail. Thus, adjustments can be easily implemented by developers themselves instead of a "Black Box" concept.

Realize complex and sophisticated applications by means of our bundled know-how. Use multitasking and real-time ethernet communication up to 10 Gbit/s for a wide variety of automated applications, such as EtherCAT or CANopen based fieldbus applications. Complementary and efficient development tools, such as Kithara Kernel Tracer for monitoring all processes accurate down to the microsecond or Kithara Master Monitor for graphical visualization and control of connected I/O terminals, sensors and actuators, complete the package.