LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Complex number datatype in COM

I am unable pass complex numbers to LabVIEW via its COM interface (LabVIEW.VirtualInstrument.Call) from Python using the win32com COM client.

 

When LabVIEW returns complex numbers my client sees them as a tuple consisting of the real and imaginary components. However, when I make COM call to LabVIEW with tuple as the argument I get a COM type error. If I use Python's complex datatype instead, COM seems happy but then LabVIEW returns a type error.

 

As I understand it, COM doesn't have a "complex" datatype, so the issue is how LabVIEW expects complex numbers to be represented in terms of COM types.

 

Can anybody help?

0 Kudos
Message 1 of 2
(2,455 Views)

Would it help to convert it to a string while passing between Python and LabVIEW?

Then you can typecast it accordingly in each environment.

Cory K
0 Kudos
Message 2 of 2
(2,439 Views)