LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to slow a continuous DAQ acquiered signal ?

Hello

My DAQ assistant acquiere a value of a sensor at a very high speend (100 Hz).

 

I want to keep that speed because it's displayed in a graph and I want the graph to have a good live resolution. (But yeah I know you can just slow it down in the DAQ assistant parameters)

 

But, the signal is also linked to valves and they open/close too frequently.

 

So my goal is : I have a value that comes at a very high rate (100 numbers by second) and I want to return maybe 1 number every second.

 

Is there a way to do that ? Like a loop structure that returns the value every second ?

 

I hope this is clear, thanks if someone can help

0 Kudos
Message 1 of 7
(2,181 Views)

Without code attached, we can't see if you are getting 100 individual values per one per 1/100th second,  an array of 100 values once per second, or perhaps groups of 10 values every 1/10 of a second.

 

So depending on the actual acquisition, the implementation may vary.  But the basic idea would be to average the numbers together to get a single number.

0 Kudos
Message 2 of 7
(2,170 Views)

Thanks for your answer,

 

I can join a .vi if you want but it wont work in your Labview because you don't have the hardware.

But I jointed it. This is just the DAQ assistant. I also did a screenshot.

 

And how in Labview do you return a mean of every 50 values ?

Sounds complicated, you build an array, then every x values the mean of the array is returned etc ? I have no idea how to do it sorry, any other topic, tutorial, examples .vi ?d4bf0e156d.jpg

0 Kudos
Message 3 of 7
(2,086 Views)

Tutorial for LabVIEW: http://www.ni.com/pdf/manuals/373427j.pdf 

Tutorial for Data Acquisition: https://www.ni.com/docs/en-US/bundle/320997e/resource/320997e.pdf

 

These both are basic tutorials. Just search online if you want to learn any specific topic in detail.

 

For calculating average, you can use math functions (sum of array and divide) along with array function (array size). Or you can directly use mean.vi function.

0 Kudos
Message 4 of 7
(2,081 Views)

This is not just a simple mean, this is means of a continous data acquisition.

 

Is there a function in Labview that does that ? returning the mean of the X last numbers continuously ?

 

thanks

0 Kudos
Message 5 of 7
(2,059 Views)

Snip.png

 

Posted this for something else, but the process is the same. This will continuously average data. You can reset it using a Q&R function.

 

mcduff

0 Kudos
Message 6 of 7
(2,053 Views)

@Oxbow88 wrote:

Thanks for your answer,

 

I can join a .vi if you want but it wont work in your Labview because you don't have the hardware.

But I jointed it. This is just the DAQ assistant. I also did a screenshot.

 

And how in Labview do you return a mean of every 50 values ?

Sounds complicated, you build an array, then every x values the mean of the array is returned etc ? I have no idea how to do it sorry, any other topic, tutorial, examples .vi ?


You don't' "join" or "jointed" a VI to a message.  You can "attach" it or "have attached" it.

 

You can turn the blue dynamic datatype wire into an array, then use mean to get the average.  Since you are grabbing 100 samples at a time, this will average 100.  If you want to average 50, then the easiest thing would be to modify the DAQ Assistant to return 50.

 

You can see it is a very simple addition to your current VI.

 

 

 

0 Kudos
Message 7 of 7
(2,004 Views)