Use TrendSpec to Show/Hide Alarm Limits

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

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 R2