Averaging Data Set


Recommended Posts



I want to average some data for a calibration.


I'm logging input1 and I want to find the average of input1 for 10 seconds so I can then subtract the average from input1 to log the variation about the average.


I know how to log average of samples for a channel but that happens constantly. I want to press button which will then log the data for 10 seconds from that point and then find the average of that time period so I can assign it to a variable to use in equations.



Link to comment
Share on other sites

OK, create a sequence to do this:



global theAverage = mean(myChannel[systime(), systime()-10])


Then run the sequence from the button press by selecting a quick sequence action and putting:




Replace theAverage, myChannel and mySequence with your own names.


Note this assumes that you are continuously acquiring data on myChannel.

Link to comment
Share on other sites

  • 2 weeks later...


This topic is now archived and is closed to further replies.