Example Code

Count and Average Peak Values with Adjustable Threshold

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.

    Hardware

  • Data Acquisition (DAQ)

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview

This Example code takes a finite amount of data at an adjustable rate and duration.

 

Description

This Example code takes a finite amount of data at an adjustable rate and duration. It then processes the data to find the Location and Amplitude of each peak and an average value for all of the peaks. The threshold for what is a "peak" is also adjustable through the front panel controls.

 

 

Requirements

Software

  • LabVIEW 2012 or compatible
  • NI-DAQmx 9.5.5 or compatible

Hardware

  • NI Multifunction DAQ Device

 

Steps to Implement or Execute Code

  1. Configure the parameter for the right channel and device
  2. Connect your hardware appropriately
  3. Run the VI

 

Additional Information or References

 PeakCountAverage_FP.PNG

PeakCountAverage.PNG

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

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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