LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1003 when using call by reference node

I am using the call by reference node to load vi's from llbs. It works fine when running the source code, but when I am running the executable version of my application, I get the error (vi is not an executable). It only happens on certain vi's.
0 Kudos
Message 1 of 8
(4,040 Views)
Hi,

When calling VI's within LabVIEW the path will be ..\mylib.llb\myfunction.vi.

But when calling the same VI with an EXE that path becomes ..\myexe.exe\myfunction.vi.

Therefore you will need to do a test if you are in an EXE an if so make the necessary adjustment to the path string before passing it to the call by reference.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 8
(4,040 Views)
Are you saying that when I build the application, the .llb extension becomes .exe?
0 Kudos
Message 3 of 8
(4,040 Views)
Daveton wrote:
> I am using the call by reference node to load vi's from llbs. It works
> fine when running the source code, but when I am running the
> executable version of my application, I get the error (vi is not an
> executable). It only happens on certain vi's.

Well.... If the only call to this sub-vi is dynamic, the LV compiler
does not know to include the vi in the EXE.

You need to add the sub-vi as a support file.

This will be true for any dynamically called code.

-Jason Richmond
VI Engineering
LabVIEW Advanced Application Development Course Instructor
Project Engineer II
0 Kudos
Message 4 of 8
(4,040 Views)
Hi,

Yes.

See simple example in demo.llb and the same as an exe. The main calls a subvi which returns its path to the main who displays it on the front panel

Regards
Ray Farmer
Regards
Ray Farmer
Download All
0 Kudos
Message 5 of 8
(4,040 Views)
The llbs are included in the executable as support files.
0 Kudos
Message 6 of 8
(4,040 Views)
May be these vi's loaded dinamically and run on background with FP closed? In this case in Builder go to VI Settings Tab and select option "Remove Panel=No".
0 Kudos
Message 7 of 8
(4,040 Views)
Hi,

It could be that the VI being called has a reference to some dll (some other code) which is not in the standard search path and therefore will not be executable.

With the application exe file when you run this will generate an INI file (if you haven't already generated this manually). Try added the search path key to the ini file eg.

[Application]
viSearchPath="C:\Program Files\MyProjects\*;:\*;:\;:\*;:\*;:\*"

The one's in <> are the default search paths. Change my C:\Program Files\MyProjects\* to your additional search paths. Change the name in [] to match the name of your appliction.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 8 of 8
(4,040 Views)