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
Highlighted

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
(3,518 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?


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2 of 5
(3,511 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
(3,488 Views)
Solution
Accepted by topic author 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.


LabVIEW Champion. It all comes together in GCentral GCentral
Message 4 of 5
(3,484 Views)

Thanks for your help!!

0 Kudos
Message 5 of 5
(3,467 Views)