Example Code

Programmatically Change X and Y Ranges of a Waveform Graph 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

Download All

Overview

This example demonstrates some Graph properties and techniques for syncing settings between two graphs.

 

Description

This example VI shows how a couple of waveform graphs can interact with each other as well as take user input for the axis ranges. I have my two graphs accepting the same Y-Axis range but you could have two separate ranges with two separate property nodes. The way I had the two X-Axis interact with each other was to use the iteration terminal as a basis for what the maximum would be. You can tell by the screenshot that the chosen maximum will be multiplied by 0 (iterations start at 0) and make that the minimum value while it just adds that to the maximum. This can be manipulated to suit your exact needs on the range but this is just a simple example. Enjoy!!

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Download and run the VI.
  2. Move the pointers on Y-Axis Scale Range and X-Axis Maximum For First Graph slides, observe the X and Y ranges of the graphs.

 

Additional Information or References

 

Front Panel

1.PNG

 

VI Snippet

2.png

 

3.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
xgatc
Member
Member
on

that is what I am looking for.  many thanks

xg

mubashir_tuf
Member
Member
on

I dont know why this program acquire data for 0.1 second only... i tried to figure out but failed..

it is not taking data continuously.?