08-15-2019 01:08 PM
I have a verity spectrometer that I want to get running with labview. Verity gave me the dll package to talk to it but I cant get it to work. I place a Call Library Function Node and then open the dll in the dialog. I go to select the Function Name drop down and there are only two functions there and neither are even in the documentation.
Maybe just an incompatible dll or something. I am attaching the file package.
08-16-2019 12:24 AM
Hi,
Based on some brief reading of the header files, the example code (TestConsole.cpp) and the documentation, I'd say that this isn't going to be very easy to use directly with LabVIEW.
The functions are all class members and even if you can get the constructor to work, it returns an object (not a pointer to an object, i.e. an address).
You could however write a wrapper DLL using C/C++ (make sure your callable functions only use C types though - no classes) and then call that from LabVIEW.
This would involve a small amount of C/C++ coding and an extra layer of indirection, but is the only way I can think of (I'm sure there are others - they just don't come to my mind right now).
I attach a partial example of a similar situation where I've written a simplified wrapper for some C DLL that controls a motor but has lots of structures that I don't want to deal with in LabVIEW. In this case, the original library is directly callable, it's just that it would require a lot of details being passed to/from LabVIEW and I lose the safety provided by a compiler in that step.
08-16-2019 11:42 AM
Yeah, thats kind of what I was expecting and was afraid of. Ill give this info to a programmer friend of mine, he might know better what to do with it, software is not my strong point.