Real-Time Windows Target | ![]() ![]() |
Real-Time Kernel
Real-Time Windows Target uses a small real-time kernel to ensure the real-time application runs in real time. The real-time kernel runs at CPU ring zero (privileged or kernel mode) and uses the built-in PC clock as its primary source of time:
The kernel then uses the interrupt to trigger the execution of the compiled model. As a result, the kernel is able to give the real-time application the highest priority available.
To achieve precise sampling, the kernel reprograms the PC clock to a higher frequency. Because the PC clock is also the primary source of time for the Windows operating system, the kernel sends a timer interrupt to the operating system at the original interrupt rate.
Technically, the kernel is provided as a VxD on Windows 95 and Windows 98, and as a kernel-mode driver on Windows 2000 and Windows NT.
During execution, the executable stores data in buffers. Later, the data in these buffers is retrieved by the Scope block. The scheduling, data storing, data transferring, and running the executable all run at CPU ring zero.
The Analog Input, Analog Output, Digital Input, and Digital Output blocks call the drivers for input and output. You can choose to have a driver block use values equal to voltage, normalize values from 0 to +1, normalize values from -1 to +1, or use the raw integer values from the A/D or D/A conversion press. Drivers also run at CPU ring zero.
![]() | Features | Real-Time Application | ![]() |