If you already have a script you wrote in the LabVIEW MathScript syntax or another text-based syntax, such as other .m file language syntaxes, you can import it into LabVIEW. You also can save a script from LabVIEW to a text file.
Complete the following steps to import a script into a MathScript Node or another script node in LabVIEW.
- Select a MathScript Node or another script node and drag out a region to add the script node to the block diagram.
- (MathScript RT Module) MathScript Node
- MATLAB script node
||Note You can create MATLAB script nodes only in the LabVIEW Full and Professional Development Systems. If a VI contains a MATLAB script node, you can run the VI in all LabVIEW packages. You must have a licensed copy of the MATLAB® software version 6.5 or later installed on your computer to use a MATLAB script node.
- Right-click the script node and select Import from the shortcut menu to display a file dialog box.
- 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.
- Right-click the script node and select Export from the shortcut menu to display a file dialog box.
- Enter the name to use for the text file or select a file to overwrite.
- Click the OK button.