FB_BACnet_RemoteCommand_EX

FB_BACnet_RemoteCommand_EX 1:

Application

The function block FB_BACnet_RemoteCommand_EX can be used for reading and write access to a BACnet object of type Command.

VAR_INPUT

bEnablePV  : BOOL;
nPV        : UDINT;
bRetrigger : BOOL;

bEnablePV: Enables the value of input nPV. When the input is set to TRUE, writing takes place into the property Present_Value of the corresponding BACnet object with the value of input nPV.
If bEnablePV is set to FALSE, the process data of the mapped property Present_Value are written to 0 and thus deactivated.

nPV: Value of the property Present_Value to be written. If the value is outside the value range (see BACnet specification DIN EN ISO 16484-5 for BACnet object Command and property Present_Value), the corresponding process data is disabled, writing to the property is disabled.
Writing of a valid value triggers execution of the corresponding command list of the BACnet object. The value of the property Present_Value is written whenever the process data changes (i.e. change in the value of nPV with bEnablePV set, or signal change from FALSE to TRUE at input bRetrigger with bEnablePV set).

bRetrigger: A rising edge at this input triggers a repeat of the write process and therefore execution of the corresponding commands of the BACnet object Command. The signal change from FALSE to TRUE corresponds to a change of the process data of the property Present_Value from x to 0 to x.

VAR_OUPUT

FB_BACnet_RemoteCommand_EX 2:

Variables are not included in the basic version of the function block.

bReady         : BOOL;
nPresentValue  : UDINT;
bAllWritesOk   : BOOL;
bInProcess     : BOOL;
tObjectID      : T_BACnet_ObjectIdentifier:=16#FFFFFFFF;
bError         : BOOL;
nErrorId       : UINT;

bReady: notification of general readiness. If this output is set, the other status outputs are valid (PresentValue, Overridden ...). If the output is FALSE, the corresponding function block FB_BACnet_Device does not report "Operational", or the function block instance was not linked correctly in the TwinCAT System Manager.

nPresentValue: current value of the BACnet object (see also BACnet specification DIN EN ISO 16484-5 for BACnet object Command and property Present_Value).

bAllWritesOk: the last requested command list was successfully processed (see also BACnet specification DIN EN ISO 16484-5 for BACnet object Command and property All_Writes_Successful).

bInProcess: the selected command list is processed (see also BACnet specification DIN EN ISO 16484-5 for BACnet object Command and property In_Process).

tObjectID: object ID of the BACnet object Object type and object instance.

bError: an error is pending.

nErrorId: see global constants BACnet_Globals.

VAR_IN_OUT

RemoteDevice       : FB_BACnet_RemoteDevice;

RemoteDevice: Specification of the instance of the corresponding remote BACnet server block (client). A BACnet adapter can be used for several BACnet clients. See FB_BACnet_Adapter and FB_BACnet_RemoteDevice for further information.