Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Importing or Exporting Scripts

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

If you already have a script written in the LabVIEW MathScript syntax, the MATLAB® language syntax, or the Xmath syntax, you can import it into LabVIEW. You also can save a script written in LabVIEW to a text file.

Complete the following steps to import a script into a script node in LabVIEW.

  1. Select a MathScript Node, a MATLAB script node, or an Xmath Script Node and drag out a region to place the script node on the block diagram.
    • MathScript Node



    • MATLAB script node



    • Xmath Script Node



Note  You can create script nodes only in the LabVIEW Full and Professional Development Systems. If a VI contains a script node, you can run the VI in all LabVIEW packages.
  1. Right-click the script node and select Import from the shortcut menu to display a file dialog box.
  2. Select the file you want to import and click the OK button. The script text appears in the node.

Complete the following steps to save a script to a text file.

  1. Right-click the MathScript Node, MATLAB script node, or Xmath Script Node and select Export from the shortcut menu to display a file dialog box.
  2. Enter the name to use for the text file or select a file to overwrite.
  3. Click the OK button.
  4. Open the script in the LabVIEW MathScript Window, the MATLAB software, or the Xmath software.

MathScripts, scripts written in the MATLAB language syntax, and Xmath scripts are text files. Although text files usually have a .txt extension, MathScript, like the MATLAB software and other mathematics software, processes scripts with a .m extension, and the Xmath software uses a .ms extension.


Resources


 

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