LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire data until a specified number of triggers occur?

I am using an DAQCard-AI-16E-4 to acquire the number of counts on GPCTR0_Source and GPCTR1_Source, reset the counts on GPCTR1_Source after each trigger, and also acquire data from ACH0 and ACH1, and acquire the data until a user specified number of triggers occur. The trigger is inputted into PFI0. I want all the data output to a spreadsheet once all the data has been collected, ready for the user to review.
0 Kudos
Message 1 of 6
(2,978 Views)
I have been thinking about this one. How are you acquiring your ACH0 and 1 data? Is it a continuous scan (continuously streaming to memory, and being read out in a loop with the AI Read VI)?

This will make a difference as to how to stop the acquisition....

If it is continuous, the E series manual states that there is no "skip trigger" available. That means we'd have to get a little tricky.

Therefore, is the trigger an analog trigger or a digital trigger? (Is the trigger some threshold voltage, or just when a signal goes high or low?)

Maybe we can figure out something from that.

Mark
0 Kudos
Message 2 of 6
(2,978 Views)
I was attempting to use a digital trigger, but I am going to attempt using an analog trigger. The trigger is a 0 VDC to 5 VDC trigger.
0 Kudos
Message 3 of 6
(2,978 Views)
I have a few questions. First, do you want the acquisition to stop EXACTLY when a number of triggers has been reached, or can you just stop the acquisition in software when the counter reports that it has had the correct number of triggers on its source?

Second, are you acquiring data from ACH0 and ACH1 as soon as you start the vi, and counting the number of edges on the counter sources?

Mark
0 Kudos
Message 4 of 6
(2,978 Views)
I want to begin as soon as the first trigger occurs and to stop exactly when the number of triggers has been reached.

The data is being acquired as soon as the user clicks a start button on the user interface, and I am acquiring data from ACH0 and ACH1, and counting the number of edges on both counter sources.
0 Kudos
Message 5 of 6
(2,978 Views)
Is it good enough to just stop the acquisition with AI Clear VI when the counter has reached the specified number of triggers?
0 Kudos
Message 6 of 6
(2,978 Views)