KPI Wizard - How to create a KPI Instance

This chapter comprises two examples:

How to create a single KPI instance with directly attached DPE addresses and no context

To create a KPI instance, a KPI definition must already exist. This example shows how to create a new KPI and attach it to the process image. The example comprises an electric drive with current and voltage to calculate power. For this example a drives data point type as shown in the figure "Drag and Drop a Data point" must exist.

  1. Create a KPI definition via the Definition panel. Create a new KPI definition type, for example, "Electric_Power" in the Definition panel. Enter the name "Electric_Power" to the "Enter new KPI definition" text field and click the plus sign (see figures below).

All examples in the help are based on a fictive project in order to represent the processes.

The name of the KPI definition must correspond to the WinCC OA DP name guidelines! See chapter Rename Data points for information on the name guidelines.

Figure 1. Create a new KPI Definition

  1. Enter the parameters "current" and "voltage" into the "Enter new KPI parameter" text field and click the symbol or press Enter.

Figure 2. Add KPI parameters
  1. Enter the calculation formula "current* voltage" into the text area "Edit KPI parameter calculation formula" (see figure below) by typing or dragging and dropping the parameters from "Edit KPI parameters" table to the "Edit KPI parameter calculation formula" text field.

Figure 3. Edit KPI parameter calculation formula

When using a function call from the wincc_oa_path/SmartSCADA_3.15/scripts/libs/SmartSCADA/kpi/kpiFunctions.ctl this function must return a value.

  1. In the Associate panel select the KPI type "Electric_Power" from the "KPI Type" combo box:

Figure 4. KPI Type Combo box
  1. Drag and drop the current element of the data point "ssc_demo_drive1" from the Data selection PARA window to the current text field (see figure below). Repeat the step for the voltage parameter and drag the voltage element of the "ssc_demo_drive1" data point to the voltage value text field. This example shows how to create a single KPI instance with directly attached DPE addresses and no context.

Figure 5. Drag and Drop a Data point
  1. Check the check box "Online".

Figure 6. Check the Check box
  1. Activate the radio button "Online value" and select the trigger "current" from the "Select online trigger" combo box and save the KPI instance. A KPI is calculated when a value is entered into the "current" data point element.

Figure 7. Create a KPI Instance

The KPI instance "kpi__System1__ElectricPower0" is saved in the Associate panel and a KPI instance data point is created.

Figure 8. KPI instance "kpi__System1__ElectricPower0"

When you enter a current and a voltage value into the data points, the result of the calculation is saved in the result data point element of the KPI instance.

Figure 9. KPI result element

You can inspect the KPI result in the Inspect panel of the KPI wizard:

Figure 10. KPI Inspect Panel - kpi__System1__ElectricPower0

How to create several KPI instances by using the KPI context of the associate panel

  1. If you worked through the first example, continue with the step 2 of this example. If you did not work through the first example, work through the steps 1 to 4 of the first example. Then proceed with the step 2.

  2. Drag and drop the data point type "SSC_DRIVE1" to the KPI context field

Figure 11. Drag and drop the data point type "SSC_DRIVE1"
  1. Drag and drop an "ssc_demo_drive1" data point to the "Value" field.

Figure 12. Drag and Drop the data points
  1. Delete the first part "ssc_demo_drive1" of the value and leave the texts ".value.current" and ".value.voltage".

Figure 13. Data point type context
  1. Check the check boxes "Context" and "Online".

  2. Select the trigger "current" for the KPI from the "Select online trigger" combo box.

  3. Save the configuration.

  4. Four KPI instances are created since there are four data points of type "SSC_DRIVE1":

Figure 14. Four KPI Instances

You can also inspect the KPI result in the Inspect panel of the KPI wizard:

Figure 15. KPI Inspect Panel