LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 7 and error 1003

Solved!
Go to solution

Hello everybody,

 

I have a main VI that loads other VIs as sub panels onto it. These subVIs are called dynamically when running my VI. When building an executable I select my subVIs in Always Included and the Main is selected as Startup VI.

After building my executable I get error 7: file not found NI-488 GPIB non existent.

The VI is not in the path it shows in the error description but I selected the right path in my project manager so I don't understand why it selects the wrong path when running the exe.

I tried copying the VI in the expected path in the error description but that didn't really solve the problem instead I gor error 1003.

The problem only occurs in the executable not in developing environment.

 

I know there are already a lot of threads about this problem but I couldn't find one that matches my problem. 

 

LV Version 2015

Best Regards,

A.B. 

 

0 Kudos
Message 1 of 5
(2,413 Views)

Have a look on this article:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NFfSAM&l

 

The realtive path is changing if a VI is imbedded inside an executable.

Message 2 of 5
(2,394 Views)

How are you setting a path? I would set a path relative to mainVI (or other VI that is loaded as a subVI), it will not change. Building relative to application directory is not a good idea. 

Dev environment:

C:\Project\main.vi

C:\Project\SubVIs\dynamic.vi

Exe

C:\app.exe\main.vi

C:\app.exe\SubVIs\dynamic.vi

 

dynamic.vi path = Build path(Main.vi path, "..\SubVIs\dynamic.vi"). 

 

 

Message 3 of 5
(2,361 Views)

Hi alex,

I used the 8.x file layout while building the exe and now it all seems fine but whats the difference between these 2 layouts? (old vs new)

0 Kudos
Message 4 of 5
(2,335 Views)
Solution
Accepted by topic author a.b229

@a.b229 wrote:

Hi alex,

I used the 8.x file layout while building the exe and now it all seems fine but whats the difference between these 2 layouts? (old vs new)


The 8.x format compiles into a flat hierarchy.  The new format compiles into a zip file like format, preserving the relative paths between all of your VIs.  If you are dynamically calling VIs, it is best to use the new format and use Current VI Path, Strip Path, and Build path to create the absolute path to the VI you want to call.  This way, it will work in both the development environment and the built executable.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(2,333 Views)