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

AVEVA™ BI Gateway

AnalogSummary

  • Last UpdatedJun 09, 2023
  • 6 minute read

This Azure custom query returns summary values for analog tags based on search criteria. The custom query expression supports the following parameters.

Parameter Name

Parameter Choice

Example

Description

QueryName

Required

Analogsummary

Azure function query name

SelectColumn

Optional

["*"]

Or ["FQN","StartDateTime", "Minimum", "Maximum", "Average", "StdDev", "Integral", "Count"]

Option to pick required properties from AVEVA Insight

Tag

Optional

{

"Filter": "endswith(FQN, '.Temperature')",

"Select": ["FQN"]

}

The Tag expression is used to apply a filter on the tags.

The Filter parameter is used to apply a filter on the tags.

The Select parameter is used to specify the property name that could be used in the tag filter. If extended property is used in the filter, then it is must to specify in the select.

StartDateTime

Optional

"[RequestedStartTime]"

Any valid UTC date time value.

To leverage [RequestedStartTime] parameter for populating a time defining dimension, you must enable incremental update feature for the dimension. For more information, see Configure an incremental update for a dimension.

EndDateTime

Optional

"[RequestedEndTime]"

Any valid UTC date time value. This datetime value should be greater than "StartDateTime".

To leverage [RequestedEndTime] parameter for populating a time defining dimension, you must enable incremental update feature for the dimension. For more information, see Configure an incremental update for a dimension.

Expression

Optional

"UOM(hl/min)"

Or

"UOM(t/h)"

Any valid Engineering Unit.

This is used to convert the destination Engineering Unit.

Ensure that you use the Tag parameter in the query to support the Engineering Unit conversion.

For more information about Engineering Units, see the AVEVA Insight Online Help.

The following properties are returned from the Azure function query for "Analogsummary".

Property Name

Datatype

Description

FQN

string

The fully qualified name for the tag. A fully qualified name uses the format: datasource.tagname.

OPCQuality

Int32

Defines the OPC quality for the data.

PercentGood

Double

The ratio of the number of rows that have "good" quality to the total number of rows in the retrieval cycle, expressed as a percentage in the range 0 to 100.

First

Double

If at least one non-NULL point exists for the tag in question within the retrieval cycle, then the value returned is the first point stored with a time stamp within the retrieval cycle. If no points exist within the retrieval cycle, then the value returned is the current value at the cycle start time. If no non-NULL points can be found, then NULL is returned.

FirstDateTime

DateTimeOffset

Timestamp associated with first value. This might be earlier than StartDateTime if this is the initial value for the retrieval cycle.

Last

Double

If at least one non-NULL point exists for the tag in question within the retrieval cycle, then the value returned is the last point stored with a time stamp within the retrieval cycle. If no points exist within the retrieval cycle, then the value returned is the current value at the cycle start time.

If no non-NULL points can be found, then NULL is returned.

LastDateTime

DateTimeOffset

Timestamp associated with last value. This might be earlier than StartDateTime if this is the initial value for the retrieval cycle.

Minimum

Double

If at least one non-NULL point exists for the tag in question within the retrieval cycle, then the value returned is the minimum point stored with a time stamp within the retrieval cycle. If no points exist within the retrieval cycle, then the value returned is the current value at the cycle start time. If no non-NULL points can be found, then NULL is returned.

MinDateTime

DateTimeOffset

Timestamp associated with Min value. NULL if Min is NULL.

Maximum

Double

If at least one non-NULL point exists for the tag in question within the retrieval cycle, then the value returned is the maximum point stored with a time stamp within the retrieval cycle. If no points exist within the retrieval cycle, then the value returned is the current value at the cycle start time.

If no non-NULL points can be found, then NULL is returned.

MaxDateTime

DateTimeOffset

Timestamp associated with Max value. NULL if Max is NULL.

Average

Double

Time weighted average value of retrieval cycle. This is calculated by using the individual summary averages. The calculation is "Sum(average * delta t) / Total time of average in all cycles" - delta t is prorated for any partially contained storage cycles. For analog tags, the calculation is "Sum(value * delta t) / Total time.

StdDev

Double

Time weighted standard deviation value of the retrieval cycle. The value is calculated using time weighted sums (Integrals) and time weighted sums of squares (IntegralOfSquares) values.

Integral

Double

Area under value curve of retrieval cycle. The calculation is "Sum(value * delta t) / Total time of integral in all cycles" - delta t is prorated for any partially contained storage cycles. For analog tags, the calculation is "Sum(value * delta t) / Total time.

