LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL does not seem to work

I aquired a DLL to do some psychometric calculations for out test rig.  The functions work fine within Excel.   I fought with it a bit, crashing Labview  frequently until it doesn't crash anymore.  I think I managed to get the "Call Library Function Node" configured correctly, but it doesn't return a value other than "0".
 
Is there any way to check this?
 
Thanx
T
0 Kudos
Message 1 of 12
(3,545 Views)
If you want someone to check this, you need to provide the dll and .h file.
0 Kudos
Message 2 of 12
(3,532 Views)
There is no .h file but I have these...
 
 
0 Kudos
Message 3 of 12
(3,529 Views)
I've successfully managed to get other functions in this DLL to caclulate values correctly. Can I assume at this point that there is somethin wrong with the DLL?
0 Kudos
Message 4 of 12
(3,521 Views)
I don't get anything except 0 as well and the function declaration looks okay to me.
0 Kudos
Message 5 of 12
(3,515 Views)
LabVIEW expects that floating point return values are left in a floating point register. I stepped through the assembly for the DLL call and it looks to me like it is doing that. One of the last things it does before returning is load a value into the floating point register and that is the value LabVIEW returns. It happens to be zero in this case.
 
I also checked that the code was properly picking up the inputs. I do see it load the correct values into the floating point registers to do its calculations. So that appears to be working as well.
 
The declarations in the text file seem to be for Visual Basic. Have you successfully called it from VB? I tried it there and it also returns 0. The best I can tell everything is working properly and the answer is zero.
0 Kudos
Message 6 of 12
(3,501 Views)
The DLL came with an Excell sheet with the functions demonstrated.  When you plug in 92 degrees and 100% RH, you should get a Humidity Ratio of 233.235   This is the correct value.  If you enter 0 degrees and 0% RH you do get 0 though.  I'm not real certain why the DLL would work in Excel and not here.  I've contacted the supplier to see if he can help.  I think the Labview part works though. 
 
Many thanx for the help troubleshooting.
 
T
0 Kudos
Message 7 of 12
(3,495 Views)
The key is the %. 100% has a floating point value of 1.0. Plug that in and the answer is 233.235.
0 Kudos
Message 8 of 12
(3,491 Views)

Awsome!  Thanx for the help.  I should have found that.  Now that I look at the Excel sheet, the cell wants 0-100, but the formula that calls the DLL has a /100 in it.  Duh!  Don't know why they coded it that way, but I can uncode it.  Now that I know.

Thanx a bunch!  This makes life so much easier.

0 Kudos
Message 9 of 12
(3,485 Views)

Hello,

 

Do you know how to change the units from IP so SI?

0 Kudos
Message 10 of 12
(3,023 Views)