01-17-2009 04:07 PM
I am using the Call Library Function Node in LV 8.6. I have checked the specify path on diagram check box and pointed directly to the DLL file I am using. Every time I start Labview I have to go to the diagram and physically go find the DLL in one of my calls in order for it to work correctly. Once I perform this everything seems to work as expected. Has anyone else seen this issue? Any suggestions would be appreciated.
Thanks
Solved! Go to Solution.
01-17-2009 04:55 PM
Steckman wrote:I am using the Call Library Function Node in LV 8.6. I have checked the specify path on diagram check box and pointed directly to the DLL file I am using.
What is your definition of "pointed directly"? Do you mean with e.g. a path diagram constant?
01-17-2009 05:13 PM
01-17-2009 06:26 PM
Does it work if you uncheck "specify path on diagram" check box.
I guess I don't fully understand why you have it checked. There must be more to your situation that you are telling us. 😉
01-18-2009 12:48 AM
I have seen this many times on multiple computers at work when calling the DLL for the Ocean Optics Spectrometer ( also have seen various posts here on this issue). Best results for me was to check the specify path ( LV 8.1 but not available in LV 7.1 ) and to use the DLL from C:\Windows\System directory in Windows XP. I usually have a Path Control for this but a path constant should work as well I would think.
Strangely enough, in LV7.1 and not being able to specify the path AND not having the DLL in the System folder , the problem goes away when I compile the appication and run as an executable.
Mario
01-18-2009 09:47 AM - edited 01-18-2009 09:48 AM
01-18-2009 02:44 PM
Steckman wrote:I am using the Call Library Function Node in LV 8.6. I have checked the specify path on diagram check box and pointed directly to the DLL file I am using. Every time I start Labview I have to go to the diagram and physically go find the DLL in one of my calls in order for it to work correctly. Once I perform this everything seems to work as expected. Has anyone else seen this issue? Any suggestions would be appreciated.
Thanks
Most likely that DLL does depend on other DLLs that reside in the same directory as the one you are pointing at in the Call Library Node configuration dialog. What happens is this:
Without first going to that directory:
LabVIEW requests Windows to load the DLL, Windows sees that it needs to load other DLLs and can't find them in its standard search locations:
1) already loaded in memory
2) in the application directory (where the exe resides that started the current process, in the LabVIEW IDE this would be where LabVIEW.exe is)
3) in the System directory4) in the Windows directory
5) any directory the PATH environment variable contains
6) in the "current directory"
Because Windows can't find a dependant DLL it aborts the loading of the main DLL and returns with an error to LabVIEW.
Now you go in the configuration dialog and point to the DLL. The file browse dialog in LabVIEW uses the standard OS file dialog and this dialog has the obnoxious behaviour to always update the "current directory" to the directory from which a file got selected in. Now LabVIEW sees that the path has "changed" and requests the load of the DLL again. Again Windows sees that it needs to load other DLLs too for this DLL but this time going through above search order it will actually hit on the DLL in that same directory et voila everything goes fine.
This is definitly NOT a problem of LabVIEW. LabVIEW does not know and really shouldn't have to know that a DLL needs other DLLs loaded and even more important should never attempt to think it can do DLL dependancy loading better than Windows, which it probably could but which is simply not its task.
It is your responsibility as programmer and user of that DLL to know about its dependencie, and if you haven't written the DLL, to hit the original programmer on his head if he hasn't documented those dependencies, and make sure that those dependencies are actually properly resolvable for Windows by putting them in one of the above mentioned locations
2) is usually the best location for built applications since it will not pollute the Windows or System directory of the application user and 5) is the best for the development machine since you can add a directory to your PATH environment variable where you put the DLLs you need for developing a specific application.
Rolf Kalbermatter
01-19-2009 11:07 AM
01-19-2009 03:38 PM
12-10-2010 11:48 AM
My recollection is that you had to modify the Windows PATH variable to include the path with the Omnidriver DLL in it, and that you had to have that DLL in the directory in which it was installed by the OO installation script.
There may have been another environment variable which had to also be set, however I am not sure (it's been 2 years since I dealt with OO's DLL).
Regards,
Leif Kirschenbaum, Ph.D.