Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RefProp Manager in LabVIEW #10

Open
TommasoMigliorini opened this issue Jun 8, 2022 · 10 comments
Open

RefProp Manager in LabVIEW #10

TommasoMigliorini opened this issue Jun 8, 2022 · 10 comments

Comments

@TommasoMigliorini
Copy link

I am trying to use the RefPROP Manager.
I compiled the 32bit dll and am trying to use it in LabVIEW.
If I understand correctly, the technique involves creating a handle to pass to the various calls of the dll.
For this reason I created two vi's, one to create the handle and one to destroy it.
The handle number seems to increase but the LabVIEW call keeps giving errors, can you help me?

RefPROP Manager.zip

@ianhbell
Copy link
Collaborator

ianhbell commented Jun 8, 2022

Why are you trying to use the refprop manager? It is for an advanced use case of multiple shared libraries loaded in memory

@TommasoMigliorini
Copy link
Author

Mainly for 2 reasons:

  • Using various gas compositions and merging the elements into a single gas composition it is normal for me to exceed the number of 20 elements
  • I have many calculations to perform and I would like to perform them, at least in part, in parallel

@ianhbell
Copy link
Collaborator

ianhbell commented Jun 8, 2022

First make sure you can do that in C++ or Python, or a similar environment. Labview integration should be tested only after.

@ianhbell
Copy link
Collaborator

ianhbell commented Jun 8, 2022

Your use case makes sense for the manager. What OS are you on?

@TommasoMigliorini
Copy link
Author

Windows 10 64 bit, with 32 bit exe

@ianhbell
Copy link
Collaborator

ianhbell commented Jun 8, 2022

Why 32-bit? That's another wrinkle of complications with symbol mangling

@TommasoMigliorini
Copy link
Author

In my application there are some other dll only 32 bit..

@ianhbell
Copy link
Collaborator

ianhbell commented Jun 8, 2022

Ugh, and you can't update them?

My recommendation stands: first test in C++ or Python, then Labview.

@TommasoMigliorini
Copy link
Author

We tried both 32-bit and 64-bit and immediately it works (in 32-bit we have an error in creating the handle but it doesn't create problems).
We then started the system with a configuration that we usually use on our construction sites.
The configuration foresees 25 calls to the dll for each calculation cycle, the calculation occurs every 500ms. The application crashes between 2 and 4 hours after it is launched, whether it is 32-bit or 64-bit.
So in the best case we get to around 700,000 calls.
We tried to decrease the number of calls to the dll per calculation cycle and to calculate at larger intervals (every 2 seconds). The duration of the application increases, the total number of calls to the dll remains the same.

Immagine crash RefProp

@ianhbell
Copy link
Collaborator

Please try your example in C++ or python to try to nail down where the problem is. I have no prayer of debugging with the given information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants