From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Python node complex data type

Solved!
Go to solution

I am trying to send a complex python list to my LabVIEW code, but it seems like complex arrays (Complex - extended, double or single) are not accepted to the return type terminal of the Python node. Is the complex data type supported by the Python node? 

Extended precision and fixed-point types also cannot be connected.

 

All other data types (double,int and unsigned) are accepted as return types.

 

Any help would be appreciated.

0 Kudos
Message 1 of 3
(1,751 Views)
Solution
Accepted by topic author JJ01

The only supported data types for passing data between the Python node and LabVIEW are numerics and strings as well as clusters and arrays of these types. Complex data types are not supported as I believe they are implemented in quite different ways in LabVIEW vs Python. 

To get around this I would recommend having a function that converts from complex data into a string in your Python code and pass this out.  You would then need some LabVIEW code such as the example here: String to Complex Number, to convert back from the string to the complex LabVIEW type. 

Message 2 of 3
(1,655 Views)

Thank for your reply. I will try a complex to string conversion.

0 Kudos
Message 3 of 3
(1,653 Views)