"Allen Weekley" <[EMAIL PROTECTED]>

>Can a VI built into an executable call a VI that is located in another
>executable or a LLB?  If so are there any special tricks in order to
>give the calling VI the correct path?
 
Yes, BUT!!!!!

The first possibility is to just open a VI refrence to the VI on disk. For this
the path to the external VI would be basically <appdir>\appname.exe\myVi.vi

But as executables only contain the compiled code of the VI, the two applications
need to be LabVIEW version compatible. A LabVIEW 7.0 application can't load a
LabVIEW 6.1 application VI and vice versa.

Also linking may be an issue. LabVIEW applications always search for VIs in
its own internal VI library first before even attempting to look at other
places even if you furnish it a full path. So assuming of course the external
VI you want to call does not exist in its own VI library (only the VI name is
used for this check) you still could get into trouble if that external VI was
written to use a different version of a subVI which also exists by that name
in your first applications VI library. The application loader will load the
external VI and seeing that it calls a VI whose name exists in its local library
load the local one which might have functional or connector pane incompatibilities.

With functional incompatibilities you get wrong results and with connector pane
incompatibilities you get a broken VI and the Call By Reference function will
return an according error.

The second approach is to enable VI server in the other application. Then opening
an application reference to that application (you have to start it first somehow,
as the server is TCP/IP based which doesn't provide instance activation) you can
now work on VIs from a remote LabVIEW application just as if they would be local.

A few properties and methods are not allowed in remote operation for security reasons
and the VI server protocol is sort of version dependant. You can connect between
LabVIEW 5.0 and up to 6.1 applications as server and client mixed, but LabVIEW 7
servers can only be contacted by LabVIEW 7 clients. The opposite should work according
to the release nodes but I haven't tried that.

Rolf Kalbermatter
CIT Engineering Nederland BV    tel: +31 (070) 415 9190
Treubstraat 7H                  fax: +31 (070) 415 9191
2288 EG Rijswijk        http://www.citengineering.com
Netherlands             mailto:[EMAIL PROTECTED]
 


Reply via email to