R_MG: Read multistate group

R_MG 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_MG periodically reads the evaluated results at a preconfigured interval. A read can also be triggered from an external source.

R_MG can be configured to provide multiple (up to eight) 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...8

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 eight input sets, each containing [EvlFnctX], [ValMinX], and [ValMaxX]. 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]...[EvlFnct8] functionality is identical to [EvlFnct1].

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].

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].

ValMin1...8

Minimum value 1

Integer (default value: 1)

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 eight input sets, each containing [EvlFnctX], [ValMinX], and [ValMaxX].

  • [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]... [ValMin8] functionality is identical to [ValMin1].

ValMax1...8

Maximum value 1

Integer (default value: 7)

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 eight input sets, each containing [EvlFnctX], [ValMinX], and [ValMaxX].

  • [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]... [ValMax8] functionality is identical to [ValMax1].

Pin description (outputs)

Val1...8

Value 1

Integer (default value: 1)

The evaluated resulting value based on the evaluated 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 eight output sets, each containing [ValX], [ValidX], and [CntX].

[Val] will deliver:

  • 1 if no present values in the collected group data for the given [GrpTag] have ever been valid. [Valid1] will be False.
  • 1 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.

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

Valid1...8

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 eight output sets, each containing [ValX], [ValidX] and [CntX].

[Valid2]...[Valid8] 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 set by [ValMin1] to [ValMax1] if optionally configured).

Cnt1...8

Count 1

Integer (default value: 0)

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

[Cnt1] belongs to one of eight 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]...[Cnt8] functionality is identical to [Cnt1].

UpdInd1...8

Update indication

Boolean (default value: False)

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_MG: Supply chain for air.