LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Text input of subvi in the principal vi

Solved!
Go to solution
Hello dear all,
I have a main vi and a sub vi.
In the sub vi the user must enter Login 1 and Login 2.
 
And I want when he clicks on save that the value of login 1 (what entered him in the box Login 1) can be displayed on my main Vi.
Is this possible please?
How to do it please?
Thanks in advance
 
0 Kudos
Message 1 of 9
(1,159 Views)
Solution
Accepted by topic author Steph_2

Hello,

 

why do you use VI Server to call the SubVI?

This is much easier than you thought. Just put the subVI on you block diagram. In the SubVI connect the Login1 and Login2 indicators to the connector pane - then their values will be accessible in the "VI principal". No need to store them in a file.

You must configure the SubVI to behave as a Dialog Window: press Ctrl+i , select "Window Appearance" in the Categry Drop-Down-Menu and select "Dialog" (when you then click on Customize and select Window Behaviour:Default, the subVI remains debuggable).

 

If all of this is new to you, please consider taking the learning ressources on top of the forum posts.

 

Greets, Dave
0 Kudos
Message 2 of 9
(1,139 Views)
Solution
Accepted by topic author Steph_2

Instead of using the Run VI method, why don't you just place the SubVI as a normal subVI with string indicator output data back to the calling VI?

You can use asynchronous calls if you want to use the VI Server method to call different subVI. See examples at <LabVIEW>\examples\Application Control\VI Server\Asynchronous Call By Reference

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 3 of 9
(1,128 Views)

Hello daveTW
I thank you for your answer
I used VI server because I thought it would be easier for me. I don't master the other method with the outputs and everything.
I'm going to see on the forum as you indicated.
Thanks

0 Kudos
Message 4 of 9
(1,109 Views)

Hello @ZYOng,
I would like to use the method you said there but I didn't know this method, I will try to do what you said to see if I can do it.
I would look at the examples you suggested too
Thanks

0 Kudos
Message 5 of 9
(1,103 Views)

Here is an example of how you can use subVI with minimal effort. You can resize the front panel window such that the indicators are hidden.

Control When the Front Panel of a SubVI Opens in LabVIEW

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 6 of 9
(1,082 Views)

Hello ZYOng

I tried to do like you by adapting it to what I want but I don't understand why when I click on start sub vi doesn't open the Vi.
It is probably something stupid of me
Thanks you
0 Kudos
Message 7 of 9
(966 Views)

You need to check the Show Front Panel When Called in VI Properties.

I posted the KB Control When the Front Panel of a SubVI Opens in LabVIEW in my last comment. Make sure you read it.

-------------------------------------------------------
Control Lead | Intelline Inc
Message 8 of 9
(958 Views)

Hi dear ZYOng,
Yes ts right thank you very much.

I come back to you again pmease.
I can't stop the sub-vi I want after entering the login the sub-vi closes by clicking on the save.
Can you please show me?
 
I confess I'm a bit lost on this.
Thanks in advance
0 Kudos
Message 9 of 9
(927 Views)