Expression Builder

The Expression Builder is opened by pressing next to a Select Data field.  It can be used to create complex Expressions containing functions, start options, aliases, and/or valuesynchs.

The Expresssion Builder tab is used to build the expression. You can type in this window directly, press the Data Source Browse button to browse your data sources for a data value to be added to the expression, and use the Functions tab to add function(s) to the expression. Any errors (i.e., undeclared variables, mismatched parenthesis, missing function parameters) in the Expression Builder tab will be indicated in red.

The Raw Source tab can be used to view the raw source including the expression, start option, aliases, and valuesynchs.

Edits can be made on either the Expression Builder tab or the Raw Source tab. Ctrl-Z or right-click | Undo can be used to undo an edit.

Functions

Use the Functions tab to add functions to the expression. Place your cursor where you want the function to be added. Double-click on the function in the list or select the function and press the Insert Selected button. The parameters needed by the function will be shown. You will need to edit these to the desired values.

NOTE: The predefined time constants (useful as a parameter for the statistical functions where the interval parameter must be specified in nanoseconds) and the reset options (used in statistical functions with a reset) are contained in the function list for easy insertion into a function.

Start Options

Use the Start Options tab to select a start option function to be used in the expression. Once the Start Options tab has been selected, click on Function under Start Options. A drop-down arrow will appear that can be used to select one of the start option functions.

After a start option has been selected, the required parameters will be shown.

Clicking on an order_option parameter provides a drop-down arrow that can be used to select the desired order option.

Clicking on an interval parameter provides a drop-down arrow that can be used to select one of the predefined time constants. After selecting one of the predefined time constants, you can click in the edit box and modify the value. For example, you can choose nsecPerMin, and then click in the box to modify this to 30*nsecPerMin. Note that one of the predefined time constants does not have to be used. You can type in an interval directly.

All other parameters must be typed in directly.

Aliases

If a data value is used multiple times in an expression, the expression can be simplified by declaring an alias for the data value. Use the Aliases tab to declare aliase(s) to be used in the expression.

On the Aliases tab, select the New button (  ) to add an alias. Select an alias and press the Delete button () to delete an alias. Use the arrow buttons to move an alias up or down in the list. Selecting an alias and then clicking on the alias name will allow you to edit the alias name. Selecting an alias, clicking on the data value field, right-clicking, and choosing Browse… will bring up a Data Source Browser window that can be used to browse to the data value to be aliased.

Once a data value has been aliased, the alias can be used in place of the data value in the expression as shown below. The alias is inserted into the expression by typing it directly, double-clicking on the alias, or right-clicking on the alias and selecting Insert alias_name into expression.

ValueSynch

The ValueSynch function can be used to synchronize data values coming from multiple data sources so that you can display the results of a calculation on those data values in a single component.

On the ValueSynch tab, select the New button (  ) to add a data value to be synchronized. Select a value in the list and press the Delete button () to delete a data value from the ValueSynch. Use the arrow buttons to move a value up or down in the list. Selecting a value and then clicking on the variable name will allow you to edit the variable name. Selecting a value, clicking on the data value field, right-clicking, and choosing Browse… will bring up a Data Source Browser window that can be used to browse to the data value to be synchronized.

Once a data value has been added to the ValueSynch, the synchronized variable name is used in the place of the data value in the expression as shown below. The synchronized variable name is inserted into the expression by typing it directly, double-clicking on the variable, or right-clicking on the variable and selecting Insert value_sync_name into expression.