LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 7: File not found for executable

Solved!
Go to solution

Hello all,

 

I have a problem with a VI server call.  I am currently using LV 2011 on Windows 7.  Here's the problem - I have a subpanel in a larger VI into which I drop the interface of a (potentially) stand-alone VI.  The path to the called VI is good (in both the exe and in the development application).  However, I am getting an error 7 when I try to use the "Open Config Data.vi".  More specifically, I am getting the description that it can not find the VI in the library Load.vi (called by Open Config Data).  I have tried specifically adding the whole config library into the build, but this does not seem to help.  Also, the config VIs are called in the main application with no problem.  Does anybody have any thoughts? 

 

Thanks, Matt

0 Kudos
Message 1 of 20
(14,886 Views)

How do you know the paths are good? When exactly is the error occurring in development, executable, both?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 20
(14,880 Views)

the error is saying the directory structure being passed into load library is wrong, I would try using the absolute path (if your not already) for the vi and go from there. If you are using the absolute path then i would suggest checking it (you proberly have many times tho)

 

Hope it helps 

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 3 of 20
(14,877 Views)

Matt,

 

VIs which are loaded dynamically using VI Server are not detected as dependency during the build process. So you have to add them manually to your project and in the build script mark them as "always included".

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 20
(14,876 Views)

OK - so maybe my description was not so great.  First - I know that the file paths are good because when they are not, the VI run dynamically in the subpanel via a VI server call will not load (there will be nothing in the subpanel).  In this case, it loads and is running (can check this through debugging).  Second, the error is occurring in both the exe and in the development system.  The absolute path (although this is not an issue - see previous comment) is not possible given that this is built into an installer and deployed on other platforms (on which the directory structure is not necessarily duped).  And finally, the VI that is loaded dynamically is already in the "always included".  I don't have a problem calling and running this VI, the error crops up when I attempt to use "Open Config Data.vi" in that is called by that VI.  This VI that is not loading (Load.vi) is located in the NI library NI_LVConfig.lvlib (located on the disk under the folder vi.lib).  I currently have a workaround for this, but it is not the best (a pop-up dialog comes up that allows the user to configure everything from the UI rather than from the config file). 

 

One thing that may help that I neglected to mention is that, in the development environment,  I can run the calling VI one time and I get the error.  However, in subsequent runs, I do not get the error.

 

Thanks for all of your responses.  I hope this further explanation helps.

 

Cheers, Matt

0 Kudos
Message 5 of 20
(14,870 Views)

Could you post an example project showing the issue?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 20
(14,865 Views)

Norbert,

 

I don't know if this will help - I can't post the code because it is too big at this point and pulls in too many device and config requirements, but here are some screen captures.  The first is the code for the main VI where the VI called 'RH Interface.vi' is opened and run dynamically (the reference is used to populate the subpanel 'thermPanel').  The second shows the source for 'RH Interface.vi'; the red circle indicates where the VI bombs.  The subvi called uses a file input called 'ConfigPath' as input to 'Open Config Data.vi'.  This is where I get the error 7.  The subsequent case strucutre with the error input is used to handle the case where the config file is not properly opened.  There is nothing special about opening the config file; it is done in the main program also.

 

Thanks for all your help.  Matt

 

main_call.png

 

 

 

bomb.png

 

 

0 Kudos
Message 7 of 20
(14,860 Views)

Matt,

 

that screenshots are too small for identifying anything.

Nevertheless, it seems to me that there is no issue of the exe finding a vi, but finding a *.cfg file. Could you verify?

 

If so, you have to make sure that the cfg/ini file is within the expected location.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 20
(14,852 Views)

Norbert -

 

The config file is found - the vi 'Load.vi' is not found.  I will try to fix the image shots.

 

m

 

edit: here are the pngs for the screen shot

 

Download All
0 Kudos
Message 9 of 20
(14,847 Views)

So the first thing I noticed with your screen shots is that you are trying to feed in the config file path through a local variable. I wouldn't recommend doing that. I bet you are running into some kind of race condition where you load the VI into the sub panel before the local variable is populated with the path value. That would explain why this is happening in both the development environment and executable. 

 

Dataflow work everytime, even if its in a way we don't want it to. Smiley Wink So I'd recommend forcing the initialization of the config file path value before you load the VI into the subpanel. Use the error wire to ensure this happens! 

0 Kudos
Message 10 of 20
(14,844 Views)