LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab Script - output in command window

Hey everyone,

 

i am trying to display variables in the matlab command window which opens when i use a Matlab script node in labview. See the attached images for a better explanation of my problem.

 

Does someone know how i produce output in this command window from a script or if it is possible at all? I know that i can type "test" in the command window by hand to get the value but this is not what i want.

 

Thanks!

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

Hi Nambu123,

 

to output values from the script node rightclick on the frame and click add output. Afterwards enter the name of the variable in order to have the value available at the output.

 

This configuration of the node can't be done programatically.

 

May I ask what you want to achieve with automated Outputcreation?

regards

0 Kudos
Message 2 of 3
(3,460 Views)

This is not the answer to the question.

 

When you use a matlab script node, a matlab command window opens alongside labview.  There are some important things that you need to do there like use "clear function" to update changes to your matlab code.  The question from the O.P. is how can we get the matlab code to display output into that window? For example using the matlab "disp()" function as he shows in the attached image.

 

The reason we need to do this is so that Matlab can display internal variables in the middle of execution for monitoring or debugging purposes.  For example, I am having issues with handling microsecond precision datetime variables in the middle of the matlab code and I'd like to see what they are at that point in the code.

 

This is an important question.  I DO NOT use NI MathScript for many reasons and a big one being that it does not handle object oriented matlab so please, don't even begin to suggest I use it.

 

At this point I'm thinking I will need matlab to open a separate dialog box, you can have it launch figures so I assume it can also launch dialog boxes, but simply outputting to the console would be much, much easier and work just like it does when I run the same code from my matlab test scripts.

 

-Allen

0 Kudos
Message 3 of 3
(2,756 Views)