[W_MPRVAL] Write multistate for present value

Function block W_MPRVAL updates properties 'Present value' and 'Reliability' for a trigger value object using a present value of data type Unsigned.

W_MPRVAL updates properties 'Present value' and 'Reliability' for a trigger value object using a present value of data type Unsigned.

Functioning

Compatible data points:

  • Multistate calculated value [MCalcVal]
info

W_MPRVAL is used exclusively to write value 1 to the trigger value object (1 = Ready). It can only be used to the trigger value object (MTrgVal).

Required properties:

  • Present value
  • Status flag
  • Reliability
Pins

Input

Description

Data type

Default value
Value range

EnWrit

Enable write

If [EnWrit] = 1, writing values from inputs [Val] and [SetValid] to the BACnet object is enabled.
If [EnWrit] changes from 0 to 1, writing occurs.

Boolean

1

Val

Value

Virtual, calculated value, assigned by the control program to update the present value.

[Val] is written, if:

  • [Val] changes.
  • [SetValid] changes.
  • [RptWrit] is 1.

Integer

1

SetValid

Set valid value indication

A value calculated and assigned by the control program that indicates whether [Val] is reliable.

[SetValid] is mapped to an error code that updates reliability if [EnWrit] = 1 and one of the following items applies:

  • [SetValid] changes.
  • [Val] changes.
  • [RptWrit] is 1.

Boolean

1

0 - Reliability error code 7 (unreliable - other).
1 - Reliability error code 0 (no fault).

RptWrit

Repeat write

Forces writing of [Val], and [SetValid] to the data point. Write is repeated with each program cycle until [RptWrit] = 1.
The control program typically calculates and sets [RptWrit].

Note:
[RptWrit] cannot be permanently forced to 1. This may influence performance and communications traffic.

Boolean

0

0 - No action.
1 - [Val] and [Sta] are written to the data point with each programming cycle.

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.

Integer

1

Dstb

Disturbed

[Dstb] indicates whether the referenced BACnet object is in fault.

[Dstb] = 1 if:
BACnet object = Error during access
OR
'Status flag' = Fault

Otherwise [Dstb] = 0

Boolean

0

Rlb

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

Integer

0: No fault detected

ErrCode

Error code indication

Integer

0: No error

= 0 - No error
> 0 - XFB error codes

Troubleshooting

The write function is not available if the BACnet object is on another device.