LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using Refprop.dll

Hello guys,

 

i have a problem using different dlls from Refprop. Unfortunately the NI Support couldn't help me, because it seems like something is going wrong inside the used dll. Maybe there is anyone out there who is more experienced with using Refprop in Labview and can help me with my problem.

 

I am using Labview 2013.For both VIs you need to enter paths and my fluid is ethanol.

 

EDIT: Follow this Link to download the Labview_Refprop Driver

http://www.boulder.nist.gov/div838/theory/refprop/LINKING/Linking.htm

 

Okay, so i have attached two different VIs. In the "Refprop-Two phase tp-flash" the subroutine TPFLSHdll is used and it is working. If you vary the values of t or p you get correct values for entropy s and enthalpy h as well. (I checked it with Refprop.exe)

 

The other VI "Refprop - Two phase ps-flash" is the problematic one. I changed the dll (double-click on it) to PSFLSHdll and the inputs to p and s. If you now input values for p and s and run the VI, you don't even get the same value for s on the output. If you try to vary the input values p or s nothing changes on the output.

 

Does anybody have an idea where the problem is?

 

Thanks for your help,

begler

0 Kudos
Message 1 of 9
(2,671 Views)

Hey,

 

I have no experience with the DLL. But from your picture I see a lot of coersion dots and not wired input terminals. Please try the imprort wizard like described in this tutorial to get the function working:

 

Tutorial: Creating Wrapper VIs for C/C++ DLL functions using the Import Shared Library Wizard - Discussion Forums - National Instruments
http://forums.ni.com/t5/LabVIEW-Tools-Network-Developer/Tutorial-Creating-Wrapper-VIs-for-C-C-DLL-fu...

 

Hope it helps

Heinz

0 Kudos
Message 2 of 9
(2,613 Views)

Hello HeinzG.,

thanks for your answer.

I already created Wrapper VIs for my dlls with the wizard, but it didn't solve the problem.

I don't think that the problem is caused by not wired inputs, because in the TS VI there is the same amount of not wired inputs but it works perfectly.

This link contains a manual for the available dlls which indicates that not every coersion dot has to be wired.

http://forums.ni.com/ni/attachments/ni/170/507437/2/MANUAL.TXT

begler

0 Kudos
Message 3 of 9
(2,602 Views)

Hi,

 

it might not be the reason but I would try it anyway since you are experiencing issues.

 

Have you verified that the function of the DLL outputs other values when you call it from an other programming language?

 

Regards

0 Kudos
Message 4 of 9
(2,595 Views)

Hi begler,

 

as RefProp uses a very non-intuitve API I recommend to use FluidProp instead/additionally.

FluidProp acts as simplified API to several other libraries and is easy to implement…

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 5 of 9
(2,592 Views)

Hello Gerdw,

thanks for the tip.

Obviously there is no FluidProp LabVIEW driver available nor can i find an example using FluidProp in LabVIEW.

So are there dlls as well that can be used to create wrapper VIs or would it be possible to receive any examples from your side?

Best regards,

begler

0 Kudos
Message 6 of 9
(2,587 Views)

Hi begler,

 

FluidProp provides an ActiveX interface:

check.png

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 7 of 9
(2,583 Views)

Hi GerdW,

 

would it be possible to receive this VI from you? I never worked with ActiveX and i am running out of time, because RefProp took me so much time.  You would really do me a huge favour 🙂

 

Best regards,

begler

0 Kudos
Message 8 of 9
(2,576 Views)

Hi begler,

 

unfortunately I cannot provide you all those VIs…

 

But I can show you how to initialize:

check.png

"Create NewRef" just creates an ActiveX refnum using AutomationOpen function, "Error Handler" just checks the ErrorMsg from FluidProp (which most often is "No Error"). "ModelName" would be "RefProp", fluids and concentrations as familiar by RefProp usage.

All the FluidProp methods are quite self-explanatory…

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
Message 9 of 9
(2,573 Views)