Example Code

Taking An Average Of Sampled Data Over A Period After A Button Is Pressed

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
To demonstrate how to calculate the average of 5 seconds of data stream.

Description:
This is an example showing how to use a button to collect some data over a period of time and then displaying the average result. The button is disabled while data is being collected to prevent accidentally shutting off data collection prematurely.

Steps to implement or execute code
To implement this example:

  1. Run the VI
  2. Click "Collect Data" to start averaging



Requirements
Software
LabVIEW 2012 or compatible

Hardware
-

2017-11-01_13-34-53.jpg2017-11-01_13-35-24.jpg

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

Product Support Engineer
National Instruments

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