[R_TI] Read time

Function block R_TI reads the present value and additional properties of a data point with the present value of data type Double Integer and converts it to time.

R_TI reads the present value and additional properties of a data point with the present value for data type Double Integer and converts it to time.

R_TI converts the time value per the units configured under property 'Units'.

R_TI can process the following units:

If the property 'Units' is set to a value that is different from the listed units, the present value is ignored and the output disturbance is set to 1. The present value is assumed to be milliseconds if the property 'Unit' is set to no unit.

info

The units month and years are not supported since the present value 1 already exceeds the maximum value of the S7 data type Time.

Functioning

Compatible data points:

  • Integer calculated value [ICalcVal]
  • Integer configuration value [ICnfVal]
  • Third-party objects with the required properties

Required properties

  • Present value
  • Status flag
  • Unit

Optional properties:

  • Reliability
  • Update count
Pins

Input

Description

Data type

Default value
Value range

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

PrVal

Present value

Value of property 'Present value' for the referenced BACnet object.

[PrVal] supplies the last valid value in the event of a fault.

Note
The default initial value for [PrVal] can be changed to another value in the programming editor as needed.

Time

0 ms

Dstb

Disturbed

[Dstb] indicates whether the referenced BACnet object is in fault.
[Dstb] = 1 if:
BACnet object = Error during access
OR
'Status flag' = Fault
OR
'Update count' = 0

Otherwise [Dstb] = 0

Boolean

0

Rlb

Reliability
Indicates the value of property 'Reliability', if the property is available.

Integer

0: No fault detected

UpdInd

Update indication

Boolean

0

Indicates if the property 'Present value' has been updated.

Upon updating, [UpdInd] goes from 0 to 1 and returns to 0 in the next cycle (immediately). Changeover cannot be detected without additional function block connected to [UpdInd] (e.g. counter function block). [UpdInd] is only set to 1 if the BACnet object is not in fault.

[UpdInd] uses property Update count, if available. This allows for detecting if a value was updated when the new value equals the previous value. In objects without update count, [UpdInd] changes over to property Present value in case of a change.

ErrCode

Error code indication

Integer

0: No error

= 0 - No error
> 0 - XFB error codes