LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call subvi from exe

Solved!
Go to solution

Hi,

I call an exe with system exec block. I build that exe with Labview application builder. I need  to open the front panel of some sub-vi included and I need to close them when they finish. The sub-vi node setup is configuered in this way: show front panel when called; close afterwards if originally closed. At the very first time I didn't include those sub-vi in source file tab of the application builder, so the application opened a pop-up of error. Then I include them in the source file tab: now the program works, but the VIs are all opened when the application start. I don't like that. How could I reply exactly the behaviour of VI in the exe file?

Thanks

0 Kudos
Message 1 of 11
(2,966 Views)
Solution
Accepted by FabioBone

Use property nodes within the subVI itself to open and close it's front panel.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 11
(2,962 Views)

Hello Mark,

 

Is it possible to close front panel of subvi from main VI??

CLAD
Passionate for LabVIEW
0 Kudos
Message 3 of 11
(2,835 Views)

Hi jatin,

 

yes.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(2,832 Views)

jatinpatel1489@gmail.com wrote:

Hello Mark,

 

Is it possible to close front panel of subvi from main VI??


Sure it is.  You just have to get a reference to the VI and use an invoke node to close the front panel.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 11
(2,830 Views)

@Mark_Yedinak wrote:

Use property nodes within the subVI itself to open and close it's front panel.


It's even better to use Invoke nodes. 😉

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 6 of 11
(2,806 Views)

Its Great,

 

One more thing I am looking for is to get list of all subvis which are in memory. How do I do this ??

CLAD
Passionate for LabVIEW
0 Kudos
Message 7 of 11
(2,779 Views)

If you drop an empty property node it's linked to Application by default, look for Application - Exported VI's in memory, or something similar.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 11
(2,775 Views)

My mistake in previous post actually I looking for list of subVIs having front panel opened. I should not have asked every small things but I am really not finding a way to get a list of opened sub vis. I would heartly appreciate if you could post a code or image for the same. 

CLAD
Passionate for LabVIEW
0 Kudos
Message 9 of 11
(2,757 Views)

That's a valid question, as it's not that simple. 🙂

You'll need to get the Application in memory list, loop through it and open all ref's (as shown above) and check their window property.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 10 of 11
(2,747 Views)