From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW 2012 MathScript RT Module Readme

Version 12.0


June 2012


This file contains important information about the LabVIEW 2012 MathScript RT Module, including installation instructions, new features, and known issues.


Overview

System Requirements

Installation Instructions

   Windows

   Mac OS X

   Linux

New Features

Known Issues

Bug Fixes

Accessing the Help

Finding Examples

Automating the Installation of NI Products


Overview

LabVIEW MathScript is a text-based environment you can use to write functions and scripts. You can process scripts using LabVIEW MathScript in the LabVIEW MathScript Window or a MathScript Node.


Use the LabVIEW MathScript Window to edit and execute mathematical commands, create mathematical scripts, and view numerical and graphical representations of variables. Select Tools»MathScript Window to display this window.


Use the MathScript Node to execute your LabVIEW MathScripts and other text-based scripts on the block diagram using the MathScript RT Module engine. You can save scripts that you create in the LabVIEW MathScript Window and load them in the MathScript Node and vice versa.


System Requirements

In addition to the system requirements for the LabVIEW Development System, the MathScript RT Module has the following requirements:


  • LabVIEW 2012 Full or Professional Development System (32-bit)
  • At least 500 MB of disk space

Refer to the LabVIEW Readme file in the labview directory for additional system requirements and supported operating systems for LabVIEW 2012.


Installation Instructions

Complete the following steps to install the MathScript RT Module.


Windows

You can install all of your LabVIEW products—including the MathScript RT Module—using the LabVIEW 2012 Platform DVDs. Refer to the LabVIEW Installation Guide on the LabVIEW Platform DVD 1 for installation instructions and system requirements.


To request additional LabVIEW Platform DVDs, refer to the National Instruments website.


Note: If you purchased this product with an NI Software Suite or NI Product Bundle, use the installation media that shipped with your purchase to install this product.


Mac OS X

Complete the following steps to install the LabVIEW MathScript RT Module on Mac OS X.


  1. Insert the LabVIEW MathScript RT Module installation CD and open LabVIEW MathScript 2012.mpkg from the Mac OS X subdirectory.
  2. Follow the instructions that appear on the screen.

Delete the following files or directories on the computer to manually uninstall the LabVIEW MathScript RT Module on Mac OS X:


  • /Applications/National Instruments/LabVIEW 2012/resource/mathscript.rsc
  • /Applications/National Instruments/LabVIEW 2012/examples/MathScript/
  • /Applications/National Instruments/LabVIEW 2012/vi.lib/imath/
  • /Applications/National Instruments/LabVIEW 2012/vi.lib/imathl/
  • /Library/Caches/National Instruments/InstCache/12.0/
  • ~/Documents/LabVIEW Data/MathScriptVIs/
  • /Library/Application Support/National Instruments/example finder/1.0/products/labview/12.0/exbins/english/lvexmscript.bin4

Linux

Complete the following steps to install the LabVIEW MathScript RT Module on Linux.


  1. Log into the system as root.
  2. Insert the LabVIEW MathScript RT Module installation CD. Use mount /mnt/cdrom to mount the CD. On some systems, the CD mounts automatically.
  3. To change the current directory to the mounted CD, enter the following command:

    cd /mnt/cdrom/Linux
  4. To run the installation script, enter the following command:

    sh ./INSTALL

    If you encounter the message bad interpreter: Permission denied, the CD might not have mounted with executable permissions. To correct this issue, enter the following command:

    /bin/sh ./INSTALL

To run a script that uninstalls the MathScript RT Module on Linux, enter the following command:

sh ./UNINSTALL


New Features

The LabVIEW 2012 MathScript RT Module introduces the following enhancements and changes.


MathScript Support for Cell Arrays

In the LabVIEW 2012 MathScript RT Module, you can organize data with different types and sizes in a single variable for use in the LabVIEW MathScript Window or the MathScript Node. Every cell in a cell array can store data with a different type and size than the data in the other cells in the cell array. Refer to the MathScript RT Module»Organizing Data with Different Types and Sizes in Variables topic on the Contents tab of the LabVIEW Help for more information about cell arrays.


When you pass a 1D array of strings from the block diagram into a MathScript Node, by default, MathScript pads the strings with spaces until all the strings are the same length as the longest string. In the LabVIEW 2012 MathScript RT Module, you can pass a 1D array of strings into a MathScript Node and right-click the input terminal on the node to select String Representation»Cell Array. When you specify to use cell arrays, MathScript maintains the length of each string in the array without adding any spaces. Refer to the MathScript RT Module»Using MathScript Nodes»Debugging MathScripts»Passing Data in and out of the MathScript Node topic on the Contents tab of the LabVIEW Help for more information about passing cell arrays, and other data types, in and out of the MathScript Node.


New MathScript Functions

The MathScript RT Module 2012 includes the following new functions. You can use these functions in the LabVIEW MathScript Window or a MathScript Node.


  • The cells class contains cell and is_cell.
  • The structs class contains getfieldnames and order_fields.

Refer to MathScript RT Module»MathScript RT Module Functions book on the Contents tab of the LabVIEW Help for more information about built-in MathScript functions.


MathScript Function Change

The expm1 function computes the base e exponential of the input elements minus 1.


Known Issues

You can access the software and documentation known issues list online. Refer to the National Instruments website for an up-to-date list of known issues in the MathScript RT Module.


Bug Fixes

The following items are the IDs and titles of a subset of issues fixed in the LabVIEW 2012 MathScript RT Module. This is not an exhaustive list of issues fixed in the current version of the MathScript RT Module. If you have a CAR ID, you can search this list to validate the issue has been fixed.


ID Fixed Issue
242487 Cannot drag multiple variables between local and global categories
253318 The ode_bdf15 function takes too long to execute
279449 Save All also tries to save the plot window generated by the plot function
281000 LabVIEW MathScript hangs when loading a script with a large model
309671 MathScript does not handle an enum inside of a struct correctly when passed into a MathScript Node
336366 Assigning an empty matrix to a field of a structure returns error -90042 for an array of structures

Accessing the Help

Refer to the MathScript RT Module book on the Contents tab of the LabVIEW Help for more information about the MathScript RT Module.


Finding Examples

Refer to the labview\examples\MathScript directory for LabVIEW examples for the MathScript RT Module. You can modify an example VI to fit an application, or you can copy and paste from one or more examples into a VI that you create.


Automating the Installation of NI Products

You can automate the installation of most NI products using command-line arguments to suppress some or all of the installer user interface and dialog boxes. However, starting with the August 2012 releases (products using NI Installers version 3.1 or later), you may need to perform additional steps before or during a silent installation of NI software.


If the NI product you are installing uses Microsoft .NET 4.0, the .NET installer may run before any NI software installs and may require a reboot before the installation of NI software begins. To avoid a .NET reboot, install .NET 4.0 separately before you install NI software.


For more information, refer to the following KnowledgeBase articles:


Important Information

Copyright


© 2009–2012 National Instruments. All rights reserved.


Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.


National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.


End-User License Agreements and Third-Party Legal Notices


For end-user license agreements (EULAs) and copyright notices, conditions, and disclaimers, including information regarding certain third-party components used in LabVIEW, refer to the Copyright topic of the LabVIEW Help.


Trademarks


LabVIEW, National Instruments, NI, ni.com, the National Instruments corporate logo, and the Eagle logo are trademarks of National Instruments Corporation. Refer to the Trademark Information at ni.com/trademarks for other National Instruments trademarks.


Other product and company names mentioned herein are trademarks or trade names of their respective companies.


Patents


For patents covering the National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents.