From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-22-2004 08:17 AM
06-25-2004 12:25 PM
06-26-2004 12:42 PM
06-28-2004 02:28 AM
06-28-2004 07:56 AM
06-28-2004 09:28 AM
06-28-2004 01:40 PM
07-12-2010 11:48 AM
I am not able to use sprintf(), fprintf(), or disp() commands in the MATLAB command window, however there is an undocumented feature (or a bug) that allows the input() command to display to the MATLAB command window, _only_ once one input has been accept (for which there was no prompt). In other words, if you have a program with two calls to the input() command (from inside LabVIEW's MATLAB Scripting Node), the _first_ call to input() will show no output, but it will wait for your input at the MATLAB command window. After you enter something, the _second_ call to input() will display its message. All subsequent calls to input() will also display their prompt.
The attached code demonstrates the above. This bug in the MathScript node has two features in my mind: 1) it allows the user to enter information at the MATLAB command window, and 2) if you are content to hit "enter" every time, it will print debug messages to the MATLAB window.
A possible alternate workaround is to have MATLAB pop up a figure window, which you can than print text to, or put buttons or string/number inputs on.
07-12-2010 04:24 PM
The code in the above attachment only appears to run in my LabVIEW 2009 with MATLAB 2009a computer. I tried it today on a LabVIEW 2009 SP1 machine with a newer version (I'm not sure which) version of LabVIEW with no success. Sorry for any false hopes!
08-25-2016 07:51 AM
It would be nice to have this capability for debugging but I haven't found a work around either.