08-22-2014 09:16 AM
Hello,
I acquired data which I stored in a TDMS file and I'd like to make some calculations such as find the mean of my data set.
I successfully read the TDMS file and linked it to a waveform graph, no problem on this part.
However I'm stuck when trying to understand how can I get access to the data other than just to print them on a graph.
How could I sum all the values to find the mean value ?
I'm using LabVIEW 2010.
Thank you.
Solved! Go to Solution.
08-22-2014 09:24 AM
Use the Mean.vi function under the probability and statistics. I'm guessing you are reading a waveform and may need to pull out the Y values using the Get Waveform Components function. Post some code if you are stuck.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-22-2014 09:59 AM
Well, thanks I made a big step. However the result returned is 0.00.
What am I missing ?
I've attached my code and a pic of the waveform.
08-22-2014 10:05 AM
@Hooovahh wrote:
Use the Mean.vi function under the probability and statistics. I'm guessing you are reading a waveform and may need to pull out the Y values using the Get Waveform Components function. Post some code if you are stuck.
No need to pull out the Y. There is a Waveform DC/RMS measurement VI that will do the job.
08-22-2014 10:07 AM
@Vinc_sp wrote:
Well, thanks I made a big step. However the result returned is 0.00.
Based on the data, that is perfectly reasonable. Try changing your display option for the indicator to Exponential or SI notation and you should see more digits of precision.
08-22-2014 10:19 AM
Thank to you too !
My 0.00 problem was solved actually I don't really know how. It was a matter of values after the decimal. I just created a new dbl numeric constant which I changed into an indicator.
I attach my code in case someone face the same problem.