12-05-2016 09:52 AM - edited 12-05-2016 10:01 AM
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
12-06-2016 07:31 AM
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
12-07-2016 01:38 AM - edited 12-07-2016 01:48 AM
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
12-07-2016 01:59 AM
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
12-07-2016 02:04 AM
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…
12-07-2016 02:50 AM
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
12-07-2016 03:18 AM
12-07-2016 04:38 AM
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
12-07-2016 04:47 AM
Hi begler,
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…