String expressions overview. |
|
Supported string substitution for data items. |
|
String substitution limitations. |
String Expressions overview
There are two types of expressions that you can use in selected data item fields.
Expression Type |
At the Object Level the |
Substitution strategy in a field that takes string entries is very similar to the use of variables in CimEdit expressions. You, the class developer, enter a string variable in a data item field. A string value is substituted at the object level. The type of string you use and where you use it determines whether it can be edited in the Point Properties dialog box at the object level. You enter string expressions in fields that accept non-numeric characters, e.g. the Description field or fields that require point ID's. |
|
|
You can configure data items to include a subset of expressions based on simple expression processing. Expressions can be used to set the value of a data item attribute.
You can incorporate simple string substitution in data item fields that use character strings. You enter a class attribute as a variable in a string expression in the edit field when you configure the data item.
Available variables include:
All class attributes are available as variables. You can define your own variables, or you can use the CIMPLICITY attributes.
CIMPLICITY predefined variables, which are:
$OBJECT |
Object ID, e.g. \TANK1. |
$ID |
ID of the data item, e.g. \LEVEL. |
$CLASS |
Class ID, e.g. \GefTank. |
Use brackets {} to enclose variable values. (Brackets are also used for variables in CimEdit.)
Supported string substitution for data items
String substitution is supported for the following data item attributes, which you enter in the associated Data Item dialog box field.
For |
Attribute Supporting String Substitution |
All Data Items |
Description Safety Point Screen Availability Trigger Measurement Units Label |
Derived Data Items |
Expression Reset Point |
Device Data Items |
Address Device ID |
Point Alarm Data Items |
Alarm Message Alarm Class Deviation Point |
String substitution limitations
Nested substitution is not supported.
Example
You have created the following variables:
VAR1="{VAR2}"
VAR2="HELLO WORLD"
And the expression:
{VAR1}
The expression after substitution will be the string "{VAR2}".
The expression will not be reevaluated to yield the result "HELLO WORLD".
About string expressions. |
|
Supported string substitution. |
|
String substitution limitations. |
|
Procedure to use a string expression. |
|
Example: Use a String Expression as a Point Description. |
|
Step 4.3. Take advantage of data item class features. |