LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab syntax errors are not caught and reported when code is executed in a LabVIEW Matlab script node

I want to be able to catch errors that occur during the execution of Matlab code in a LabVIEW Matlab script node. According to my understanding of the documentation, errors of this type should be available at the "error out" signal point on the Matlab script node. I have noticed that even deliberately generating matlab syntax errors will not produce an error output. See the attached vi for an example.
0 Kudos
Message 1 of 4
(2,875 Views)
I ran your example VI and the is what I got in the Error Out cluster:

"Code 1050

Error occured while executing script. Error message from server: ??? This is an error

. in matlab[1].vi"

If you are generating custom error messages in Matlab I would suggest passing them back to LabVIEW through output variables in the script node.

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 2 of 4
(2,875 Views)
Thanks for the response. The behavior that you observed is the behavior that expected to observe but didn't. Do you have any suggestions for how I might go about debugging this problem? When I run this VI, there is no output to the error cluster.

Thanks,
Jacob
0 Kudos
Message 3 of 4
(2,875 Views)
I basically have the same question. Matlab does not have these as variables per se and the message from Labview is essentially useless. Problem is that the messages which typically get sent to Matlab Command Window are suppressed. How to port them into Labview or to unsuppress them in Matlab Command Window would be invaluable to debuggin Matlab script being used by Labview.
0 Kudos
Message 4 of 4
(2,875 Views)