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

Adding a LabVIEW MathScript Node to a VI (MathScript RT Module)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Complete the following steps to create and run a VI that uses a LabVIEW MathScript.

  1. Add a MathScript Node to the block diagram.

  2. Use the Operating or Labeling tool to enter the following script in the MathScript Node:

    a = rand(50, 1)

    plot(a)
  3. Add an output to the MathScript Node and create an indicator for the output.
    1. Right-click the right side of the MathScript Node frame and select Add Output»a from the shortcut menu.
    2. Right-click the a output terminal and select Choose Data Type»All Types»Matrix»Real Matrix from the shortcut menu to configure the data type of the terminal.
    3. Right-click the a output terminal and select Create»Indicator from the shortcut menu to create a matrix indicator labeled a.
  4. Right-click the error out output terminal and select Create»Indicator from the shortcut menu to create an error out indicator.
  5. Run the VI. LabVIEW invokes the MathScript RT Module server, creates a vector of random values, plots that information to a graph, and displays the values that make up the vector in the Real Matrix front panel indicator.
  6. (Optional) Debug the MathScript.

You can display a scroll bar within a MathScript Node.

You also can enable or disable script highlighting for a MathScript Node.


 

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