To download NI software, including the products shown below, visit ni.com/downloads.
Overview
Coding that exemplifies how to increment the graph area by moving the cursors.
Description
This example allows you to drag the cursor in the graph with the mouse to expand the X and Y scale of the graph. The position of the cursor is read via property nodes which contains the cursor position and allows the VI to read both the X position and the Y position of the cursor. The X and Y scale are then modified by using the range properties to set the maximum value for the X and Y scale. These properties are continuously monitored inside a while loop. The case structures monitor the properties within the while loop and restore the graph to its original size as needed.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
1. Configure the following front panel controls:
* frequency
* amplitude
* offset
* phase
* sampling info
2. Run the VI
3. When you drag the yellow cursor around, the graph will resize as needed
Additional Information or References
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.