The invention discloses a real-
time system based on a Windows driver, relating to a real-time expansion technology of a Windows
system and aiming at solving the problems of poor real-time property and stability of Windows real-time expansion carried out by adopting a traditional driver, inconvenience in development and debugging of a
control system, high Windows real-time expansion cost carried out by adopting an RTX (Real Time Executive) and other real-time
software and the like. The driver and a dynamic link
library (DLL) of the driver can be used for providing various services for the real-
time system and packaging an interface function in the DLL; in addition, the driver also comprises a real-time kernel for managing and running real-time tasks; an
application layer simulation program and a dynamic link
library of the
application layer simulation program can be used for providing an
application layer debugging environment for a real-
time control system, simulating the real-time task by adopting a Windows thread, simulating
clock interrupt of the real-time kernel by adopting a Windows
timer and simulating the communication and synchronization of the real-time task by adopting a communication and synchronization mechanism of the Window; and the real-time task and the dynamic link
library of the real-time task can be used for separating a real-time task module from the real-time kernel and separately developing and debugging the real-time task module. An
external interface card is used for providing a
timer with high precision and
high resolution for the real-time kernel and providing a data interacting and
signal converting function and the like for the real-
time control system and an external controlled object.