[R_AG] Read analog group

Function block R_AG links a group manager object that controls the continuous acquisition of group data (present value/status flag pairs) from multiple data points for a specific group data tag.

R_AG links a group manager object that controls the continuous acquisition of group data (present value/status flag pairs) from multiple data points for a specific group data tag. In addition, the group manager object triggers a configured evaluation function that calculated the resulting value. R_AG periodically reads the evaluated results at a preconfigured interval. A read can also be triggered by an external source.

R_AG can be configured to supply multiple (up to five) evaluated, resulting values based on the selectable evaluation functions. At least one evaluation function must be configured.

Proprietary objects are necessary for the grouping infrastructure: A group manager object and one or more group member objects. Individual data points are grouped and referenced via the group member objects and the data is acquired and forwarded by the group member object to the group manager object.

Functioning

Compatible data points:

  • Analog inputs [AI]
  • Analog output [AO]
  • Analog calculated value [ACalcVal]
  • Analog configuration value [ACnfVal]
  • Analog process value [APrcVal]

Required property from grouped data points:

  • Present value
  • Status flag
Pins

Input

Description

Data type

Default value
Value range

Interval

Read interval

Configurable polling time that specifies how often the calculated results are read.
Value 0 disables the timer. In this case, a read of the evaluated results can be triggered from an external source with [ImpRead].
If the pin has value -1s, the firmware triggers reading of the evaluated result. The firmware triggers reading when the evaluated result is updated again. (If evaluation function "Last updated" is parameterized, the interval is set to -1s).

Time

15s_0ms

ImpRead

Impulse for read

Linkable pin that allows an external source to provide a digital pulse to initiate reading.
As [ImpRead] can be interconnected, readings of multiple function blocks can be synchronized for acquisition in a chart.
Note
If [Interval] = -1s, then [ImpRead] is disabled.

Boolean

0

EvlFnct1EvlFnct5

Evaluation function 1Evaluation function 5

[EvlFnct1] determines the type of procedure performed on the valid, present values from the acquired group data with a common [GrpTag].
[EvlFnct1] belongs to one of five input sets, where each has [EvlFnctX], [ValMinX], [ValMaxX] and [ValNumX]. Typically, the application engineer sets it in the programming editor and it cannot be changed during runtime.
If unconfigured, [EvlFnct1] is set to MaxInt by default. In this case, the evaluation function is deactivated and [Dstb1] = 1.

The functionality of [EvlFnct2]...[EvlFnct5] is the same as [EvlFnct1].

Integer

32767

1: Sum
The sum is calculated. This applies to values in the range from [ValMin1] to [ValMax1].
2: Average
The average is calculated. This applies to values in the range from [ValMin1] to [ValMax1].
3: Minimum
The smallest value is selected. This applies to values in the range from [ValMin1] to [ValMax1].
4: Maximum
The largest value is selected. This applies to values in the range from [ValMin1] to [ValMax1].
5: Count of values (COUNTOFVAL)
The number of valid values in a range from [ValMin1] to [ValMax1]. The result is provided at the output [Cnt1].
8: Average, lowest values (AVERAGEMIN)
The average of a definable number [ValNum1] of the smallest valid values. This applies to values in a range from [ValMin1] to [ValMax1].
9: Average, highest values (AVERAGEMAX)
The average of a definable number [ValNum1] of the largest valid values. It applies to values in the range from [ValMin1] to [ValMax1].
10: Last updated
Searches the last updated value among the valid values. This applies to values in the range from [ValMin1] to [ValMax1].

ValMax1ValMax5

Maximum value 1Maximum value 5

Optional, configurable parameter for the evaluation function that sets a high limit for the acquired group data values with a common [GrpTag].
[ValMax1] belongs to one of five input sets, where each has [EvlFnctX], [ValMinX], [ValMaxX] and [ValNumX].

  • [ValMax1] must be greater than [ValMin1].
  • If [ValMax1] and [ValMin1] remain when specifying default values, the acquired group data has no high or low limits and everything is considered as within the range.
  • [ValMax1] cannot be changed during runtime.

The functionality of [ValMax2]...[ValMax5] is the same as [VaIMax1].

Real

3.402822E38

ValMin1ValMin5

Minimum value 1Minimum value 5

Optional, configurable parameter for the evaluation function that sets a low limit for the acquired group data values with a common [GrpTag].
[ValMin1] belongs to one of five input sets, where each has [EvlFnctX], [ValMinX], [ValMaxX] and [ValNumX].

  • [ValMin1] must be less than [ValMax1].
    If [ValMin1] und [ValMax1] remain when specifying default values, the acquired group data has no high or low limits and everything is considered as within the range.
  • [ValMin1] cannot be changed during runtime.

The functionality of [ValMin2]...[ValMin5] is the same as [VaIMin1].