Count

Double

Number of values in a particular cycle.

CQAnalogSummary

This Azure custom query returns summary values for analog tags based on the query expression.

Note: This custom query is supported to ensure backward compatibility.

The custom query expression supports the following parameters.

Parameter Name

Parameter Choice

Example

Description

QueryName

Required

CQAnalogsummary

Azure function query name

SelectColumn

Optional

["*"]

Or ["FQN","StartDateTime", "Minimum", "Maximum", "Average", "StdDev", "Integral", "Count"]

Option to select required properties from AVEVA Insight.

Tag

Optional

{

"Filter": "startswith(FQN,'Temperature.Los Angeles')",

"Select": ["FQN"]

}

The Tag expression is used to apply a filter on the tags.

The Filter parameter is used to apply a filter on the tags.

The Select parameter is used to specify the property name that could be used in the tag filter. If extended property is used in the filter, then it is must to specify in the select.

RetrievalMode

Optional

  • Average

  • Cyclic

  • Integral

  • Delta

  • Counter

  • Full

AVEVA Insight query retrieval mode.

Resolution

Optional

3000

A valid numeric value in milliseconds

Expression

Optional

"UOM(hl/min)"

or

"UOM(t/h)"

Any valid Engineering Unit.

This is used to convert the destination Engineering Unit.

Ensure that you use the Tag parameter in the query to support the Engineering Unit conversion.

For more information about Engineering Units, see the AVEVA Insight Online Help.

For more information about the supported Filter expressions, see the "Query Expression Operator" section.

The following properties are returned from the Azure function query for "CQAnalogsummary".

Property Name

Datatype

Description

FQN

string

The fully qualified name for the tag. A fully qualified name uses the format: datasource.tagname.

OPCQuality

Int32

Defines the OPC quality for the data.

PercentGood

Double

The ratio of the number of rows that have "good" quality to the total number of rows in the retrieval cycle, expressed as a percentage in the range 0 to 100.

First

Double

If at least one non-NULL point exists for the tag in question within the retrieval cycle, then the value returned is the first point stored with a time stamp within the retrieval cycle. If no points exist within the retrieval cycle, then the value returned is the current value at the cycle start time. If no non-NULL points can be found, then NULL is returned.

FirstDateTime

DateTimeOffset

Timestamp associated with first value. This might be earlier than StartDateTime if this is the initial value for the retrieval cycle.

Last

Double

If at least one non-NULL point exists for the tag in question within the retrieval cycle, then the value returned is the last point stored with a time stamp within the retrieval cycle. If no points exist within the retrieval cycle, then the value returned is the current value at the cycle start time.

If no non-NULL points can be found, then NULL is returned.

LastDateTime

DateTimeOffset

Timestamp associated with last value. This might be earlier than StartDateTime if this is the initial value for the retrieval cycle.

Minimum

Double

If at least one non-NULL point exists for the tag in question within the retrieval cycle, then the value returned is the minimum point stored with a time stamp within the retrieval cycle. If no points exist within the retrieval cycle, then the value returned is the current value at the cycle start time. If no non-NULL points can be found, then NULL is returned.

MinDateTime

DateTimeOffset

Timestamp associated with Min value. NULL if Min is NULL.

Maximum

Double

If at least one non-NULL point exists for the tag in question within the retrieval cycle, then the value returned is the maximum point stored with a time stamp within the retrieval cycle. If no points exist within the retrieval cycle, then the value returned is the current value at the cycle start time.

If no non-NULL points can be found, then NULL is returned.

MaxDateTime

DateTimeOffset

Timestamp associated with Max value. NULL if Max is NULL.

Average

Double

Time weighted average value of retrieval cycle. This is calculated by using the individual summary averages. The calculation is "Sum(average * delta t) / Total time of average in all cycles" - delta t is prorated for any partially contained storage cycles. For analog tags, the calculation is "Sum(value * delta t) / Total time.

StdDev

Double

Time weighted standard deviation value of the retrieval cycle. The value is calculated using time weighted sums (Integrals) and time weighted sums of squares (IntegralOfSquares) values.

Integral

Double

Area under value curve of retrieval cycle. The calculation is "Sum(value * delta t) / Total time of integral in all cycles" - delta t is prorated for any partially contained storage cycles. For analog tags, the calculation is "Sum(value * delta t) / Total time.

Count

Double

Number of values in a particular cycle.

Related Links
TitleResults for “How to create a CRG?”Also Available in