How to Add Rulers to WinCC OA Trend Object

Part of working with an open platform is being able to change or enhance out of the box functionality to meet your needs. This short tutorial will introduce and show you how to add a ruler to WinCC OA.

The WinCC OA trend tool comes with a number of out of the box functions. We will add the following attribute “maxRulerCount” to the WinCC OA trend tool. This attribute specifies how many rulers per trend area can be used. Rulers can be helpful to mark a value(s) and compare the differences over time. To add a ruler to the trend object, copy and paste the following initialize script as seen in the screenshots below.

This attribute comes with the following parameters:

  • area
  • count

“area” is the name of the trend area and “count” is the maximum number of rulers.

Main()
{
    TREND1.maxRulerCount  (0,7);
}

In the following example, the maximum number of available rulers for trend area 0 will be set to 7.

Leave a Comment

Your email address will not be published. Required fields are marked *