Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Debugging MathScripts (MathScript RT Module)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

If a MathScript Node causes a VI to be broken, or nonexecutable, or if a VI is not broken but you get unexpected data, you can use several techniques to identify and correct problems with the script. To debug a script in a MathScript Node, use the following tools in addition to general techniques for debugging scripts.

Error Checking

Verify that a red glyph does not appear in the gray region on the left side of the MathScript Node. This glyph indicates that the associated line of script contains an error.

Syntax Highlighting

Enable a type of script highlighting, which uses colors and font attributes to distinguish between different parts of a script. If a variable or user-defined function overrides a built-in MathScript function, syntax highlighting colors that script element as a variable or user-defined function instead of a built-in function. Data type highlighting allows you to see when the script redefines a variable from one data type to another.

Execution Highlighting

Use execution highlighting to see which line of script is executing currently. Execution highlighting shows the progression from one line of script to another using a blue arrow that blinks next to the line that is executing.

Single-Stepping

Single-step through the script to view each action of the script. If the VI contains a MathScript Node, a blue arrow blinks next to lines of script to indicate they are ready to execute.

Probe Tool

Use the LabVIEW MathScript probe to view the data in your script in a MathScript Node as a VI runs. Right-click a MathScript Node and select Probe from the shortcut menu to use the MathScript probe. You also can use the Probe tool to click a MathScript Node and display the LabVIEW MathScript Probe window.

Unlike with supplied probes, you cannot configure the MathScript probe to respond to the data. For example, you cannot specify that you want to set a conditional breakpoint.

Breakpoints

Use breakpoints to pause execution, so you can single-step or insert probes. The following illustration shows a breakpoint on a line of script in a MathScript Node. The VI pauses before the line of script executes. A red bullet next to the line of script highlights the breakpoint.

Context Help

Click outside a MathScript Node and then move the cursor over a variable in the script to display the data type of the variable in the Context Help window.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit