Is it possible to have more than one output from the Python Node in LabVIEW? There is only one "Return Value" terminal and then the rest are "Output Parameter" terminals which are just for returning the amended value of the corresponding input parameter as I understand it. Could I return an array from Python and then split this array to be displayed on individual indicators in LabVIEW? How exactly would I go about doing this?
Thanks in advance!
Solved! Go to Solution.
You can return a list of the same data type from Python as an array in LabVIEW. Does that satisfy your requirements?
Here's an example (modified from my previous example in another post):
Yes thanks this is perfect! What's the easiest way to split the values of the 1D array back into the individual components of the array?
Hello, did you install the numpy in your Python? In my case, even i didn't import numpy, just install it in Python, an array cannot be returned from the Python node.
In the examples here, I was returning a Python List, not an array. I haven't tried with Numpy arrays, but there is a message here (from the makers of the Python toolkit, which has been somewhat replaced) suggesting a workaround.