Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Why doesn't my interrupt routine run when it should?

I'm performing continuous buffered analog input using a DAQ occurrence 1 (after every N scans) to read the buffer. I also use every other occurrence to time one reading from the DAQ-STC counter. Both the array from the analog buffer and the counter reading are then queued for reading in my display routine. If the user doesn't interact with the display window, the data acquisition and display routines work fine. However, if there is activity (movement of the display window or scale changes on the displayed graph, e.g.) the Wait on DAQ Occurrence vi in the data acquisition routine does not wake up and run in time to read the counter when it must (at the end of every other N analog readings) resulting in bad counter da
ta. I have tried running the data acquisition routine and the display routine in the same and different threads and I have tried giving the highest priority to the data acquisition routine, but the problem persists. This is not a matter of microseconds. The counter is supposed to be read every 40 milliseconds and can be read properly for about 20 milliseconds. Is there any way to guarantee a Wait on DAQ occurrence handler will wake up and run within this time frame? I cannot use buffered counter measurements because there are glitches in the gate signal that would cause erroneous readings to be taken.
0 Kudos
Message 1 of 3
(2,520 Views)
P.S. on this question from the asker...
The PC is a 500 MHz Pentium III running Windows 2000
0 Kudos
Message 2 of 3
(2,520 Views)
For this reason, DAQ Events can be unreliable compared to buffered acquisitions. Simply put, if another DAQ event is flagged before your program finishes handling the previous event, you might miss the next event. It sounds like you are close to the threshold as user interface interaction causes just enough of a delay. You may have too much code in your event handler.

Russell
0 Kudos
Message 3 of 3
(2,520 Views)