ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

run vi when opened

Hello,
 
I'm trying to get the subVI to run when the front panel is opened.  It works manually (when the "Vi Properties/Executon/Run when opened" is enabled) but never does when I try to open it from another VI.  I have uploaded the little program which I was playing with.  If you guys can help me it would be great šŸ™‚
 
The program opens another VI (with name given by the user) from the same folder...
0 Kudos
Message 1 of 5
(4,365 Views)
hello,

i think that you just have to insert the "invoke node" and select "run vi".

See the attached picture.
Software developer
www.mcm-electronics.com





PORTUGAL
Message 2 of 5
(4,358 Views)
A subVI will automatically run when it is called on a block diagram. That is the default behavior. If you are double-clicking the subVI on the block diagram to open and edit it, then  it does not run no matter what the execution setting is. That is by design and a very useful feature. Run When Opened is usually used with the main VI so that the user does not have to click the run button. If what you really want to do is show the subVI's front panel when it is called, then that is a different VI Property setting. That is set with the Windows Appearance>Customize>Show Front Panel When Called.
Message 3 of 5
(4,351 Views)
Thanks, Jorge Amaral.  Exactly what I was looking for. šŸ™‚
 
P.S.> I love this website šŸ™‚
0 Kudos
Message 4 of 5
(4,343 Views)

Searching wrote:
> Hello,
>  
> I'm trying to get the subVI to run when the front panel is opened.  It works manually (when the "Vi Properties/Executon/Run when opened" is enabled) but never does when I try to open it from another VI.  I have uploaded the little program which I was playing with.  If you guys can help me it would be great šŸ™‚
>  
> The program opens another VI (with name given by the user) from the same folder...
>
>
> Openvi.vi:
> http://forums.ni.com/attachments/ni/170/245181/1/Openvi.vi

Use the Run VI method.

Paul Cardinale

0 Kudos
Message 5 of 5
(4,327 Views)