LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open a SubVI and run automatically

Solved!
Go to solution

Hallo everyone,

 

I´ve an event structure in which a SubVI is called by VI server. I don´t want the main VI to be frozen so I turned the wait until done off.

But the SubVI is just called and in edit mode. How can I call the SubVI and run it automatically?

 

Regards,

Wilbur

 

 

Open SubVI.jpg 

0 Kudos
Message 1 of 6
(4,273 Views)

Hello wilbur,

are you sure that the target VI is a reentrant VI? If not you should get an error from Open VI Reference. The Option 8 is for running reentrant VIs.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 6
(4,268 Views)
Solution
Accepted by topic author wilburwu

Hi Wilbur,

 

Good afternoon and I hope your well today.


Thanks for the post.

 

The VI Property, Exec.RunOnOpen isnt required - if you use VI Server this property is ignored - and your using the Run VI method anyways. 

 

I feel your issue is with the configuration of your  Open VI Reference. If you set the options input to Zero (0) does it work? It does for me. And if I said the input to 8, it loads in edit mode. 

 

The issue I think is in the detail of the Open Reference Content Help. When the reference is destroyed in the VI Server VI the called VI no longer runs. 

 

For example, I have a small delay between my RunVI (wait until done - false) and the close reference VI. After the delay my called VI stops. 

 

What results are you trying to achieve? Are you trying to call a reentrant VI? If so, please take a look at the following example

 

Load and Call Multiple Copies of a SubVI using VI Server

http://zone.ni.com/devzone/cda/epd/p/id/4192

 

Please let me know how this information finds you, 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 3 of 6
(4,237 Views)

Hi James,

 

thanks for ur advice! It works well with the option set to 0. Luckily I´m not using a reentrant VI in the case.

 

Anyway, the example in ur link doesn´t work on my LV 8.5.

 

Wilbur

0 Kudos
Message 4 of 6
(4,224 Views)

Hi Wilbur,

 

Good evening and I hope your well.

 

Thanks for your prompt reply.

 

I am glad its all working now.

 

Yeh the example is in a older version of LabVIEW, I managed to open it in LabVIEW 8.2 - I will resave it tomorrow (When I am at a machine with LabVIEW) and post it, if your interested?

 

Please mark the forum as resolved with the new feature!

Thanks 😄 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 5 of 6
(4,199 Views)

Hi all:

I have this configuration: 
manually execute process 1, then there is a button that opens (when click BTN-A-HISTORICO) the process 2 and process 1 is minimized and still running. 

Then the process 2 opens in edit mode.
I put the 0 in the options in the Open VI Reference but i don't understand why doesn't work.

 

 HEEEELLLPPP

 

 

I'm using labview9

 

process 1

 

PROCESO1.jpg

 

process 2

 

PROCESO2.jpg

por el poder de Grayskull
0 Kudos
Message 6 of 6
(3,437 Views)