DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create Rolling Average, STD Dev, Max, & Min

Hello Everyone,


First, thank you for visiting my question.

 

As the title states, I am trying to create a 30s rolling statistical analysis of some time data. I have found descriptive statistic tool in DIAdem, but I can't quite figure out how to create a rolling average and turn those results into a new channel. All help/advice much appreciated!

 

P.S. I am a DIAdem/VBS newbie.

 

-BB

0 Kudos
Message 1 of 4
(3,110 Views)

Hi,

 

I think this is what you need.

 

http://digital.ni.com/public.nsf/allkb/5528D997030AE88C86257451006CEC9C

 

http://zone.ni.com/reference/en-XX/help/370858M-01/dlgmaths/calc_graphs_dlg/dlgchnsmooth_dialog/

 

Just make sure the Store result in original channel checkbox is disabled to get the data into a new channel.

 

There's additional info here.

 

http://zone.ni.com/reference/en-XX/help/370858M-01/genmaths/genmaths/calc_smoothfunctions/

 

Hope it helps! Let us know if you have further questions about it.

 

Regards,

Camilo V.
National Instruments
0 Kudos
Message 2 of 4
(3,051 Views)

Hello,

I have the same need to calculate rolling statistics on data channels.  I currently use loops with in a script and the ChnStatisticsChannelCalc command.  I calculate the statistics for one interval, save those to a channel, calculate the statistics for another interval, append that value to the channel.... It is one of the areas that takes the most time in my script.   The smoothing functions are not what i want.  What I need is closer to the results obtained when using the DataFileLoadRed command to open a file and calculate min, max, mean at specific intervals.   Is there another command that duplicates DataFileLoadRed calculation without having opening the file again?  Also, there is an rms calculation with the DataFileLoadRed command.  The Envelope function is close as well, and I can adjust the settings to get what I need for min and max... just not mean or rms. 

 

Is there another command I'm overlooking that does rolling statistical calculations? 

 

Thanks in advance,

 

Chris

0 Kudos
Message 3 of 4
(1,933 Views)

Hi Chris,

 

The "Reducing Classification" function in the Statistics palette is a lot like the reduced loading you describe, though it only offers average, minimum and maximum, not standard deviation.

 

If you really like the reduced loading options, is there a strong reason not to call that to generate the rolling statistics you're after?  If the data file is a binary file, you won't lose much speed going back to disk for the values.

 

Brad Turpin

Principal Technical Support Engineer

National Instruments

0 Kudos
Message 4 of 4
(1,841 Views)