FB_BACnetBO1201
BACnet binary output
Functional description
This function block generates a BACnet binary output object and provides write and read variables for the object within the PLC.
This function block is the "smallest" version in terms of functionality.
Alternatively the following versions are available:
The parameters, which can be written from the PLC, can also be written from the BACnet side; the last change is always the valid one. These parameters are transferred from the PLC via ADS and into the PLC via a cyclic interface. On the PLC side, all parameters have an additional Enable input: when the respective Enable input is set for the first time (rising edge), the value at the parameter input is transferred in any case; subsequently, if Enable is set, it is only transferred if it changes, in order to reduce the ADS traffic. If the Enable input is not set, no transfer takes place.
PLC variable | Comment | BACnet-Property (Property ID) |
---|---|---|
bEnPrioA | Enable for writing the priority entered under usiPrioA into the priority array |
|
bValPrioA | Value to be written | Priority-Array (87) |
usiPrioA | Selection of the priority (1..16) to be written in the priority array |
|
Inputs/outputs
VAR_INPUT
bEnPrioA : BOOL;
bValPrioA : BOOL;
usiPrioA : USINT;
bOvrrd : BOOL;
bEnFdbVal : BOOL;
bFdbVal : BOOL;
bEnEvtEn : BOOL;
stEvtEn : ST_BACnet_EventTransitionBits;
bEnTiDly : BOOL;
udiTiDly : UDINT;
bEnNotiCla : BOOL;
udiNotiCla : UDINT;
bEnElapActvTi : BOOL;
udiElapActvTi : UDINT;
bEnPrioA: enable for writing
bValPrioA: value that is written to priority usiPrioA in the priority array.
usiPrioA: selection of the priority (1..16) to be written
bOvrrd: at this input the input signal of a local priority operation, e.g. of an KM2652, can be created. If this input is then "TRUE", this is indicated in the BACnet.
bEnFdbVal / bFdbVal: enable/property value feedback value. This value is written from the PLC to the Property FeedbackValue (Property Id 40), however not via ADS, but via cyclic interface.
It is used for feedback monitoring: if bEnFdbVal is set to TRUE, bFdbVal must have the same value as the output Present Value within the time specified in the BACnet under TIME Delay (Property Id 113). Otherwise a feedback discrepancy is displayed in the EventState (property ID 36) via the entry "offnormal". If bEnFdbVal is set to FALSE, internally bFdbVal is set to same value as the Present Value, so that feedback discrepancies are avoided.
bEnEvtEn / stEvtEn: enable/property value bit pattern EventEnable
bEnTiDly / udiTiDly: enable/property value message delay [s]
bEnNotiCla / udiNotiCla: enable/property value notification class
bEnElapActvTi / udiElapActvTi: enable/property value elapsed active time
VAR_OUTPUT
bRawIoPrVal : BOOL;
bPrVal : BOOL;
bStaInAlm : BOOL;
bStaFlt : BOOL;
bStaOvrrd : BOOL;
bStaOoServ : BOOL;
udiStaElapActvTi : UDINT;
udiActvPrio : UDINT;
dwObjId : DWORD;
bErr : BOOL;
udiErrId : UDINT;
udiErrArg : UDINT;
bRawIoPrVal: output value to the digital output terminal
bPrVal: current value of the binary output object - read directly from the BACnet
bStaInAlm: indicates the state of the status flag "InAlarm" of the binary output object.
bStaFlt: indicates the state of the status flag "Fault" of the binary output object.
bStaOvrrd: indicates the state of the status flag "Overridden" of the binary output object.
bStaOoServ: indicates the state of the status flag "OutOfService" of the binary output object.
udiStaElapActvTi: indicates the elapsed active time of the binary output object.
udiActvPrio: indicates which priority is active.
dwObjId: BACnet object ID of the binary output object
bErr: indicates a general error in the function block. The cause can be in BACnet, in the ADS data exchange, or due to incorrect parameterization.
udiErrId / udiErrArg: contains the error number and the error argument. See error codes.
VAR_IN_OUT
stComnMsg : ST_BA_ComnMsg;
fbDvc : FB_BACnet_Device;
stComnMsg: reference to the connection structure for the collective message function block FB_BA_ComMsg.
fbDvc: reference to the function block of the BACnet device object
Requirements
Development environment | Target system | required library | required supplement |
---|---|---|---|
TwinCAT 2.11 R3/x64 | PC/CX | TcBA library from V1.0.0 | TS8040 | TwinCAT Building Automation from V1.0.0 |