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,219 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,212 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,205 Views)
Thanks, Jorge Amaral.  Exactly what I was looking for. 🙂
 
P.S.> I love this website 🙂
0 Kudos
Message 4 of 5
(4,197 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,181 Views)