08-11-2015 05:13 PM
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?
08-11-2015 06:35 PM
@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.
08-12-2015 07:14 AM
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.