From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zoom in or out of the graph while VI is running

Solved!
Go to solution

Hi All,

 

Currently I have a popup subVI that contains multiple plots of collected data for the user to view.  When the user clicks the "Stop" button on the subVI, this subVI will close.  So I have the plotting section of the program in a while loop.  I believe this is the reason why I was not able to use the graph palette to zoom in and zoom out right?  Should I just leave he plotting section out of the while loop then?

 

Thank you,

 

Lynniz

0 Kudos
Message 1 of 5
(6,316 Views)

Whay can't you use the graph palette to zoom? What exactly happens if you try?

 

All I can thing of is that you maybe also should make sure that the axes are not set to autoscale, immediately undoing the zoom with each graph update.

 

If that's not it, please attach a simplified version of your VI for demonstration of the problem. What is your LabVIEW version?

0 Kudos
Message 2 of 5
(6,309 Views)

Thanks for the reply. I have tried your suggestion by unselect the auto-scale option. It worked, but if I re-run the subVI again, it does not show the full plot anymore, just the previously zoomed section. Is there anyway to auto-scale the first time, then allow the operator to zoom in/out? I tried to set the scale option to 1, which is "auto-scale once now", but it didn't work either. I have attached a quick example that I put together for you to try. Thanks again, Lynniz

0 Kudos
Message 3 of 5
(6,286 Views)
Solution
Accepted by Lynniz

Place the property node inside a case structure and enable it when the iteration terminal is "1". (not zero!)

 

And please place a small wait inside your loop, there is no reason it should spin that fast. (Since the data never changes in your example, the entire graph terminal and inner loops belong outside the main while loop. However, I assume that your real application is different ;))

 

NOTE: you could also use the "first run?" primitive or enable it when [i]=0, but in this case you would need a small sequence structure to ensure it happens after ther graph terminal is written for the first time.

 

Also note that xy graphs take complex data, simplifying the wiring and data structures.

Message 4 of 5
(6,282 Views)

Thanks for your help!!

0 Kudos
Message 5 of 5
(6,265 Views)