Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

Selecting an array of streams

  • Last UpdatedJan 25, 2024
  • 2 minute read

Some functions allow you to specify an array of multiple streams. This is supported for the following functions:

  • AVERAGE

  • AVERAGES

  • METER

  • MIN

  • MAX

  • TOTAL

  • TOTALS

The array of streams is defined by a common property. The following properties are supported for defining an array:

  • Location

  • Dimension

  • TagName

The general format for selecting an array of streams is SELECT ( "PropertyName", "PropertyValue" ). Supported wildcards vary depending on the property value:

  • Dimension: Wildcards are not supported.

  • TagName: The * wildcard is supported. This matches any number of characters.

  • Location: The following MQTT wildcard characters are supported:

    • +: Replaces one topic level

    • #: Matches any number of topic levels either before or after, depending on where it’s placed.

The specific syntax for each property is described below.

Syntax

Format

SELECT( "Location", "Location Name" ) 

Arguments

Location Name - A location or part of a location. This will match any locations that include the given argument. So "Sea" and "eattl" will both match "Seattle".

Description

Returns an array of streams that include the given argument in their location.

Format

SELECT( "Dimension", "Unit Dimension" ) 

Arguments

Unit Dimension - Any unit dimension that is in the Engineering Units Catalog.

Description

Returns an array of streams that match the given unit dimension.

Format

SELECT( "TagName", "Tag Name" ) 

Arguments

Tag Name - A tag name or part of a tag name. This will match any tag names that include the given argument. So "SysTime" and "sTime" will both match "SysTimeHour", "SysTimeMin", and "SysTimeSec".

Description

Returns an array of streams that include the given argument in their tag name.

Example 1

The following expression returns the statistical total for all streams that have a location that includes the string "Toronto" over 1 week intervals.

TOTALS(SELECT("Location","Toronto"), 1 week)

Example 2

The following expression returns the statistical average for all streams measured in a temperature dimension over 30 minute intervals.

AVERAGES(SELECT("Dimension","Temperature"), 30 Minute)

Example 3

The following expression returns the highest value for all streams with a tag name that includes the string "boiler" over 1 day intervals.

MAX(SELECT("TagName","boiler"), 1 day)

In This Topic
TitleResults for “How to create a CRG?”Also Available in