Hello,
although many posts are present dealing with "100% CPU usage", my problem is slightly different from those already posted.
I am experiencing a strange behaviour programming a PCI-6602 on an
Intel P4, 3 GHz mother board with an Intel chipset and WinXP
professional SP2, under LabWindows CVI 7.1.1 (3.1.4) using NI-DAQmx
7.4. The application is using all the onboard resources, i.e. all the
available counters, but implementing all the suggested programming
techniques (i.e. an acquisition loop with a delay inside rather than a
timer-based or an as-fast-as-possible loop method, alternating the data
transfer mechanism between DMA and interrupts depending on the mother
board resources, etc.).
What makes my problem different from the other already posted are the following factors:
1) the CPU usage rises up to 100% randomly. Some application executions
cause this behaviour, sometimes not. Starting the acquisition by a UIR
toggle sometimes causes the 100% cpu usage, sometimes not.
2) looking at the task manager reports, it appears that it is not my
application requesting all the CPU resources, but another process,
namely "winlogon.exe". Apparently this process has nothing to do with
the application at all. This process, however, requests the 100% CPU
only when my application executes, as if it were triggered by the
application itself.
Can anybody help me understanding what it is happening ?
Thanks in advance,
sincerely
Marco Sartore
P.S.
Here is a snippet of my data acquisition code:
do {
ProcessSystemEvents();
if (module_A_connected)
{
DAQmxErrChk(DAQmxReadCounterU32 (TaskCtr0MultiSamplesAcquire, -1, 10.0,
Ctr0TemporaryBuffer, (uInt32) BUFSIZE, &Ctr0ActualAcquiredSamples,
NULL));
if (Ctr0ActualAcquiredSamples > 0)
{
// store and plot data
}
}
// repeat for other 3 modules (i.e. counters)
}
Delay(loopDelay);
}
while (!acquisition_stopped);