R_AG: Read analog group

R_AG binds to a Group manager object which controls the continuous collection of Group data (Present value / State flag pairs) from multiple data points for a specific Group data tag. In addition, the Group manager object triggers a configured evaluation function that calculates a resulting value. R_AG periodically reads the evaluated results at a preconfigured interval. A read can also be triggered from an external source.

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

Proprietary objects are needed for grouping infrastructure: one Group manager object and one or more Group member objects. Individual member data points are grouped and referenced via the Group member object(s), and the data is collected and passed from Group member object(s) to the Group manager object.

Compatible data points:

Refer to data point objects for a detailed description of the BACnet data points.

Required properties of grouped data points:

Pin description (inputs)

BaObjRef

BA-Object reference

Structure

[BaObjRef] defines a bound connection between XFB and BACnet object. The binding occurs automatically.

Manual configuration attempts are not necessary and can result in system errors.

DeviceId

Device identifier

Double word (default value: 16#3FFFFF)

[DeviceId] comprises object type and object instance in a single identifier.

It is used to identify device object: local or remote. Local device object could also be identified by value 16#3FFFFF.

ObjectId

Object identifier

Double word (default value: 16#3FFFFF)

[ObjectId] comprises object type and object instance in a single identifier.

It is used to identify object within a device.

ItemId

Item identifier

Integer (default value: -1)

[ItemId] represents an item index in the functional view node object, which references the BACnet object.

[ObjectId] and [ItemId] together define an indirect access reference to the BACnet object.

Value -1 indicates that direct binding is used.

 

GrpTag

Group data tag

Double word (default value: 0)

[GrpTag] defines the specific group data (present value, state flags) to be collected and evaluated by the XFB.

The system provides predefined and also user definable tags. The [GrpTag] is typically set by the application developer in CFC and must not change during runtime. It must be set to a tag that matches the datatype of the XFB.

Interval

Read interval

TIME (default value: T#0D_0H_0M_15S_0MS)

The parameterizable polling time that specifies how often the calculated results are read.

A value of 0 will disable the timer. In this case a read of the evaluated results can be triggered from an external source using [ImpRead].

In case the Interval pin has set the value -1s, the read of the evaluated result is triggered by the FW. The FW sets the read trigger when the evaluated result is newly updated. (If "LastUpdated" evaluation function is parameterized, Interval should be set to -1s.)

ImpRead

Impulse for read

Boolean (default value: False)

A linkable pin that allows an external source to provide a digital impulse to initiate a read operation.

Since [ImpRead] can be wired, the read operations of multiple XFBs can be synchronized for collection in a single chart.

Note
If [Interval] = -1s, ImpRead is disabled.

EvlFnct1...5

Evaluation function 1

Integer (default value: 32767)

[EvlFnct1] determines the type of operation performed on valid present values from the collected group data that share a common [GrpTag].

[EvlFnct1] belongs to one of five input sets, each containing [EvlFnctX], [ValMinX], [ValMaxX] and [ValNumX]. It is typically set by the application engineer in CFC and must not be changed during runtime.

If left unconfigured [EvlFnct1] is set per default to MaxInt (32767). In this case the evaluation function is disabled and [Valid1] is 0 (False).

[EvlFnct2]...[EvlFnct5] functionality is identical to [EvlFnct1].

1: Sum

The sum is calculated. This is done either on the complete data sample or for values that reside in a given range [ValMin1] to [ValMax1].

2: Average

The average is calculated. This is done either on the complete data sample or for values that reside in a given range [ValMin1] to [ValMax1].

3: Minimum

The smallest value is selected. This is done either on the complete data sample or for values that reside in a given range [ValMin1] to [ValMax1].

4: Maximum

The greatest value is selected. This is done either on the complete data sample or for values that reside in a given range [ValMin1] to [ValMax1].

5: CountOfVal

The number of valid present values in range [ValMin1] to [ValMax1]. The result is set to output pin [Cnt].

8: AverageMin

The average of a selectable number [ValNum1] of the lowest valid present values from the collected group data that share a common [GrpTag]. This is done either on the complete data sample or for values that reside in a given range [ValMin1] to [ValMax1], or [ValNum].

9: AverageMax

The average of a selectable number [ValNum1] of the highest valid present values from the collected group data that share a common [GrpTag]. This is done either on the complete data sample or for values that reside in a given range [ValMin1] to [ValMax1], or [ValNum1].

10: LastUpdated

Searches the last updated value within all valid present values for a given group data tag of a specific group. This is done either on the complete data sample or for values that reside in a given range [ValMin1] to [ValMax1].

ValNum1...5

Number of values 1

Integer (default value: 4)

A parameterizable argument used in conjunction with options 8 and 9 (AVERAGEMIN and AVERAGEMAX) of evaluation function pin [EvlFnct1]. [ValNum1] specifies the number of values to be evaluated within range [ValMin1]...[ValMax1].

[ValNum1] belongs to one of five input sets, each containing [EvlFnctX], [ValMinX], [ValMaxX] and [ValNumX].

  • [ValNum1] supports a selectable number from 1...30. The default of 4 has been chosen, based on past experience, to deliver good operating results.
  • If the number of valid values within range [ValMin1]...[ValMax1] is less than [ValNum1], the evaluation function processes the existing valid values within the range.
  • [ValNum1] will typically be set by the application engineer while developing charts, and must not change during runtime.

Note
In the tool interface, the [ValNum] pin is hidden. If needed, it can be changed to visible by the application engineer.

[ValNum2]...[ValNum5] functionality is identical to [ValNum1].

ValMin1...5

Minimum value 1

Real (default value: MinReal)

An optional parameterizable argument for the evaluation function that sets a lower limit for the collected group data values sharing a common [GrpTag].

[ValMin1] belongs to one of five input sets, each containing [EvlFnctX], [ValMinX], [ValMaxX] and [ValNumX].

  • [ValMin1] must be less than [ValMax1].
  • If [ValMin1] and [ValMax1] are left at default MinReal and MaxReal respectively, the collected group data has no upper or lower limit restrictions and everything is considered "in range".
  • [ValMin1] must not change during runtime.

[ValMin2]... [ValMin5] functionality is identical to [ValMin1].

ValMax1...5

Value input 1

Real (default value: MaxReal)

An optional parameterizable argument for the evaluation function that sets an upper limit for the collected Group data values sharing a common [GrpTag].

[ValMax1] belongs to one of five input sets, each containing [EvlFnctX], [ValMinX], [ValMaxX] and [ValNumX].

  • [ValMax1] must be greater than [ValMin1].
  • If [ValMax1] and [ValMin1] are left at default MaxReal and MinReal respectively, the collected group data has no upper or lower limit restrictions and everything is considered "in range".
  • [ValMax1] must not change during runtime.

[ValMax2]... [ValMax5] functionality is identical to [ValMax1].

Pin description (outputs)

Val1...5

Value 1

Real (default value: 0.0)

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

[Val1] is the processed result either taken from the entire collected group data set for the given group data tag, or from a specified range based on the optional input arguments [ValMin1] and [ValMax1].

[Val1] belongs to one of five output sets, each containing [ValX], [ValidX], and [CntX].

[Val1] will deliver:

  • 0.0 if no present values in the collected group data for the given [GrpTag] have ever been valid. [Valid1] will be False.
  • 0.0 if [EvlFnct1] was left at default. [Valid1] will be False.
  • The last valid value if no valid present value in the collected group data for the given [GrpTag] is within the configured range [ValMin1] to [ValMax1]. [Valid1] will be False.
  • MaxReal (3.402822e38), in case the evaluated value runs into a positive overflow of the real range. [Valid1] will be True.
  • MinReal (-3.402822e38), in case the evaluated value runs into a negative overflow of the real range. [Valid1] will be True.

[Val2]...[Val5] functionality is identical to [Val1].

Valid1...5

Valid 1

Boolean (default value: False)

Depending on the selection for [EvlFnct1], [Valid1] indicates whether [Val1] or [Cnt1] is reliable.

[Valid1] belongs to one of five output sets, each containing [ValX], [ValidX] and [CntX].

[Valid2]...[Valid5] functionality is identical to [Valid1].

1 (True)

[Val1] / [Cnt1] is reliable if at least one of the present values in the group data for the given [GrpTag] is valid (and within range [ValMin1] to [ValMax1] if optionally configured).

0 (False)

[Val1] / [Cnt1] is not reliable if none of the present values in the group data for the given [GrpTag] are valid (or within range [ValMin1] to [ValMax1] if optionally configured).

Cnt1...5

Count 1

Integer (default value: 0)

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

[Cnt1] belongs to one of five output sets, each containing [ValX], [ValidX] and [CntX]. [Cnt1] will deliver:

  • The number of valid present values taken from all collected group data, or from those matching the optional specified range [ValMin1] to [ValMax1].
  • 0 if no present values in the collected group data for the given [GrpTag] have ever been valid. [Valid1] will be False.
  • The last valid value if there are no valid present values currently in the collected group data for the given [GrpTag], or that match the optional specified range [ValMin1] to [ValMax1]. [Valid1] will be False.

[Cnt2]...[Cnt5] functionality is identical to [Cnt1].

UpdInd1...5

Update indication

Boolean (default value: False)

[UpdInd] indicates that at least one of the present values considered in the evaluation is updated with a new or same value. UpdInd will be set to True only if the updated value is within the parameterized ValMin/ValMax range limits.

[UpdInd] uses the update count property if present. This makes it possible to recognize a value as having been updated in cases where the new value is the same as the previous value. For objects without update count, [UpdInd] toggles on a change to Present value.

[UpdInd] will only be set to true if Valid is true.

Note
UpdInd is not supported for the "COUNTOFVAL" evaluation function.

NumVals

Number of valid values

Integer (default value: 0)

The number of valid present value samples that have been collected for a specific [GrpTag].

NumMbrs

Number of aggregated members

Integer (default value: 0)

The number of present value samples that have been collected for a specific [GrpTag], typically equal to the number of group member objects addressed by the group manager object for a particular group.

ErrRead

Error while reading

Integer (default value: 20)

The status of the last XFB read attempt.

In case no valid Val can be evaluated, [ErrRead] indicates the first detected error on the collected data for the given [GrpTag].

= 0

No error.

> 0

Error, see XFB error codes.

Use case examples

 

NOTICE

notice

Note
Graphics reflect examples of XFB implementations; See ABT for current examples of CFC.

 

R_AG: Examples taken from the Central supply function AFN and CHT{SplyAir01}. Due to graphical size limitations, function blocks may be missing or shown more closely grouped than is typical.

The first example is designed to read a set of member objects and collect the supply flow minimum command from each (using the specified group tag). This example then evaluates and provides the largest command (Evaluation Function 4: Max) to set the air quality demand. As the range for the inputs have not changed from the default, the maximum evaluation is not limited. If one or more of the member objects is valid, the output pin of the XFB will be set to valid and used to enable the Air Quality Demand XFB.

In the second example, two evaluations are performed on a set of member objects. The evaluation of the first input set evaluates the maximum value of the member object supply damper positions and sets this value to a BACnet object for Damper position for supply air. A second evaluation (2 – average) is used with a switching statement that will set an output true if the average of the valid positions is greater than 4 and back to false if the average drops below 3. This evaluation is not limited to a restricted range as both maximum and minimum values for input set 2 have not been changed from their defaults.