Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Cannot Run MathScript Function or User-Defined Script

Primary Software: LabVIEW Development Systems>>LabVIEW Professional Development System
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
When I call a function or script stored in a file from a LabVIEW MathScript Node or MathScript Window, why does LabVIEW return an error?

The error from the MathScript Node is: MathScript Node: A syntax or semantic error has occurred.

The Details of the error are: Unknown symbol on line n: function_name.

The error from the MathScript Window is: Unknown symbol on line n: function_name.



Solution:
By default, LabVIEW only looks for .m files in C:\Documents and Settings\....\My Documents\LabVIEW Data, where .... corresponds to the currently logged in account name.

To direct LabVIEW to look for the .m file outside of the LabVIEW Data directory, you must change the default search path list for the MathScript Node or Window.

To change the default search path for the MathScript Window, from LabVIEW » Tools » Options... » MathScript Search Paths..

To change the default search path for the MathScript Node, from the MathScript Window » File » LabVIEW MathScript Properties » MathScript: Search Paths.

Click the Add Folder icon (circled red) to add a folder to the search path.  Click the Add Recursive icon (squared blue) to add a folder and its subfolders to the search path.


A file browser box appears.  Navigate into the desired folder and select Current Folder from the file browser.  Click OK to exit the Options box and return to the block diagram or MathScript Window.



Related Links:
LabVIEW 8.6 Help: MathScript: Search Paths Options Page

Attachments:





Report Date: 10/21/2008
Last Updated: 11/26/2008
Document ID: 4QKESEYP

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit