FB_BACnet_BinaryOutput_RAW

FB_BACnet_BinaryOutput_RAW 1:

Application

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

In contrast to the standard or _EX version of the block, the flag of the property Status_Flags is overridden, the property Feedback_Value and the value of the property Reliablitity is provided by function block inputs and mapped from the PLC program to the BACnet object. The PLC program maps the state of the property Present_Value to the hardware and the sub-bus system. Otherwise, this is dealt with directly by the IO hardware. In this way it is possible, for example, for a BACnet object to map the output value to a sub-bus system in PLC code (signal conversion to sub-bus systems or virtual points from BACnet, see Example).

VAR_INPUT

bEnablePV            : BOOL;
bNullPV              : BOOL;
bPV                  : BOOL;
bFeedback            : BOOL;
bRawOverridden       : BOOL;
bNoOutput            : BOOL;
bOpenLoop            : BOOL;
bShortedLoop         : BOOL;
bCommFailure         : BOOL;
bOtherFault          : BOOL;

bEnablePV: TRUE = write enable of the property value; FALSE = do not change the entry in the BACnet object (bNullPV and fPV have no effect).

bNullPV: TRUE = delete the property entry (NULL); instead of the value of bPV; FALSE = write value of bPV as property value.

b PV: Value to be written to the property Present_Value, if bEnablePV = TRUE and bNullPV = FALSE. The process data are written when there is a change.

bFeedback: Signal feedback to the BACnet object. See BACnet specification DIN EN ISO 16484-5 for BACnet object BinaryOutput and property Feedback_Value.

bRawOverridden: TRUE sets the flag overridden of the property Status_Flags. This indicates to BACnet that the value of the property Present_Value was decoupled from the hardware output (e.g. through manual local operation). See BACnet specification DIN EN ISO 16484-5 for BACnet object BinaryOutput and property Status_Flags.

bNoOutput, bOpenLoop, bShortedLoop, bCommFailure, bOtherFault: TRUE at the input sets the appropriate state of the property Reliability. The priority decreases with the order of the inputs (bNoOutput has highest priority, bOtherFault lowest). See BACnet specification DIN EN ISO 16484-5 for BACnet object BinaryOutput and property Reliability.

VAR_OUPUT

bReady                   : BOOL;
bPresentValue            : BOOL;
bOverridden              : BOOL;
bOutOfService            : BOOL;
bFault                   : BOOL;
bInAlarm                 : BOOL;
bAckedTrans_ToOffNormal  : BOOL;
bAckedTrans_ToFault      : BOOL;
bAckedTrans_ToNormal     : BOOL;
bError                   : BOOL;
nErrorId                 : UINT;
bRawOut                  : BOOL;

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 block instance was not linked correctly in the TwinCAT System Manager.

bPresentValue: Current value of the BACnet object (see also BACnet specification DIN EN ISO 16484-5 for BACnet object BinaryOutput and property Present_Value).

bOverridden, bOutOfService, bFault, bInAlarm: See BACnet specification DIN EN ISO 16484-5 for BACnet object BinaryOutput and property Status_Flags.

bOtherFault: See BACnet specification DIN EN ISO 16484-5 for BACnet object BinaryOutput and property Reliability.

bAckedTrans_ToOffNormal, bAckedTrans_ToFault, bAckedTrans_ToNormal: Flags of property Acked_Transitions (see BACnet specification DIN EN ISO 16484-5 for BACnet object BinaryOutput and property Acked_Transitions).

bError: An error is pending.

nErrorId: see global constants BACnet_Globals.

bRawOut: Raw value output of the object. The output is linked to the process data "RawIoBinaryBoolValue" of the BACnet object. The value of bRawOut results from the property Present_Value, taking account of the property Polarity.

VAR_IN_OUT

Device               : FB_BACnet_Device;

Device: Specification of the instance of the local corresponding BACnet server block. For each BACnet adapter one BACnet server is possible. See FB_BACnet_Adapter and FB_BACnet_Device for further information.

Example

Example

The following example illustrates the implementation of the property Present_Value of a BinaryOutput object in EIB:

FB_BACnet_BinaryOutput_RAW 2:
Fig. 1: Example for the implementation of property Present_Value in EIB in the PLC program.

This example assumes the library "TcEIB.lib" is available. For further information on EIB please refer to the manual for the KL6301 terminal.

The implementation of local operation by means of a selector switch (digital input) and a control switch (digital input) is also illustrated.