LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CALLING DLL: Labview or CVI?

I'm going to start a new project using Testand and Labview or CVI. In this project I will make a lot of calls to C++ functions packed at a DLL file. The Dll was prepared and compiled using MVC++.The function prototypes are not simple & contain structures, pointers and typdefs's.
Is it possible to call the functions from Testand,Labview,CVI?
Is it easier to call the functions from CVI compared to Labview?
Thanks,
Ofer
0 Kudos
Message 1 of 4
(2,798 Views)
For the type of DLL that you have it will be much easier and straightforward to call it from CVI rather than LabVIEW. Because all you are doing in CVI is using C to call the DLL it will propogate the data over as any other IDE would. However LabVIEW sometimes makes the structure quite complex when it imports the DLL especially when you have nested structs, pointers to structs, etc.

TestStand would use CVI code to call the DLL.
Test Engineer - CTA
0 Kudos
Message 2 of 4
(2,762 Views)


@ofer_o wrote:
I'm going to start a new project using Testand and Labview or CVI. In this project I will make a lot of calls to C++ functions packed at a DLL file. The Dll was prepared and compiled using MVC++.The function prototypes are not simple & contain structures, pointers and typdefs's.
Is it possible to call the functions from Testand,Labview,CVI?
Is it easier to call the functions from CVI compared to Labview?
Thanks,
Ofer


Jon already mentioned that CVI will be a lot easier to deal with this than LabVIEW.

BUT!!! Make sure the DLL exports standard C functions instead of C++. LabWindows CVI (and LabVIEW even more so) can only link to globally exported C functions. C++ classes are completely out of reach for both and C++ compiled global functions have both the problem of taking sometimes C++ parameter types as well as the name decoration added by the C++ compiler to all function names.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 4
(2,758 Views)

Thanks a lot for advices.

Ofer

0 Kudos
Message 4 of 4
(2,741 Views)