R_AX: Read multiple analog

R_AX reads and evaluates the present values of multiple (up to 16) analog data points according to a selectable evaluation function, and calculates a resulting value that can be used to update a Result BACnet object.

Compatible data points:

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

Required properties:

Optional properties:

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.

EvlFnct

Evaluation function

Integer (default value: 2)

[EvlFnct] determines the type of operation performed on all valid present values.

1: Sum

The sum is calculated.

2: Average
(default)

The average is calculated.

3: Minimum

The smallest value is selected.

4: Maximum

The greatest value is selected.

5: Last updated

The last updated value is selected. If more than one value is updated in the same cycle, the lowest index number is selected.

TshVal

Threshold value

Real (default value: 0.1)

A parameterized value used to control the XFB write attempts to the Result object.

A write attempt to the Result object is only allowed if the difference between current [PrVal] and last written Result object is greater than [TshVal]. [TshVal] has no effect on the calculated value of the [PrVal] pin.

Note
[TshVal] must not be set to 0.0.

Pin description (outputs)

PrVal

Present value

Real (default value: 0.0)

The value resulting from the evaluation function performed on all valid aggregated member objects. This value is used to update the result object present value.

If the result object is manually overridden to a new value, [PrVal] will display the new value. [PrVal] will deliver the last valid value if [Valid] = False.

[PrVal] will deliver MAXREAL (3.402822e38) if the evaluated value runs into a positive overflow of the real range. [PrVal] will deliver MINREAL (-3.402822e38) if the evaluated value runs into a negative overflow of the real range. In either case, [Valid] will be True.

Note
The default initial value for [PrVal] can be changed in CFC to a different value if necessary.

Valid

Valid

Boolean (default value: False)

An indication of whether output pin [PrVal] is reliable.

1 (True)

[PrVal] is reliable if at least one of the aggregated member objects is valid.

0 (False)

[PrVal] is not reliable if none of the aggregated member objects are valid.

UpdInd

Update indication

Boolean (default value: False)

An indication of whether the Present value property for one of the aggregated member objects has been newly updated.

When an update occurs, [UpdInd] toggles from 0 to 1 (True) and returns to 0 (False) on the next cycle (immediate). It is not possible to detect the toggle without an additional function block connected to [UpdInd] (for example, a counter function block). [UpdInd] will only be set to True if [Valid] is True.

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

Note
Placing the result object out of service does not affect [UpdInd] operation.

NumVals

Number of valid values

Integer (default value: 0)

The number of valid pesent values in the collection view node object.

NumMbrs

Number of aggregated members

Integer (default value: 0)

The total number of member objects in the collection view node object.

ErrCode

Error code indication

Integer (default value: 20)

The status of the last performance of the XFB read operation.

= 0

No error.

> 0

Error, see XFB error codes.

ErrWrit

Error while writing

Integer (default value: 20)

The status of the last performance of the XFB write operation to the result object.

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

 

Standard use: R_AX reads and evaluates multiple aggregated member objects and calculates the average present value. The Control program uses the signals [PrVal], [Valid] and [ErrCode] for further processing.

 

Extended use: R_AX reads and evaluates multiple aggregated member objects and calculates the average present value. [ErrCode] can force Valid to True for a specific error code.