LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get current data from a separate VI running a continuous acquisition loop?

Sometimes during a DAQ continuous analog input loop there is a slight backlog of data; I can monitor this backlog with a DAQmx Property Node using its "Available Samples Per Channel" property.

 

In a separate loop I'd like to get just one sample (or small array) of that continuous data but I want to make sure it's not data that has been sampled before I ask for it. What's the best way to do this?

0 Kudos
Message 1 of 3
(2,699 Views)

@bmihura wrote:

Sometimes during a DAQ continuous analog input loop there is a slight backlog of data; I can monitor this backlog with a DAQmx Property Node using its "Available Samples Per Channel" property.

 

In a separate loop I'd like to get just one sample (or small array) of that continuous data but I want to make sure it's not data that has been sampled before I ask for it. What's the best way to do this?


Simplest approach to me sounds like shuting the data to a queue that you can reference in your other loop. If there is data available in the queue then you can de-queue and process.

 

If you create and destroy the queue in your DAQ loop then you can use the invalid reference (error from Dequeue) to shut-down your other loop as well.

0 Kudos
Message 2 of 3
(2,660 Views)

bmihura wrote:

In a separate loop I'd like to get just one sample (or small array) of that continuous data but I want to make sure it's not data that has been sampled before I ask for it. What's the best way to do this?


Sounds like a Notifier is what you really want.  A Notifier only holds a single element and you can set up the Wait On Notification to "ignore previous notifications" so that it will wait for another sample.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,522 Views)