Generating Expressions

Use

In the simplest scenario (a 1:1 relationship between a subscription item and the expression being output), you can choose the Generate Expressions pushbutton to generate expressions from subscription items automatically. You can then edit or delete the expressions or add additional expressions. When generating the expressions, the PCo system copies the name of the subscription item, for example, Double1, into the Name field, and the newly generated expression into the Expression field, for example, 'Double1'. This ensures that the value of the tag is output in the notification message when a value is changed.

Procedure

  1. In the PCo Management Console, select the notification and choose the Output tab.

  2. Choose the Generate Expressions pushbutton.

    The Generate Output Expressions dialog box appears.

  3. In the Generate Output Expressions dialog box, select one of the three options for the automatic generation of output expressions:

    • Generate Only Missing Output Expressions

      The system checks which subscription items already have an output expression with the same name and generates new output expressions only for the missing subscription items. This is the default setting.

    • Regenerate All Output Expressions

      The system generates output expressions for all subscription items. If an output expression with the same name already exists, it is replaced by the standard expression. Output expressions added manually previously remain unchanged. If data types of subscription items have changed in the meantime, the system automatically adjusts the data types of the output expressions.

    • Generate Output Expressions for Subscription Items with Matching Source Names

      With this option, you can control the copying of subscription items to output expressions by entering filter criteria that consider the source name of the subscription items.

      • If the Regular Expression checkbox is not selected, all subscription items, whose source name contains the filter text entered, are selected. This check is not case-sensitive.

      • If you select the Regular Expression checkbox, the system selects the subscription items whose source name matches the regular expression entered. This evaluation is case-sensitive.

  4. To change a generated expression, select it and choose the Edit Expression pushbutton. This opens the expression editor. The expression editor can also be started by double-clicking the expression.