FB_BACnet_Accumulator
The following function block is used for linking a BACnet object of the local BACnet server. The function block for the corresponding BACnet object is linked with the aid of process data.
The process data can be created manually in the BACnet object, linked manually, or they can be generated automatically via PLC automapping. The comments required for PLC automapping ( (* ~ (BACnet... | ??? | ??? ) *) ) are already included in the declaration of the function block.
Use
The function block "FB_BACnet_Accumulator" can be used for read and write access to a BACnet object of type Accumulator (ACC). To this end the BACnet object was created under a local BACnet server.
VAR_INPUT
nPV : UDINT;
nPV: Value to be written to the property Present_Value. Process data are always written cyclically.
VAR_OUTPUT
bReady : BOOL;
nPresentValue : UDINT;
nMaxPV : UDINT; (*siehe Beschreibung*)
bOverridden : BOOL;
bOutOfService : BOOL;
bFault : BOOL;
bInAlarm : BOOL;
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 System Manager.
nPresentValue: current value of the BACnet object (see also BACnet specification DIN EN ISO 16484-5 for BACnet object Accumulator and property Present_Value).
bOverriden, bOutOfService, bFault, bInAlarm: see BACnet specification DIN EN ISO 16484-5 for BACnet object Accumulator and property Status_Flags.
bError: an error is pending.
nErrorId: error number
0 = no error
2 = faulty process data mapping detected (check mapping in the System Manager; possibly compile PLC project completely and reload)
3 = the associated BACnet server is not ready (bOperational = FALSE at instance of FB_BACnet_Device)
The error numbers can be queried as function block constants via the FB instance (FB_BACnet_???.nERR_xxx).
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.