LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ event and occurrence 1 on DAQCard 6024E

Dear friends,

I'm trying to use DAQ Event 1 to obtain 1000 samles for every occurring event continuously. An external scan clock 10KHz is used. The problem is I obtain 2000 samples some time. That means DAQ event is lost. I attach the LV code and need your help to sort it out.

Thank you in advance,

Cheers,

Charlie
0 Kudos
Message 1 of 2
(2,440 Views)
Charlie,

You are correct; the DAQ Event is being lost. The DAQ Events are continually being generated and the Wait on Occurrence is being polled inside the While loop. The case structure is always waiting for FALSE to come from the Wait on Cccurence, however, if the occurence occurs while the execution is inside the Case Structure with the AI Reads, the Wait on Occurence will not see the occurence and it will be lost.

To avoid this, you need to speed up the execution inside the case structure so it can read the data and get back to waiting for an occurence. I recommend that you remove the first AI Read that checks to see how many samples are in the backlog. Just use one AI read and always read a finite amount of data like 1280 samples. The number must be div
isible by 32 or you will leave scans in the backlog. This will ensure that you never miss an occurence and you will be sure of the amount of data you read each time.
0 Kudos
Message 2 of 2
(2,440 Views)