LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with calling a subvi with vi reference (subvi is not shown)

Hi,

I'm sometimes having trouble with calling subvi's with vi reference.
Our labview application is some kind of a loop that calls subvi's. The appearance properties of the called vi's are set so that it should be shown when called ("show frontpanel when called" and "close afterwards when originally closed" are both enabled).
The problem is that the vi's are not shown when called!
Am I forgetting something?

The thing is, that when the called subvi itself is calling a another vi with the same appaerance settings, this latest one is shown (but still not the subvi called directly from the main program). Some vi's called from the main program don't have subvi's so nothing is shown for the user when I call them in my main program.

In code, I simply open the reference to the vi, then I invoke the "set control value" method (where we specify the control name, type descriptor and some flatten data) and then I invoke the "Run vi" method with the wait until done flag set to true.

can someone help me with this problem?

thanks a lot in advance
kind regards,
Marino
0 Kudos
Message 1 of 8
(3,473 Views)
Hello,

There is a vi property you can set: "Front Panel Window -- Open", did you try setting it to true?
Hope this heps,

Paulo
0 Kudos
Message 2 of 8
(3,466 Views)
Hi,

thanks for the response.

I don't use the property because it is not always necessary (or permitted) that the subvi is shown. I need it to react like specified in the appearance properties of the subvi.

thanks

kind regards,
marino
0 Kudos
Message 3 of 8
(3,465 Views)
Hi,

I'm not sure I'm following you...
The property I mentionned is programatically changeable (accessible via the property node wired directly to the reference of the vi in the block diagram of the caller), so you may control it to be visible or not when you call it.
0 Kudos
Message 4 of 8
(3,462 Views)
The problem is that we have a general call_vi routine. This one is not setting this property in code because it assumes that the appaerence settings of the vi that it calls is set correctly. So, when I want a vi to be shown, I need to enable the "show frontpanel when called" and "close afterwards when originally closed". When I don't want the subvi to be shown, I simply disable these properties.
This used to work. But recently, we replaced the Labview 4 controls in this vi to laview 6.1 controls, and it doens't work anymore. The called subvi is running but it is not shown. I don't think it has something to do with this because we didn't change the control types. We simply replaced an old String control (the ones with the old appaerance from LV4) with a new string control (LV6.1).

thanks,

Kind regards,

Marino
0 Kudos
Message 5 of 8
(3,459 Views)
I used it in both ways before and they worked well, probably it has nothing to do with this, so unfortunately I cannot help you more than this... sorry.

Regards,
Paulo
0 Kudos
Message 6 of 8
(3,451 Views)
Can you post and example of your program that demonstrates this behavior. Somehow, the show frontpanel when called property is either not being called or there is an error being generated. It would help a lot to fix the problem if we could see your program.
0 Kudos
Message 7 of 8
(3,441 Views)
Hi,

our problem is solved. We are programmatically setting the appearance properties now with the FP.open property.

thanks for the help...

kind regards
0 Kudos
Message 8 of 8
(3,428 Views)