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
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,
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
Hope it helps
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.
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?
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…
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?
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 🙂
unfortunately I cannot provide you all those VIs…
But I can show you how to initialize:
"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…