Moving Average: Interval Compute (Low Speed) | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver


Moving Average: Interval Compute (Low Speed)

This script reads analog inputs and computes the average value of each read channel on a given interval. This is useful for situations where analog inputs want to be read at high data rates. Keep in mind that while a script is computing the average value analog input values aren't being read. In time-critical applications where this is important to characterize and understand, I/O lines can be toggled and monitored with an oscilloscope to determine if the script is reading data fast enough and with low enough jitter.

This script can be customized by editing the sampling interval, number of samples to average, user-ram update rate, and channel register constants.

This example can be found in our Kipling git repository: