LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application that calls a sub VI using invoke mode cannot execute "system Exec.vi"

I have a Labview application (test.exe) which calls another subVI using invoke node.  This subVI is using  "system exec.vi" for running a .bat file. When running the main application it retuns error at invoke mode and does not run "system Exec.vi" . It appears like  "system Exec.vi" cannot be located- a VI loading window quickly pops up and disappears on running the application .   attached is the sanp shot of the main VI ( test.exe) and the sub VI

 

Any tips on why this is happeing?

 

0 Kudos
Message 1 of 3
(2,954 Views)

Hm, I had a weird issue like this but was calling a VI using the VI Server Reference in a subpanel. Once I created the EXE the subVI inside the subpanel wouldn't work. First make sure you're putting the subVI in "Always Include" in the build properties. Two things seemed to fix this for me, so try one or the other

 

- Use a static VI Server reference instead

- Keep your VI the way it is, but check the "Use LabVIEW 8.x file layout" in the Advanced tab of the build. 

 

Let me know if this works! 

Daniel Parrott
Software Product Marketing - Data Management & LabVIEW
National Instruments
0 Kudos
Message 2 of 3
(2,911 Views)

Yes, it seems main VI can not find dynamic subvi.

If you include it into the build, make sure you use relative path and in the advanced build specifications you did not set "use labview 8.x file layout".

 

In simple cases you can put vi on a diagram - this will force labview to load vi into memory, then open reference by name, not by path.

 

0 Kudos
Message 3 of 3
(2,896 Views)