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: 

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
(4,861 Views)
0 Kudos
Message 2 of 6
(4,845 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
(4,798 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
(4,791 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
(4,782 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
(4,777 Views)