To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example shows how to use cursors to select a portion of the graph to view closer.
Description:
Sometimes you may want to display a subset of a larger set of data. This example shows how to use cursors to select a portion of the graph to view closer. This portion can also be clicked and dragged to move along the larger graph.
This example uses the Event Structure and the Input Device VIs to determine when the mouse enters the Waveform Graph indicator and whether or not the Left Mouse button is clicked. When this happens, the cursors are moved alongside the cursor. In the Timeout case, the current cursor positions index the Sample array and display the subset in the 2nd graph indicator.
Requirements: LabVIEW 2012 (or compatible). Hardware: none.
Steps to Implement or Execute Code:
1. Run the VI.
2. Move cursors.
Additional Information or References:
An enum is used to easier identify which cursor's properties is being read/written from.
**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.