LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a C DLL with complex numbers from Labview

Solved!
Go to solution

Hi,

 

   So I'd like to try to use some existing C99 code to do calculations, and for the functions, the code accepts and returns numbers of the "double complex" type.   I've already spent half the day finding out the hard way that Visual Studio doesn't include the complex.h header, so before spending any more time trying to compile a DLL, does Labview actually even allow you to send and recieve complex numbers from a DLL call?

 

 

   When I open the Call Library Function node and go to Parameters, the closest return type I see is 8-byte double, but nothing about complex...  so..   I'm not even convinced that this will work..  has anyone done this before?

 

Thanks

NI Hardware: PXI-7853R, PCI-5122, PCI-6733, PXI-1036, PCI-MIO-16E-4, PCI-6110
Computer Hardware: Xeon Quad Core - 2.33 Ghz, 8 GB RAM
Software: Labview 2009, Labview FPGA 2009, Vista 64-bit, MAX 4.6, DAQmx 9.0, NI-SCOPE 3.5
0 Kudos
Message 1 of 2
(2,554 Views)
Solution
Accepted by topic author noli
Yes, you can use complex numbers. See the example that ships with LabVIEW called appropriately "Call DLL". There's an example in there that deals with complex numbers. You may need to write a wrapper DLL, though.
0 Kudos
Message 2 of 2
(2,540 Views)