LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to minimize an already opened VI?

Solved!
Go to solution

Hi, is it possible to create a VI that minimizes another VI?

I need a solution for this https://forums.ni.com/t5/NI-TestStand/Run-Teststand-Operator-Interface-minimized/m-p/3819853  and I'm trying to think outside of the box.

 

Any Idea would be highly appreciated.

 

Regards.

0 Kudos
Message 1 of 14
(1,106 Views)

Hi Garza,

 

Hi, is it possible to create a VI that minimizes another VI?

Yes.

Spoiler
Get a reference of "another VI" and use a VI property node to change its frontpanel state…
Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 2 of 14
(1,097 Views)

Thanks for your answer!

 

But they have to be in the same LabVIEW project?

 

To create this reference from "VI_genericName" i have to modify "VI_genericName"?

 

EDIT: http://www.ni.com/tutorial/3929/en/ is this what you meant?

0 Kudos
Message 3 of 14
(1,095 Views)
Solution
Accepted by topic author AldhairGarza

Hi Garza,

 

But they have to be in the same LabVIEW project?

They have to run in the same runtime environment, so the VI server is able to find the VI.

 

To create this reference from "VI_genericName" i have to modify "VI_genericName"?

You need to know the name of the VI to be able to get its reference: the VI name is one input to OpenVIReference…

 

is this what you meant?

Yes.

Read this sentence from the linked tutorial:

A required input for the Open VI Reference is “vi path”. “Vi path” accepts a string containing the name of the VI that you want to reference or a path to the VI that you want to reference.

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 4 of 14
(1,091 Views)

 

Thanks! It works pretty well! 

 

0 Kudos
Message 5 of 14
(1,058 Views)

Is it possible to create a VI that minimizes a LabVIEW application?

 

Something with "Open Aplication Reference" and then some Method/Property Node?

 

Any Idea would be highly appreciated.

 

Thanks

 

0 Kudos
Message 6 of 14
(1,076 Views)

Hi Aldhair,

 

you need to connect with the VIServer of your LabVIEW application using a network connection. After doing so you can also open a reference to a VI in the application.

 

Read the help for the OpenApplicationReference function…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 7 of 14
(1,042 Views)

Hi,

I'm sorry but I can't fully understand how to do that. 

I read the Help many times and I don't know how to tell the function to reference to my executable. Could you please be a bit more specific?

 

Thanks.

Regards.

0 Kudos
Message 8 of 14
(1,037 Views)

Hi Aldhair,

 

you need to open a reference to the VIServer of your LabVIEW application.

To do so you use the OpenAppReference function and you need to supply the IP address and the port of that VIServer instance. The IP is given by the computer you run the app on. The port is 3363 by default, but can be changed in the application ini file, which is created while building the app.

 

Background: each app uses its own VIServer instance, even when running on the same computer. You can connect with other VIServer instances remotely using a network connection…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 9 of 14
(1,033 Views)

Hi,

thanks for your answer.

"The IP is given by the computer you run the app on." Got it.

"The port is 3363 by default, but can be changed in the application ini file, which is created while building the app." I cannot find this port number, the ini file is the following:

[TestExec]
hideRootWindow=True
allowmultipleinstances = TRUE
dialogFont="Tahoma" 13
appFont="Tahoma" 13
systemFont="Tahoma" 13
ole.AuthnLevel=1

 

I also searched in the Build Specification but I cannot find the information. Am I doing something wrong?

 

Thanks.

 

0 Kudos
Message 10 of 14
(1,026 Views)