LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call DLL which has user-defined types

Solved!
Go to solution

Its a c++ templete class.  This I know for sure.  Not to be confused with the c++ complex (not templete) class.

 

From the header file I have:

 

typedef struct _C_double_complex
 { /* double complex */
 double _Val[2];
 } _C_double_complex;

 

So it looks like its a struct, who has a 2 element double array....maaaaaaaaaybe.

0 Kudos
Message 11 of 14
(683 Views)

Hmmm, LabVIEW does have Complex Double data type. Maybe I can do something with that. The guy who wrote the DLL says that the complex is a number with real and imaginary parts. I'll have try it both ways and see how it goes or doesn't go.

 

Thanks for all the help.

 

 

 

 

 

0 Kudos
Message 12 of 14
(677 Views)

LabVIEW stores complex numbers indeed as two floating points besides each other. This does resemble the C++ template you did show earlier and I think it is a save bet that this should work at least memory wise. But real and imaginary part may be switched between LabVIEW and your C++ template. Only trial and error will show.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 13 of 14
(673 Views)

Just wanted to update this thread with news that I had success configuring the Call Library Function Node input parameter to Type = Adapt to Type and Data format = Array Data Pointer for the complex number array.

Just in case anyone else encounters this in their work.

 

 

The DLL was compiled with Microsoft Visual Studio .NET 2003.

 

 

 

 

0 Kudos
Message 14 of 14
(659 Views)