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.