Real

-3.402822E38

ValNum1ValNum5

Number of values 1Number of values 5

Configurable parameter used together with options 8 and 9 (AVERAGEMIN and AVERAGEMAX) of the evaluation function pin [EvlFnct1].
[ValNum1] indicates the number of values to be evaluated within a specific range [ValMin1]…[ValMax1].
[ValNum1] belongs to one of five input sets, where each has [EvlFnctX], [ValMinX], [ValMaxX] and [ValNumX].
[ValNum1] supports a selected value of 1…30. Specification 4 was selected based on experience to achieve solid operating results.
If the number of valid values are within range [ValMin1]...[ValMax1], less than [ValNum1], the evaluation function processes the available, valid values within the range.
Typically, the application engineer sets [ValNum1] in the programming editor and it cannot be changed during runtime.
Note
The functionality from [ValNum2]...[ValNum5] is the same as [VaINum1].

Integer

4

GrpTag

Grouping tag

Specifies the specific group data (present value, status flags) that the function block acquires and evaluates.
The system provides predefined and customizable tags. Typically, the application engineer sets [GrpTag] in the programming editor and it cannot be changed during runtime. A tag that matches the data type of the function block must be set.

Double Word

0

BaObjRef

BA-Object reference
Link between function block and BACnet object.

Structure

---

BaObjRef
> DeviceID

Device identifier
[DeviceID] includes object type and object instance in one ID.
Identifies the device object: local or remote. A local device object can also be identified by value 16#3FFFFF.

Double Word

16#3FFFFF

BaObjRef
> ObjectID

Object identifier
[ObjectID] includes object type and object instance in one ID.
Identifies the object on a device.

Double Word

16#3FFFFF

BaObjRef
> ItemID

Item identifier
[ItemID] represents an index in a view node object that references the BACnet object.
[ObjectID] and [ItemID] together define an indirect reference to the BACnet object.
Value -1 indicates a direct interface.

Integer

-1

 

Output

Description

Data type

Default value
Value range

Val1...Val5

Value 1...Value 5

Real

0.0

The evaluated, resulting value based on the evaluation function selected in [EvlFnct1].

[Val1] is the processed result from [ValNum1] and the range based on [ValMin1] and [ValMax1].

[Val1] belongs to one of five output sets where each contains [ValX], [DstbX], [CntX] and [UpdIndX].

[Val1] displays:

  • 0.0, if no present values in the acquired group data for the given [GrpTag] were valid. [Dstb1] = 1.
  • 0.0, if [EvlFnct1] remains on the default value. [Dstb1] = 1.
  • The last valid value if [Dstb1] is 0.

The functionality of [Val2]...[Val5] is same as [VaI1].

Cnt1Cnt5

Count 1Count 5

Integer

0

The evaluated, resulting value based on the CountOfVal evaluation function selected in [EvlFnct1].

[Cnt1] belongs to one of five output sets where each contains [ValX], [DstbX], [CntX] and [UpdIndX].
[Cnt1] provides:

  • The number of valid, present values from the range [ValMin1] to [ValMax1].
  • 0, if no present values in the acquired group data for the given [GrpTag] were valid. [Dstb1] = 1.
  • The last valid value if no valid, present values in the acquired group data of the given [GrpTag] exist or match the optional, configured range [ValMin1] to [ValMax1]. [Dstb1] = 1.

The functionality of [Cnt2]...[Cnt5] is same as [Cnt1].

Dstb1...Dstb5

Disturbance 1...Disturbance 5

[Dstb1] indicates whether the result of the evaluation selected on [EvlFnct1] is valid.
[Dstb1] belongs to one of five output sets where each contains [ValX], [DstbX], [CntX] and [UpdIndX].
[Dstb1] = 0 if at least one value is valid in the acquired group data.
[Dstb1] = 1 if not value is valid in the acquired group data.
The functionality of [Dstb2]...[Dstb5] is the same as [Dstb1].

Boolean

0

UpdInd1...UpdInd5

Update indication 1...Update indication 5

Boolean

0

[UpdInd] Indicates that at least one of the present values in the evaluation was updated with a new or the same value. [UpdInd] is only set to 1, if the updated value is located within the configured ValMin/ValMax range.

[UpdInd1] is set to 1 only if [Dstb1] = 0.

The functionality of [UpdInd1]...[UpdInd5] is the same as [UpdInd1].

Note
UpdInd does not support evaluation function 'CountOfVal'.

NumVals

Number of valid values

Number of valid, present values acquired for a specific [GrpTag].

Integer

0

NumMbrs

Number of aggregated members

Number of present values acquired for a specific [GrpTag], typically equal to the number of group member objects addressed by the group manager for a specific group.

Integer

0

ErrCode

Error code indication

Integer

0: No error

= 0 - No error
> 0 - XFB error codes