02-20-2020 02:51 PM
My python node takes a bunch of inputs and calculates a 20x20 array, a boolean and double value. How can I return all these items at once? I can only see the option for one output!
Thanks
02-20-2020 03:41 PM
To the best of my memory, you have to return a delimited list and then post process in your LabVIEW vi to separate the results.
02-20-2020 03:51 PM
Better yet would be to return a JSON formatted result. You can define the correct cluster definition and use the Unflatten JSON VI to parse the data.
02-20-2020 03:54 PM
Or even better yet, attach your VI that has everything in it including the Python script you run. NO SCREEN CAPTURES.
02-20-2020 04:12 PM
Thank you all for the quick replies. It seems like ill need to do additional processing in any case. Is it possible to have multiple outputs in a MATLAB script node? I would prefer to use that then
02-26-2020 10:39 AM
Why not just use the mathematical functions right in LabVIEW? Is there a reason to have the MATLAB script?
06-09-2023 03:45 PM
Eric,
there are many good reasons to call a matlab functions in labview, this comment is unhelpful
rpdp: see the documentation for the call matlab function https://www.ni.com/docs/en-US/bundle/labview/page/glang/run_matlab_function.html
It is possible to receive multiple values from the call matlab subvi, but you have to tell it what type it should expect from the matlab function. For example, if you have an array, you need to initialize an array prior to calling the matlab function. For multiple variables, you use a cluster
06-12-2023 10:31 AM
I disagree on using the MatLab functions and I strongly disagree that this isn't helpful.
I find that users, more likely than not, don't need to use the matlab functions. It's usually just simple Algebra that users have leaned on MatLab to get the answer and think they need to use those functions. There hasn't been much need for me, as I can only lean on my own experience, to use ANY third-party functions that LabVIEW can't do natively. And, even if I think I do, there are many brilliant people here that can assist with usually any kind of mathematical (or non-math) help and try to steer users away from third-party software for functions unless it is absolutely necesary.
06-12-2023 10:38 AM
@Eric1977 wrote:
I disagree on using the MatLab functions and I strongly disagree that this isn't helpful.
I find that users, more likely than not, don't need to use the matlab functions. It's usually just simple Algebra that users have leaned on MatLab to get the answer and think they need to use those functions. There hasn't been much need for me, as I can only lean on my own experience, to use ANY third-party functions that LabVIEW can't do natively. And, even if I think I do, there are many brilliant people here that can assist with usually any kind of mathematical (or non-math) help and try to steer users away from third-party software for functions unless it is absolutely necesary.
I also agree with Eric on this.
06-12-2023 10:38 AM
labview has this functionality though, and this is what the question was asking. It was well posed as well, asking about a specific function of a specific feature of labview.