LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call library function 6i errors

After several years of inactivity, I’ve resurrected my Lavbiew 6i.  If I try to use the Call Library function to access a DLL, I get a “LabVIEW Development System has encountered a problem and needs to close” error.  I have tried all calling type possibilities, and even downloaded “steam67.dll” which is reportable for Labview (though perhaps a newer version)
0 Kudos
Message 1 of 17
(3,799 Views)

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

0 Kudos
Message 2 of 17
(3,783 Views)

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)?

0 Kudos
Message 3 of 17
(3,778 Views)
The part Alias "_VPH@8" seems to imply that you have a C++ DLL. Is this the case? If so, then it won't work, as LabVIEW can only handle C DLLs. You said you downloaded "steam67.dll". From where?
0 Kudos
Message 4 of 17
(3,769 Views)

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.

0 Kudos
Message 5 of 17
(3,766 Views)

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). 

0 Kudos
Message 6 of 17
(3,755 Views)

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

 

0 Kudos
Message 7 of 17
(3,753 Views)

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? 

Message Edited by smercurio_fc on 04-21-2009 03:40 PM
0 Kudos
Message 8 of 17
(3,747 Views)

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.

0 Kudos
Message 9 of 17
(3,742 Views)

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. 

Message 10 of 17
(3,734 Views)