LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start Asynchronous Call RunTime LABView 2011

Hi all,

 

i want to launch a subvi asynchronously. It works in LabView IDE, but not if i create an executable and include the subvi as always included doesn't work the same.

How can be possible doing this at runtime?Smiley Sad

I get an error code 7 in error output of open vi reference block in attached pic.

 

Thanks in advance

 

0 Kudos
Message 1 of 6
(3,766 Views)
0 Kudos
Message 2 of 6
(3,750 Views)

Thanks for the answer, but still i have problems with that.

Still i don't understand, in runtime system, the path has to be the same of the executable?

 

Supposing that my app is in the following location

 

"c:\myappdirectory\application.exe"

 

and the subvi i want to launch asynchronously is named  "subdecode.vi"

 

Just to understand: in run time system, what is the correct path to pass as input 

 

i've tried with fixed path just to be sure what i put as input with this:

 

"c:\myappdirectory\subdecode.vi"

 

 

but still i'm getting error 7...

 

What has to be the correct path to pass as input to OpenViReference ?

 

Thanks.

 

 

 

0 Kudos
Message 3 of 6
(3,703 Views)

The vi in question is located within the executable. You need to treat the executable as a folder for the path.

 

Using the example in the link snowpunter gave:

"C:\MyApplication.exe\Application.vi" would be the path for "Application.vi" that is included and compiled within "MyApplication.exe".

 

Since the path to a VI will be different for development and runtime, you need to account for this in your code. The first illustration in the article linked above shows this method. (personally, I use disable diagram structures with "RUNTIMEENGINE==TRUE" instead of the AppKind property)

 

Edit: Keep refering to that article, it's good.

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 4 of 6
(3,696 Views)

I've done the path as in attached pics, as the application.exe is the folder in which there is the subvi, but doesn't work ...Smiley Sad

Download All
0 Kudos
Message 5 of 6
(3,687 Views)

Ok, sorry now it works!

 

i got the decode.vi in subvi folder...

 

so i tried to put application.exe\subvi\decode.vi and now it works!

 

before i put simply application.exe\decode.vi and i was wrong!Smiley Happy

 

 

Thanks!

Message 6 of 6
(3,682 Views)