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

LabVIEW MathScript Window

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Requires: MathScript RT Module

Select Tools»MathScript Window to display this window.

Use this window to edit and execute mathematical commands, create mathematical scripts, and view numerical and graphical representations of variables. This window generates output from and maintains a history of commands that you call, lists variables that you define, and displays variables that you select. The LabVIEW MathScript Window is able to process files you create using the current LabVIEW MathScript syntax and, for backwards compatibility, files you created using legacy MathScript syntaxes. The LabVIEW MathScript Window also can process certain of your files that use other text-based syntaxes, such as files you created using the MATLAB® software. Because the MathScript RT Module engine is used to process scripts in the LabVIEW MathScript Window, and because the MathScript RT Module engine does not support all syntaxes, not all existing text-based scripts are supported. Scripts you run in the LabVIEW MathScript Window can generate errors.

You can save scripts you create in the LabVIEW MathScript Window or load scripts from a file into the LabVIEW MathScript Window. You also can save and load data files.

You can display several types of help content for the LabVIEW MathScript Window by calling different help commands.

Use the application instance name that appears in the bottom left corner of the LabVIEW MathScript Window to identify which application instance the LabVIEW MathScript Window belongs to. The application instance name includes the project name followed by the target name, such as Project 1.lvproj/My Computer.

Note  The MathScript Node and the LabVIEW MathScript Window can communicate only if they are in the same application instance.

You can resize individual sections of the LabVIEW MathScript Window, such as the Command Window and the Output Window. To resize a section, move the splitter bar located between the two sections you want to resize.

Use the LabVIEW MathScript Properties dialog box to configure settings for the LabVIEW MathScript Window.

This window includes the following components:

  • Output Window—Displays the commands you enter in the Command Window and the output that MathScript generates from those commands.
  • Command Window—Specifies the MathScript command you want LabVIEW to execute. Press the <Shift-Enter> keys to enter multi-line commands. You also can use the up and down arrow keys to display Command History items in the Command Window which you can edit or execute again.
  • Application Instance—Indicates the current application instance.
  • Status—Displays the status of the compilation while MathScript processes the script or commands you executed.
  • Variables—Displays a list of all variables you define and previews variables that you select. This page includes the following components:
    • Variable List—Displays the name, value or dimension, and data type of all variables you define. The Variable List sorts the global and local variables and displays them alphabetically by name. Select a variable in the Variable List to view it in the Preview Pane. Double-click a variable in the Variable List to display the value in the Output Window. Use the <Shift> and <Ctrl> keys to select multiple variables. You can display multiple one-dimensional variables on the same graph in the Preview Pane. This list includes the following components:
      • Partition/Variable—Displays the variable name and whether the variable is a global or a local variable. Use global variables with the global function to access and pass data between the LabVIEW MathScript Window and a MathScript Node or between two MathScript Nodes. Use local variables to access data within only the LabVIEW MathScript Window or only a MathScript Node.
      • Data—Displays the value of the corresponding variable. If the value is too long to display, LabVIEW displays the dimension of the variable.
      • Type—Displays the data type of the corresponding variable.
    • Graphical first—Specifies whether to display first the numerical or graphical representation of variables in the Preview Pane. You can view only the numerical representation of scalar variables.
    • Display Type—Specifies the format in which to display the selected variable in the Preview Pane. Display Type does not appear if you select a scalar variable. If you select multiple variables, Display Type lists only those formats that can display all the variables you select. This list can contain the following options:
      • Numeric—Displays the data in an array. You can edit a variable in the Preview Pane when Display Type is Numeric.
      • String—Displays the data in a character array. You can edit a variable in the Preview Pane when Display Type is String.
      • Graph—Displays the data on a waveform graph. This Display Type represents complex variables with two points, one for the real part and one for the imaginary part.
      • XY Graph—Displays the data on an XY graph. You can plot two one-dimensional variables against each other using this Display Type. You also can use this Display Type to plot the real parts of complex variables against their imaginary parts.
      • Sound—Plays the data as a sound. You can use this Display Type only for one-dimensional variables.
      • Surface—Displays the data on a 3D surface graph.
      • Picture—Displays the data on an intensity graph.
    • Preview Pane—Displays a preview of the data type you select from the Display Type pull-down menu. Right-click the Preview Pane and select Undock Window from the shortcut menu to display the variable in a separate window that you can resize.

      Multiple Preview Pane windows that display a common variable update automatically when you edit that variable. If you display the variable in graphical format, you can right-click the graph and customize it using the shortcut menu items. You also can export data to a text or spreadsheet program.

      Click the Update button to synchronize the value of the variable you select from the Variable List with the value at any location where the variable appears in MathScript, including outside the LabVIEW MathScript Window. For example, if in the Preview Pane you change the value of a global variable that you also use in a MathScript Node, or vice versa, you pass the updated value to the other location when you click the button.
  • Script—Displays the script you create on the Script Editor page.
  • History—Displays a history of the commands you executed. This page includes the following component:
    • Command History—Lists all previous commands you entered in the Command Window. Double-click an item in the Command History list or select the item and press the <Enter> key to execute the command again. Use the <Shift> and <Ctrl> keys to select multiple commands. You also can drag and drop commands from the Command History list to the Command Window or to a floating Script Editor window.

 

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