Slow Run Time Performance of MathScript Node

Updated Sep 11, 2018

Reported In

Software

  • LabVIEW MathScript Module

Issue Details

Why does my application that contains a MathScript Node have a slow run time?

Solution

The main reason, and the one that will be discussed here, is due to warning glyphs. The warning glyph is an indicator to inform the user that LabVIEW will execute with slower run time performance and reduced error checking at edit time. To remove the warning glyph and improve run time performance, modify your script to resolve the conflicts.

The MathScript node will display a warning glyph if any of the following functions are called in your script (legacy name in parentheses):
  1. If you call addpath, pathremove (rmpath), cd, path and/or userpath with one or more inputs. This will cause slow run time performance because these functions change the search path list at run-time.
  2. If you call the functions break, continue, clear, eval, evalscript (evalc), exist, global, is_global (isglobal), is_member (isa), load, loaddialog (uiload), persistent, return, save, who or who_all (whos).
The MathScript Node will also display a warning glyph for the following two situations:
  1. Your script references a .m file that contains a script rather than a user-defined function. Either copy the contents of your .m file and use them in the node or edit the .m file to be a user-defined function.
  2. Your script calls a user-defined function with one of the functions listed above. To identify the .m file that is causing this warning glyph, select View»Hierarchy
Another thing to keep in mind is if your script has a warning glyph, it must be resolved before you can create a working stand-alone application to work in the LabVIEW Run-Time Engine or on a Real-Time target.

Additional Information

MATLAB® is a registered trademark of The MathWorks, Inc. 

WAS THIS ARTICLE HELPFUL?

Not Helpful