LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to display a floating window for graph.

Hello Gents,

 

My user interface displays a graph on one tab and various user controls on other tabs.  In order to maximize my graph size on the screen and see the output as I adjust the user controls I need to display the graph in a separate window that I can move about and resize.

 

I have tried displaying the graph with a sub-vi that is enabled with the "show front panel when called" option under "sub-vi node set up" on the block diagram.  This works but since the sub-vi is called in a loop as new data is passed to it I cannot minimize it as the next call brings it back up.  I have tried "open front panel when loaded" but this will not open when I load or run the main calling vi, don't know why.

 

 

What would be my best course to plot from this point?

 

Thanks,

HLB

0 Kudos
Message 1 of 8
(5,046 Views)

right click on the subVI in the block diagram and experiment with the options under "SubVI Node Setup..." and "Call Setup..."

 

I believe that what you want is show front panel when called and NOT close if originally closed, but it might also work to use show front panel when loaded and load and retain on first call.  I think your problem is that you're trying to use both, and/or the "close if initially closed" is closing the FP every time the subVI finishes execution.

 

possibly a more elegant solution would be to make the graph a standalone subVI and put the loop inside it, then pass the update data in by references or some other type of communication.

Message Edited by blawson on 09-29-2009 09:02 PM
-Barrett
CLD
0 Kudos
Message 2 of 8
(5,033 Views)

HI,

I think calling subVI in loop is not a good option, open the VI once (show front panel when called is OK) and for updating the graph use global variable or something (subVI contains while loop and reading the global variable and updating graph)

Hope this helps.

Regards

Santosh

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

Thanks for the help.  I will have to experiment more with the "SubVI Node Setup..." and "Call Setup..." options, but they seem to be in order.

 

For now I have called the VI once with "Show Front Panel When Called" checked and transfer the data via functional global variable.  I am good with that at this point.

 

HLB

0 Kudos
Message 4 of 8
(4,980 Views)

You can also code everything to your desire with VI Server. Open a reference to the SubVI and use the OpenFP and CloseFP methods.

 

Felix

0 Kudos
Message 5 of 8
(4,977 Views)

Pssstt...

 

Don't tell anyone but in this thread I posted a zip that demonstrates a technique for "un-docking" a region of a GUI. I had been saving that code as Nugget Fodder but I'm tired of sitting on that idea. Here is a preview

 

PG2_Undocked.png

 

The customer for whom I originally developed that code really liked it.

 

Have fun!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 8
(4,971 Views)
very nifty, Ben!  I'm in the middle of a project where it could be useful and I may have to try it.  thanks!
-Barrett
CLD
0 Kudos
Message 7 of 8
(4,915 Views)

Thanks blawson.

 

If anyone tweaks that example to make it easier to use/understand, please feel free to post up your revisions. I have toyed with turning that into either an XControl and/or develop a LVOOP version but have never gotten around to that work.

 

Have fun!

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 8
(4,894 Views)