LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change the scale of a strip chart during runtime

hello,

 

I am looking to change the Range of my Y-scale limits based on values entered by the user. If I use autoscale the range is preset and hence the limits change randomly depending on the value on the graph...if I use properties---> Scale ----> and then set the value, the scale never changes to the limits entered. How can I get what I need ?

 

thanks!

0 Kudos
Message 1 of 8
(3,779 Views)

Did you forget to turn autoscaling OFF before you set the scale range programatically??? 

 

EDIT:  You can also use a property node to turn autoscaling on and off.  It's the Scale Fit property in the sub-menus of X Scale and Y Scale.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 2 of 8
(3,769 Views)

If you programmatically set the YScale.Maximum value you also need to turn off autoscaling with the Scale Fit property: http://digital.ni.com/public.nsf/allkb/578F3AE9DD5FA9D986256BE9006BA819

0 Kudos
Message 3 of 8
(3,766 Views)

Even if I turn off autoscale, how would I alter the range of the scale based on the data entered by the user ?

0 Kudos
Message 4 of 8
(3,759 Views)

I need to have the scale change based on values entered. For example, the user enters a= 5, b= 3(during runtime). I need the waveform chart to range from 5 to 3 on the Y-axis. Using scale fit only turns off autoscale but doesn't set the graph to the range specified by the user.

0 Kudos
Message 5 of 8
(3,758 Views)

You'd set the scale using the appropriate property nodes:

 

0 Kudos
Message 6 of 8
(3,754 Views)

Thanks a lot! That helped!!

0 Kudos
Message 7 of 8
(3,749 Views)

You do realize that the charts and graphs have built-in functionality for this right?  Your user can simply right-click in various places of your chart and get a pop-ups that control its behavior.  You can turn off autoscaling and then set the range to new values by double clicking the top and bottom scale numbers and change them anytime you want without using property nodes. 

 

Property nodes are usually used when you want to programatically control the displays and NOT let the user change things.  Of course you can always combine the display's built-in functionality with your own controls and property nodes to make a much fancier and useful graph or chart if you desire.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 8 of 8
(3,738 Views)