07-19-2010 08:28 AM
Hello,
I successfully developed a test bench control program containing signal generation and monitoring, manual control, data recording, displaying signals and it was all on one front panel, separated in different tabs. Maintainability was bad.
Now I want to modify the program:
All the above mentioned functions should be separated in different VIs. One VI for signal generation, one VI for displaying data, etc. and one main VI, where I can select which sub VI I want to use (and to see). In other words, I open the main VI (Hauptprogramm) and start it, and then if I want to control the test bench manually then I activate the "manual control VI"-check box and the manual control VI appears.
Problem:
In the sub-VI properties I can select "Show front panel when called". That is what I want, but the problem is, that it is shown everytime when it is called and all my VIs start flickering and the execution slows down. If I deselect that option, the VIs do not open automatically – the user has to open them manually, which is not desirable.
I need a "Open Sub VI front panel when called but only once and then keep it open or something like that"-option. How can I do that?
What do you think about my whole idea? I am still a beginner and I a little afraid that I make it too complicate.
Attached you find the VIs
07-19-2010 08:46 AM
For the instance you want to show, right-click and choose Sub-VI Node set-up to find the setting you want.
Ben
07-19-2010 08:56 AM - edited 07-19-2010 08:58 AM
Hey there Johanneshoer,
I'm afraid I can't give you a VI example since I'm working in Labview 8 and newer, but I can tell you that your plan is feasible.
What you'll want to do is use a Static VI Reference to get the reference to your "display data" VI, then wire that reference to Invoke Nodes to open and close the front panel when needed. In this case, probably before and after your while loop, respectively.
Alternatively you can try the "Show front panel when loaded" option, to see if that works for you.
07-19-2010 09:11 AM - edited 07-19-2010 09:14 AM
Thanks for the help.
I selected "Open front panel when loaded" in the SubVI Node setup but it does not work 😞
The I selected "Open front panel when loaded" AND "Show front panel when called" and then it functions when I select ONE SubVI in the main VI, but as soon as I select another SubVI they start flickering and performance goes down and CPU load climbs to 100%...
07-19-2010 09:16 AM
Have you tried using the Invoke Nodes?
Open Front Panel When Loaded will show the VI's front panel whenever it first enters into labview memory - this means if you change it to that setting after having already tested it, it won't open, because it's already loaded. You'll need to save, close and reopen your VI in order for it to show the front panel - because reopening the VI loads the subVI.
07-19-2010 09:21 AM
@logical2u: I will try that...