Showing results for 
Search instead for 
Did you mean: 

acquire a signal and put the value rms into an array every second

Go to solution

Hello everybody,


sorry but I am knew in the LabView world, and I am getting crazy because I can't figure out how to do a simple thing (or what it tends to be in my mind).


As the Object said,
 my wish is to acquire a signal (a digital one thanks to the DAQmx) in continuous (that is ok for that part), get the RMS (or the mean) value of that acquired signal (thanks to Amplitude and Measurement Levels for example), and put the value into an Array (1-D); and this, every second.


In one sentance: acquire a signal, get the mean value, put it in an array, and restart every second. At the end, for exemple, running the program during 1 minutes gives me 60 value into the array.


Does someone can help me ?


Thank you in advance.



0 Kudos
Message 1 of 6

It sounds like you already know how to get the data and do the analysis.  So are you just stuck with how to add data to an array?  Look in Shift Registers and the Build Array function.


If you want more specific help, then you should supply what code you have and explain where you are stuck.

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 2 of 6

Hi, thanks for your quick answer.


But I am still stuck with the array...


In fact, what I want is to get every second the mean value from Amplitude and Level Measurement, and put the all value into a spreedsheet such as an excel document.


Here is a screenshot of what I did. (attached)


What else can I do to get my spreedsheet?



0 Kudos
Message 3 of 6
Accepted by viviogs

First of all, I am not sure that you are guaranteed exactly one second of measurement using that technique.  If precise timing is important, I think you need a timed loop.


That said, if the only problem you have is how to write that indexed array to a spreadsheet, you just need to use "Write to Spreadsheet File."  See here.

Message 4 of 6



thanks again.


I ma not sur to do everything well, but finally with your help, I succeded to get a spreadsheet document file with the value, by also changing the "tunnel mode" to concatenating.


I put the final schematic to help anyoe who would like to do the same.


Thanks again.



0 Kudos
Message 5 of 6
A timed loop is silly on Windows. You have the most precession by using a normal loop and setting the number of samples. Converting the evil dynamic data to an array is also silly. The mean is a scalar.
0 Kudos
Message 6 of 6