06-08-2011 01:48 AM
Device: USB-6009
DAQmx 9.3
ANSI C API
I've got two threads running simultaneously. One is polling a digital port every 5ms and the other one is writing to an analog output every 10ms.
Most of the time it works like a charm, but occasionally (~ 1 in 20000 calls) the read/write functions in both threads block for up to half a second for no apparent reason.
The programm is running on a dualcore system with Windows XP SP2. CPU utilization is only at 10% - 20% each.
Any ideas?
Regards,
Marco H.
06-08-2011 11:57 AM
Sounds like your OS has decided it's got something more important to do once in a while. Hard to guess which specific thing.
I'd start by disconnecting my network cable and temporarily disabling the anti-virus. Look for other background processes you can stop or disable.
Other than that, such variability is exactly what the RT (real time) guys are talking about when they bring up the non-determinism of popular OS'es like Windows. You can often get by, but you can never really know for sure.
-Kevin P