Example Code

Synchronizing Multiple Cursors on Multiple Graphs in 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 code allows the user to Synchronize different Cursors on different graphs.

 

Description:

A couple of signals (Sine and Sawtooth Waves) are loaded into the Waveform Graphs. There are a couple of loops working in parallel. First one enables Active Cursor, shows Active Cursor and shares the Cursor Index between the Waveform Graphs. The second one does have a Event Structure that handles following events:

Cursor Grab: Register when a user interacts with a graph cursor

Cursor R2 Value Change: Decrement the index of the selected cursor

Cursor L2 Value Change: Increment the index of the selected cursor

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI
  2. Set Enable the two Available Cursors
  3. Using Left and Right arrows the selected cursor moves through the signals in both Waveforms

 

Additional Information or References

3671.png

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

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

Comments
Todd S.
NI Employee (retired)
on

Thanks for posting, Corbot.  Do you mind renaming your attachment to include the LabVIEW version?  "_lvXX.vi" would be good enough.

Todd S.
LabVIEW Community Manager
National Instruments