Base framework
The base framework in TwinCAT 3 Building Automation is an essential property and basis of TF8040. The base framework contains functions that run in the background of a TF8040 solution in the PLC. The functions of the base framework are part of the Tc3_XBA library.
The base framework is very useful when implementing a BA project (building automation project). This chapter explains these functions.
Creation of the project structure (PS)
A building automation project is usually organized in levels. The levels start with the property or the location, for example. Further levels can be the building, the systems it contains, the associated aggregates and, finally, the data points it contains.
The most important task of the base framework is to map the structure of a project in TwinCAT. The project structure is a system consisting of folders and the objects they contain.
For large projects with a large number of objects, this project structure is an important basis for designing a project sustainably and clearly.
The image shows a project structure created using the base framework in the Site Explorer.
The project structure is mapped in the Site Explorer tool, in the BACnet configuration and in a generic navigation of the TwinCAT HMI.
The benefits of the base framework, which generates the project structure in a clear form in the HMI, the BACnet and also in the BACnet MBE, are very great.
Everything from commissioning, parameterization, operation via HMI, subsequent maintenance and connection to a BACnet MBE is facilitated by the project structure.
The creation of a project structure is described in the chapter Project structure.
DPAD(user address key)
Another significant advantage is the processing of a user address key (BAS).
All levels of the project structure described above are given a name and a descriptive text.
The base framework of TF8040 can concatenate the object names and the description texts of the levels and generate the names and descriptions of the BACnet objects from them. In TwinCAT 3 Building Automation, the BAS is also referred to as DPAD Datapoint Addressing Description. Detailed information can be found in the chapter DPAD.
Events
The base framework records the events of the objects within the project structure.
A collection of events including all sub-elements is created at each level of the project structure.
A function block called FB_BA_PlantLock can be used for plant shutdowns without having to program a collective error message.
The acknowledgement and resetting of events is also organized by the base framework. A reset or acknowledgement command is automatically passed through to the objects from the top level of the project structure down to the lowest level of the project structure. The processing of events is described in more detail in the Events documentation.
Counting events
Each folder or view object is able to collect status information such as OutOfService, InAlarm, Overridden etc. from all subordinate objects and output their number. The EventConditionCount method counts the pending events of objects at the respective level of the project structure.