02-13-2025 02:36 AM
@syed.raza a écrit :
Hi,
I finally manage to get the properties of Fluids in labView, procedure is lengthy but quite simple to do.
1) Installed matlab on my computer.
2) Installed Refprop on my computer (http://www.boulder.nist.gov/div838/theory/refprop/MINIREF/MINIREF.HTM )
3) Connect Refprop with Matlab (http://www.boulder.nist.gov/div838/theory/refprop/LINKING/Linking.htm#MatLabApplications). By doing this you should be able to call Refprop in to Matlab. If you can do it, then next step is fairly simple.
4) Afterward, call the matlab script in labView. Function>Mathematics>script and formulas>script nodes> Matlab script. Or simply search in funtion "Matlab. By doing this you will be able to do what ever you can do in Matlab.
I am currently using it. It is faily simple.
Let me know if you stuck some where.
Thanks
Syed
Hi @syed.raza I have matlab linked with refprop. I used Matlab script
as you said.
Would you share your VI or photo of your code.
Thanks
02-13-2025 03:57 AM
Hi alhabeeb,
please keep discussion in one place instead of scattering in several threads (and bringing back old threads)!
You cannot "add parameters" to a DLL function call on your own, you need to follow the DLL definitions (as already mentioned by Rolf)!
What's your intention to use an empty Matlab script node?
02-13-2025 04:26 AM
@GerdW a écrit :
Hi alhabeeb,
please keep discussion in one place instead of scattering in several threads (and bringing back old threads)!
I fully understand yours suggestion, but I'm looking for a solution.
What's your intention to use an empty Matlab script node?
I would would like to know how to feed the script with date and how to get out the outputs.
Thanks
02-13-2025 04:38 AM
Hi alhabeeb,
@alhabeeb wrote:
I would would like to know how to feed the script with date and how to get out the outputs.
Typically you define inputs and outputs in the Matlab node (like you do in the formula node or in the deprecated MathScript node)…
02-13-2025 04:43 AM - edited 02-13-2025 04:45 AM
What in the github repository doesn’t work for you? If it is about how to use the umpteen VIs it provides, then the answer is really RTFM for the RefProp library. Trying to do your own Call Library Node magic is similar to trying to build your own car because you need to go to an appointment while there is a public bus going almost to the location you need to be.
Trying to use a Matlab script would be about similar than going to the other side of the country to loan a car from a relative instead. Both are a very roundabout way to solve your problem and wrought with pit-holes on the long way.
Read the documentation to the RefProp DLL and look at theVIs in the github repository. If the RefProp dll can do what you try to do, the according wrapper is almost certainly in there and you can safe yourself from building your own car. You still need to learn reading the time schedule of the public bus of course!
02-13-2025 07:25 AM
Thanks for the advices.
@ rolfk
I thought using Matlab script is very straightforward!
OK. I will stay with your opinion to take the publick bus instead of build my own car or going to the other side of the country ^_^.
Unfortunately, the github repository VIs didn't work!
Thanks
02-13-2025 10:41 AM
@GerdW a écrit :
Typically you define inputs and outputs in the Matlab node (like you do in the formula node or in the deprecated MathScript node)…
I tried Matlab script Node, and it looks easy, but now I have an issue in my VI attached here that the value of the variable (T) not passing to the node! When I initialized it, it works. How can fix this issue?
Thanks
02-14-2025 04:02 AM
Hi,
Problem solved by using Matlab script node.
Thanks