LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

average N-sample acquisition

Hi

 

I would like to collect N-samples of data (for example 10) and average those values and then place the averaged value in a graph as well as dumped to a file.  What is the best way to do this that maintains a fast sampling rate?

 

Thanks!!

0 Kudos
Message 1 of 5
(5,305 Views)

1.  Acquire 10 samples.

2.  Pass data into a queue.  Have parallel while loop dequeue.  This is producer/consumer architecture.

3.  In consumer loop, dequeue and write to file.

 

What kind of sampling rate are you looking for?

0 Kudos
Message 2 of 5
(5,303 Views)
I would like 10 samples/second for a 15 channels.  Do you have any sample codes?  Thank you!!
0 Kudos
Message 3 of 5
(5,284 Views)

So write to a file at once/second then?  That isn't too bad.  I don't have any sample code.  But it is not that complicated.

 

What part are you stuck on?  It sounds like you may never have used LabVIEW before.  I would recommend you start here. How to Learn LV

0 Kudos
Message 4 of 5
(5,280 Views)

Here are a couple of links you may find useful.

 

The first is an example of how to acquire and write to a TDMS file using producer consumer

 

The second is an example on how to acquire, graph and average data

 

You can take parts from both examples and combine them to suit your requirements. 

 

Hope this helps!

Tejinder Gill
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 5 of 5
(5,238 Views)