04-21-2009 07:29 AM
04-21-2009 10:17 AM
Well, this sounds as if you would like to call a DLL which is completely undocumented. So do you know the parameters and what function to call?
If so, it might be a problem with the memory management, e.g. the way you handle arrays and strings. Pre-allocate them in LabVIEW and pass it to the DLL.
If thoose hints doesn't help, I think we will need more specific information on that.
Christian
04-21-2009 11:01 AM
although mostly undocumented, i do use this DLL from VB.net. It's declared by:
Private Declare Function ASME_VPH Lib "c:\windows\system32\steam.dll" Alias "_VPH@8" (ByRef Pressure As Double, ByRef Enthalpy As Double) As Double
Dim SV As Double
Dim P2 As Double
Dim H1 As Double
and called by
SV= ASME_VPH(P2, H1)
The Call Library Function configuration does reconize all the functions in the DLL, by alias name (i.e. VPH). There are no arrays involved, simply double floats. Is it possable there's a conflict in my regestry (the deep dark pit)?
04-21-2009 01:16 PM
04-21-2009 01:33 PM
A dll shareware from Excel Engineering http://www.x-eng.com/Download_XSteam.htm they have a X Steam LabVIEW page.
The xsteam.dll in that package is different from the one mentioned above (which is not shareware), however I downloaded the Xsteam.dll, and tried calling it from my Labivew 6i, and received the same error. The VI included from Excel Engineering is a newer version then my license.
I am fairly certain that my dll is in fact c++. If c++ is not compatible with 6i, that explains it all.
04-21-2009 02:51 PM
I downloaded the sample VI they had on that page and it ran with no errors on my LabVIEW 8.2. Did you try their sample, or were you trying to create your own call?
If your DLL is in fact a C++ DLL then you will either have to modify the DLL and adorn the functions with extern "C" modifiers, or you will have to write a wrapper DLL (in C).
04-21-2009 03:03 PM
when I try to open it, I get " Labview load error code 9: VI (version 6.1) is newer then Labview version (6.0)." my license is only good for 6i
04-21-2009 03:40 PM - edited 04-21-2009 03:40 PM
Well, the example isn't much:
I guess I'm lost now as to what your question is. Is your issue now about needing to call this specific DLL, or your DLL?
04-21-2009 03:54 PM
Sorry for the confusion. Either DLL would do, I downloaded XSteam.dll as my dll did not seem to work.
I do notice one thing, that the gui for the function in the VI above looks different then the "Call Library Function" in my 6.i version , and may very well be different. Given current funding (around here) there's no chance of upgrading at this time.
It appears that the problem may simply be resolved by either finding someone around here to recompile the dll in C rather then C++, or upgrading LabView, or simply doing the problem in another tool.
Thanks.
04-21-2009 05:35 PM
I woudn't be surprised if the Call Library Function node looks different. I know it didn't use to have error in/out clusters.
As for the DLL, as I indicated, it may be that all that needs to be done is to adorn the function calls with extern "C" so the function names are visible and the functions can be found by the LabVIEW compiler. This is discussed in step 3 of this KB article. How the code is implemented internally shouldn't (probably) matter.
Sorry I can't be of any more help, but I don't have LabVIEW 6 to try this on.