LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interface with coolprop or any .dll

Good day,

 

I am trying to get something out of coolprop.dll on the lines of =PropsSI("H","P",(gauge pressure+101.325)*1000,"S",entropy,"R134a"). But the attached vi just crashes Labview. I tried with " , ' and just plain text for the variables, same result. The Labview wrappers here http://www.coolprop.org/coolprop/wrappers/Labview/index.html do not work for me either. Whats wrong with that vi, .dll connection looks straight forward. Could I use a formula node to invoke C?

 

Thanks,

 

Steffen

0 Kudos
Message 1 of 9
(1,418 Views)

Steffen01_0-1686219406671.png

 

Steffen01_1-1686219460857.png

problem solved, have do do the right ticks

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

but now the next question, can I then just include the .dll and link to it, like here https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kKgsSAE&l=en-AU

0 Kudos
Message 3 of 9
(1,377 Views)

@Steffen01 wrote:

but now the next question, can I then just include the .dll and link to it, like here https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kKgsSAE&l=en-AU


If you enter the full path to the DLL, rather than just the DLL name (in which case it would have to be located in one of the standard Windows search locations for it to be found), the Application Builder will automatically add the DLL to the build application (and place it in the data folder by default). And since the Application Builder knows that it put that DLL there, it will also have adjusted the path in the VI to point to that location.

You should not need to do anything special when building the application.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 9
(1,349 Views)

ok, thanks. It will be in c:\coolprop, so this will not change

0 Kudos
Message 5 of 9
(1,322 Views)

@Steffen01 wrote:

ok, thanks. It will be in c:\coolprop, so this will not change


That's only going to work if you add that path to the PATH environment variable. If the DLL is not in one of the system locations, you have to enter the full path to it and then the Application Builder will copy the DLL into the executable directory. If you add that path to the PATH environment variable, you can only enter the DLL name itself without any path. LabVIEW will then assume that the DLL is present on every target system in a system location and will not add it to the executable build.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 9
(1,319 Views)

so the easiest way is to put the dll in one fixed location and inside the vi either link it to that dll or provide a user input. Its only for the testrig PC anyway, so no need to worry about other installations

0 Kudos
Message 7 of 9
(1,316 Views)

@Steffen01 wrote:

 Its only for the testrig PC anyway, so no need to worry about other installations


The technician who will be told to install this cool app on that new computer they decided to buy over three years will really have to say nice things about you at that point. 😀 

It may be even you. 😁

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 9
(1,162 Views)

there is a folder with lots of .ini files in it, the .dll will live there. Occasionally the folder is backed up. Should be ok. Should be safe for a few years, the old HDD turned solid state (motor died) so the next one may live another 5 years. Who knows whos problem it will be. In the hands of payrolls essentially.

0 Kudos
Message 9 of 9
(1,144 Views)