LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sub-VI should open automatically when called

 

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

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 1 of 6
(3,247 Views)

For the instance you want to show, right-click and choose Sub-VI Node set-up to find the setting you want.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 6
(3,230 Views)

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.

Message 3 of 6
(3,219 Views)

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%...

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 4 of 6
(3,203 Views)

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.

0 Kudos
Message 5 of 6
(3,195 Views)

@logical2u: I will try that...

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 6 of 6
(3,191 Views)