09-01-2009 05:06 PM
Hi,
I have a custom dll that I want to call from a LabView vi on a real time system. The dll has passed the dll-checking program provided by NI, and I have loaded it onto the machine using an FTP transfer. I am using the Call Library Function Node. I have configured the node such that the dll name is set to "mdslib_client.dll" and have checked the box specify path on diagram. The path I have wired to the node is "c:\ni-rt\system\mdslib_client.dll" but when I run the code I get error code 7 (Specified file not found).On the otherhand, if I run the Check if file/folder exists vi, with the same path as input I get a truevalue, indicating that the path is not the problem. How else could this error be generated?
Jon
09-02-2009 01:27 AM
What RT hardware are you using. NI has two different RT systems, one based on PPC CPUs using VxWorks and one based on x86 CPUs using Ardence Interval Zero Pharlap ETS. All cRIO and some Fieldpoint devices use the PPC platform. VxWorks does not know about DLLs at all, but uses its own shared library object format. Therefore if you download a DLL file to such a system, the LabVIEW RT system on it will not be able to load it. For those systems you need to specifically recompile (and possibly adapt the sources for that to work as there are no Win32 API calls you can do) the shared library into the *.out format, required by VxWorks.
For that you can use the VxWorks development Workbench (costly but nice with source level debugger etc) or the gcc toolchain. For a tutorial about this checkout this and this.
Rolf Kalbermatter
09-02-2009 05:21 AM
As Rolf said, we cannot use dlls on PPC based RT Targets.
When we deploy a VI calling a dll on a Pharlap based targets(x86 based targets to be more precise), we need not FTP the dll on the target. Also there is no need of using the option of "Specify path on diagram" in Call Library Function Node. When we deploy the VI, LabVIEW deploys the dll as well. If the dll is corrupt then we will get a deployment error right away.Jon, can you check with this if your target is x86 based?This gives us an idea if the dll isdeployable on RT target or not.