Example Code

Programmatically Find and Place Cursor on Peak Value

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

Coding that exemplifies how to create and modify cursors.

 

Description

This VI is simple, but can be easily expanded. it allows you to take data and find the peak values of the data, and then place a cursor on the graph where the peak value is located. We can also modify the color of the cursor, if we would like to display the value, and the amount of cursors desired.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI
2. Press the Generate Data button to generate a waveform with random data
3. Select the amount of cursors, if the values being displayed is desired and the color of them.
4. Use the Stop button to finish execution.

 

Additional Information or References

Capture.PNG

National Instruments
Applications Engineer

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

Comments
bghy
Member
Member
on

please add 8.x version VI

GoCougs
NI Employee (retired)
on

done

National Instruments
Applications Engineer