LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

-10920 Error AGAIN!!!!!

Hi,

This problem has plagued me for a long time and I could really do with a definitive answer.

I'm using GPCTR functions for Buffered Event Counting, and at the same time doing an AI DAQ. Both functions are running in separate threads.

The problem is I fairly randomly, and at even moderate pulse frequencies, get -10920 errors, and the frequency of these seem to get worse the more threads I have running. I am not using any synchronous NI-DAQ functions and am testing for data availability with GPCTR_Watch() and DB_HalfReady() (trusting to memory on function names so could be wrong) then reading the data. I am putting the threads to sleep for 0.1s between each call to the data ready check functions. The AI DAQ is slow, ~1kHz.

Trying to simp
lify the problem down, I have made the following assumption:

-10920 only occurs when NI-DAQ cannot read the DAQ-STC save register before it is overwritten by the card - therefore there is nothing I can do in my code to cause this error UNLESS my calls into the NI-DAQ DLL (which I know is non-reentrant v6.9.2) are also blocking the interrupt service routine if I am in the DLL when the interrupt comes in.

If calls into the DLL can block the ISR then that would explain the problem, particularly if a suspended thread is the one that is in the DLL when the interrupt comes in.

Could someone confirm if I am right or wrong on this. Also, if I am right, is there anything I can do to prevent the problem, e.g. to change the process and/or thread priorities while calling NI-DAQ functions.

Any help much appreciated.

Regards

Jamie Fraser
0 Kudos
Message 1 of 2
(3,053 Views)
I'm not sure how definitive this is, but I found a KnowledgeBase entry on our website that discusses possible remedies for the -10920 error. I hope this helps.

Why Do I Get Error -10920 When Doing Buffered Counter Operations?
http://digital.ni.com/public.nsf/websearch/8FB9091CB9BB452B8525642000554799?OpenDocument
0 Kudos
Message 2 of 2
(3,053 Views)