09-29-2009 05:32 PM
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
09-29-2009 09:01 PM - edited 09-29-2009 09:02 PM
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.
09-30-2009 01:32 AM
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
10-02-2009 02:39 PM
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
10-02-2009 02:42 PM
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
10-02-2009 03:00 PM
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
The customer for whom I originally developed that code really liked it.
Have fun!
Ben
10-04-2009 11:18 PM
10-05-2009 07:26 AM
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