Example Code

Averaging Data with Event Structures

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 do data averaging using event structure

Description:
This code represents collection of data initiated by user-input. Once the user indicates that condition 1 has happened, The event structure for condition 1 generates 6 sets of 100 random values (this represents data generated by 6 sensors). As the data is generated, there is a running average that is taken and upon completion, the average for the 6 sensors is output into an array. Once the user initiates a second condition, the data is generated, averaged and put into a matrix. Upon conclusion of the program, the averages for the two conditions is put into one matrix.

Instructions:
To implement this example:

  1. Run VI

To execute this example:

  1. Install the required software.
  2. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible

Hardware
-

2017-11-01_20-31-13.jpg2017-11-01_20-31-01.jpg

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

DAQ Product Marketing Engineer
National Instruments

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