FB_BACnetMI1203
BACnet multistate input
Functional description
This function block generates a BACnet multistate input object and provides write and read variables for the object within the PLC.
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) |
---|---|---|
bEnEvtEn | Enable for writing the EventEnable bit pattern |
|
stEvtEn | Property value bit pattern EventEnable | EventEnable (35) |
bEnTiDly | Enable for writing the message delay [s] |
|
udiTiDly | Property value message delay [s] | TimeDelay (113) |
bEnNotiCla | Enable for writing the notification class |
|
udiNotiCla | Property value of the notification class | NotificationClass (17) |
Inputs/outputs
VAR_INPUT
udiInPrVal : UDINT
bEnEvtEn : BOOL;
stEvtEn : ST_BACnet_EventTransitionBits;
bEnTiDly : BOOL;
udiTiDly : UDINT;
bEnNotiCla : BOOL;
udiNotiCla : UDINT;
udiInPrVal: input value of the hardware. The status range is 1 to 1000. The input signals of the hardware (e.g. n digital inputs for a rotary switch) may have to be pre-coded via a logic such that values are represented as part of the valid range.
bEnEvtEn / stEvtEn: enable/property value bit pattern EventEnable
bEnTiDly / udiTiDly: enable/property value message delay [s]
bEnNotiCla / udiNotiCla: enable/property value notification class
VAR_OUTPUT
udiPrVal : UDINT;
bStaInAlm : BOOL;
bStaFlt : BOOL;
bStaOvrrd : BOOL;
bStaOoServ : BOOL;
udiNumOfSta : UDINT;
dwObjId : DWORD;
bErr : BOOL;
udiErrId : UDINT;
udiErrArg : UDINT;
udiPrVal: current value of the multistate input object - read directly from the BACnet
bStaInAlm: indicates the state of the status flag "InAlarm" of the multistate input object.
bStaFlt: indicates the state of the status flag "Fault" of the multistate input object.
bStaOvrrd: indicates the state of the status flag "Overridden" of the analog value object.
bStaOoServ: indicates the state of the status flag "OutOfService" of the multistate input object.
udiNumOfSta: indicates the set number of states (NumberOfStates, property ID 74).
dwObjId: BACnet object ID of the multistate input 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 |