Initialize/Change color

The color of the object (foreground and background or both) will change to the defined color when the value of the selected data point is too high or too low. You can, for example, use up to five color changes per DPE.

The color change can be any of the following:

  • Background and foreground can be changed separately or together.

  • based on an alert handling whose thresholds and alert colors are defined in the PARA module using the data point config alert handling. (See Module PARA/Data point configs)

  • or based on changes of specific values. In this case you must also define the thresholds and colors using Simple Configuration (in addition to the appropriate DPE).

Change color based on an alert handling

Figure 1. Change color window

Example

  1. Select an object, for example, an ellipse and click on the Open property wizards button.

  2. The Initialization window opens. Select the Change color option.

  3. In the Initialize/Change colors panel select the check box Background color(filling, text background).

  4. The radio box Value-dependent is selected automatically in the lower part of the panel.

  5. Click on Next >. The next panel is opened.

  6. Select the data point whose value change should cause the color change.

The DPE must contain an _alert_hdl config that you can create and edit in the PARA module. If the DPE contains an alert handler config, the dimmed display boxes Alert handling config and Current alert color are filled in from the database. Otherwise these fields contain a warning that this config does not exist as yet.

Figure 2. Change background color based on an alert handling
  • color: Background/foreground

  • Alarm handling/DP value

These entries show the data point element and the alarm color.

Change color depending on value

The color of the object (foreground and background or both) changes to the defined color when the value of the selected data point exceeds or drops below the set threshold.

Example

  1. Select an object, for example, an ellipse and click on the Open property wizards button.

  2. The Initialization window opens. Select the Change color option.

  3. In the Initialize/Change colors panel select the check box Set foreground and background colors to same color.

  4. At the bottom of this dialog you specify that the color changes are based on a change of value (see figure below).

Figure 3. Change colors together
  1. Click on Next > to access the next panel (see below).

Figure 4. Change color depending on value
  1. Select the data point whose value changes should trigger a color change.

  2. For each color change, enter the operator (for example, smaller, greater or equal) and an appropriate threshold. You can define a maximum of 5 color changes per DPE.

  3. Click on the buttons to the right of the color fields to open the Color Editor and select the corresponding color.

Many colors have already been defined in WinCC OA and can be selected using color names.

  1. Click on the Finish button.

You can define up to four thresholds that should trigger a color change in a panel.

If you want to distinguish more conditions, change to complex configuration and customize this script.

Color for data type bool

If you have selected a data point with a Boolean data type, there are only two values available. You can define two different colors, for example to display whether a valve is open or closed.

For alert handling, define what value represents the good range and what alert color and alert class should be used. You can specify this also in the PARA module using the config _alert_hdl panel (See Module PARA, Config Alert handling).

Figure 5. Change color for data type bool

Example

Interpretation of the above figure with Boolean data type:

  • Data point ExampleDP_AlertHdl1.:_online.._value equals (FALSE = fault = alert color red).

  • Data point ExampleDP_AlertHdl1.:_online.._value equals (TRUE = good range = object color).