DIAdem Help

Content Type
Programming Language
Current manual

Define MathScript

Define MathScript

Use this dialog box to define the execution of a MathScript in DIAdem.

Note The page MathScript describes how you can create a MathScript menu in DIAdem ANALYSIS.

Settings

Name Specifies the name of the MathScript.
Script Editor Enter your MathScript in this field.

First test the MathScript in LabVIEW, because DIAdem contains only limited error search capabilities. To test MathScripts select Tools»MathScript Window in LabVIEW and refer to the help menu for information about the MathScript syntax.

Define input: Name Specifies the names of the inputs.
Define input: Data Type Specifies the types of the inputs. You can define numeric inputs and text inputs. You can select single values, vectors, or matrices. Enter single values directly into the dialog box Execute MathScript, select single channels for vectors, and select several channels for matrices.
Add new input Adds a new input. You can specify up to six inputs.
Delete last input Deletes the last entry in the input definitions.
Define results: Name Specifies the names of the results.
Define results: Data Type Specifies the result types. DIAdem saves the single value results as a default group property. DIAdem saves the result vector in a single channel and a result matrix in several channels, in the default group. DIAdem assigns the result names defined in the MathScript to all results.
New result definition Adds a new result definition. You can specify up to six results.
Delete last result definition Deletes the last entry in the result definitions.

Result

DIAdem saves the single value results as a default group property. If no group exists, DIAdem creates the group MathScript_Results. DIAdem saves the result vector in a single channel and a result matrix in several channels, in the default group. DIAdem assigns the result names defined in the MathScript to all results. The following example shows the connection between the MathScript data types and DIAdem data types.

MathScript DIAdem
NumericNumerical single value. You enter input values directly into the Execute MathScript dialog box. DIAdem saves the result values as a default group property.
TextSingle text. You enter input values directly into the Execute MathScript dialog box. DIAdem saves the result values as a default group property.
1-D Array NumericNumeric channel. You select input channels in the dialog box Execute MathScript. DIAdem saves the result channels in the default group.
1-D Array TextText channel. You select input channels in the dialog box Execute MathScript. DIAdem saves the result channels in the default group.
Matrix NumericSeveral numeric channels. You select input channels in the dialog box Execute MathScript. DIAdem saves the result channels in the default group.
Matrix TextSeveral text channels. You select input channels in the dialog box Execute MathScript. DIAdem saves the result channels in the default group.

 

Note  When you create or modify a MathScript, DIAdem creates a compiled LabVIEW VI that has the same name as the MathScript and is preceded by the text DIAdem_MathScript_, on the SCRIPT user path. DIAdem also creates a VBS script that has the same name as the MathScript, preceded by the text DIAdem_MathScript_. This script contains a sub-procedure that calls the MathScript. You can use this procedure as the basis for integrating the MathScript into your own VBS scripts. Note that DIAdem automatically updates the generated VBS script every time the MathScript is modified and overwrites modifications without a confirmation prompt.
Note  DIAdem saves the scripts and definitions on the SCRIPT user path with the filename extension .msc and the name of the MathScript. These MSC files also specify the names of the entries in the MathScript menu.
Note  If you want to change the MathScript collection in DIAdem, you must change the SCRIPT user path and click Refresh in the User commands dialog box.

Further Settings

Create MathScript Menu | Define MathScript | Execute MathScript

Was this information helpful?