DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Diadem script to compute the moving average of a channel

Solved!
Go to solution

Thanks Brad I have two follow up questions:

1. When we load multiple files and calculate the peaks for each file how do we save the peaks generated to the same excel file using below method:

dd.DataFileSaveSel(PeakFilePath + ".xlsx", "ExcelTdmExport", PeakGroup.Channels)

2. Could you please suggest a method to calculate the average( arithmetic mean) of a single channels like Speed, Power separately and store it in a new channel respectively?

0 Kudos
Message 11 of 12
(776 Views)

Hi josh,

 

I recommend that you create a result group with the channels/columns you want to export to Excel, then loop over all the data files you want to analyze, adding one or more row(s) from each data file to all the channels in the result group.  After all the data files have been analyzed, you can then export all of the rows you've added from the channels/columns in the result group to the Excel file, using the DataFileSaveSel() command and the ResultGroup.Channels collection as the selected output parameter.

 

For calculating the average of a channel, I prefer the old CCh() function.

 

Brad Turpin

Principal Technical Support Engineer

NI

Message 12 of 12
(765 Views)