Use TrendSpec to Show/Hide Alarm Limits

This example demonstrates how you can use TrendSpec to show or hide alarm limits in Trends by using a TRACE optional value, ShowAlarmLimits.

In the example below, the TRACE optional value ShowAlarmLimits appears within the TRACE section of the TrendSpec definition, but after the SOURCE section. You can place TRACE Optional Values before or after the SOURCE section, as long as they appear after the TRACE Mandatory Values (see Optional Values).

Example:

In this example a TrendSpec definition is used to produce an ad hoc Trend for an analog point source. For the purpose of this example, the TrendSpec definition is entered as a URL for a hyperlink pick action on a Mimic. The 'SCX:////Trend' prefix is required for the URL, but technically, this is not part of the TrendSpec definition:

SCX:////Trend/TREND(
TRACE(PROCESSEDHISTORIC, 'Y Axis 1', Label = 'Y Label Text',
SOURCE('Example OPC.Analog Point'), ShowAlarmLimits = True),
XAXIS(RELATIVENOW, Offset = 'Hour - 1H', Interval = '1 Hour'),
YAXIS('Y Axis 1', MajorTicks = 6))

In the definition above the ShowAlarmLimits option value is set to True to display the alarm limits for when the Trend is displayed.

If the definition is changed and the ShowAlarmLimits option value is set to False:

SCX:////Trend/TREND(
TRACE(PROCESSEDHISTORIC, 'Y Axis 1', Label = 'Y Label Text',
SOURCE('Example OPC.Analog Point'), ShowAlarmLimits = False),
XAXIS(RELATIVENOW, Offset = 'Hour - 1H', Interval = '1 Hour'),
YAXIS('Y Axis 1', MajorTicks = 6))

The Trend for the source is displayed without alarm limits.

If the ShowAlarmLimits option value is omitted, then the default setting is False (no alarm limits).

Within a multiple data source TrendSpec definition you can define the ShowAlarmLimits option value for each source.

SCX:////Trend/TREND(
TRACE(PROCESSEDHISTORIC, 'Y Axis 1', Label = 'Y Label Text',
SOURCE('Example OPC.Analog Point 1'), ShowAlarmLimits = True),
TRACE(PROCESSEDHISTORIC, 'Y Axis 1', Label = 'Y Label Text',
SOURCE('Example OPC.Analog Point 2'), ShowAlarmLimits = False),
XAXIS(RELATIVENOW, Offset = 'Hour - 1H', Interval = '1 Hour'),
YAXIS('Y Axis 1', MajorTicks = 6),
Title = 'Analog Point 1 and Analog Point 2')

In the example illustrated the alarm limits for the source, Analog Point 1 are displayed based on the settings for that point. The alarm limits for the source, Analog Point 2 are not displayed.


Disclaimer

ClearSCADA 2017 R3