Example Code

3 Methods of Averaging Data in Fixed Chunks Sizes using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This examples shows 3 ways of averaging data in 10 point chunks.

 
Description

This examples shows 3 ways of averaging data in 10 point chunks (i.e. 100 points would yield 10 points after averaging). The methods vary depending on how much data is collected at one time - 100, 10, 1 point(s) at a time.

Option 1: 100 points of data are read at a time and the data is averaged in chunks of 10.

                - Break data into groups of ten and average.

Option 2: 10 points of data are read at a time and the data is  averaged in chunks of 10.

                - Average data as it comes in.

Option 3: 1 point of data is read at a time and the data is  averaged in chunks of 10.

                - Accumulate 10 data points and then average.

 

Requirements

  • LabVIEW 2012 (or compatible)

 
Steps to Implement or Execute Code

1. Run VI
2. Looks at graphics created with differents averaging ways

 

Additional Information or References
VI Block Diagram

 Averaging example LV2012 NI verified.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Tanya Visser
National Instruments
LabVIEW Group Manager

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.