PC SDK: Writing/reading signals with 1 ms response time

Hello,

I’m trying to achieve similar write/read speeds with a .net application as that you can achieve with a rapid task.
The PC SDK manual states that the minimum response time is between 10-100ms although I’ve tested this by creating the following rapid and c# program.

Rapid program:

C# console application:

The result after running the simulation (signal analyzer) was the following:

*ignore the other signals (I also tried setting multiple signals at once)

Questio****n
After running the same test but with polling the signals with an accurate 1ms timer (± 20 us) as well as changing the process priority to high/realtime, I still had similar results.
These results concluded that the response time is between 0-20ms which I assume is because of other windows task interfering the processes (Windows is not a Real Time OS).
Therefore I was wondering if there is a way to achieve consistent <= 1ms response times or there is any alternative solution.

I think what you want is not possible on a normal Windows OS. Windows is not a real-time OS and it does not have the deterministic behaviour you require for your application. It is true that Windows uses a priority scheduler (in round-robin fashion way), but you do not have control of the priorities of all other tasks. Furthermore, the scheduler is starvation free, so the priorities / task interrups will not always be honored in the given time / priority.