Functional aspects in the building automation field ¶ Building automation can be subdivided into some functional areas. Even though such a subdivision is subjective, it may help to navigate in the CODESYS Building library. In the building automation field, we know at least the following functional system parts and areas: Primary plants (boiler plants, heat transfer stations, chillers etc.) HVAC (heating, ventilating, air conditioning) Room automation (controlling temperature, air qualitity, lighting, shading, and other aspects) Lighting control in general Optimization (of cost, energy consumptions, user comfort etc.) on specific levels of automation Building management Computer-aided facility management Building automation applications or libraries often come with support functionality or implementation for: Specific actuators Specific aggregates or assemblies Specific control or optimization algorithm
Implementation ¶ Implementation language ¶ There are two obvious implementation languages to choose from the CODESYS / IEC-61131 language set: ST and CFC. Implementations of functionality in level 1 and 2 is most likely to be done best in ST, while often implementations of functionality in level 3 is best done in ST. Computation of physics and simple algorithm might most obviously benefit from implementation in ST. There is an important design goal for the CODESYS Building Automation library: easy to understand and intuitive to use. In addition, the CODESYS Building Automation library is intended as a development template and not as a mature product. Therefore, understanding a function block and copying or modifying it to your own needs is essential. For this reason, it is most likely a good choice to select CFC as the implementation language from level 4 (possibly 3) to 6. Implementation rules ¶ There are some rules with which all functionality in the CODESYS Building Automation library should stick completetly: General implementation rules: The “Common Behaviour Model” should be used wherever appropriate (see https://help.codesys.com/webapp/idx-CommonBehaviourModel-lib;product=CommonBehaviourModel ). Function blocks related to time (axis) must provide an INPUT itfDateTimeProvider (Util.IDateTimeProvider) (see examples). In case the function block can fail somehow, there is an OUTPUT xError (error indication) and eErrorID (error ID). Both error indication and error ID will be reset by xEnable := FALSE or by xReset := TRUE (if it exists). In case of error situations, control outputs will be set to suitable values. Function blocks which implement an interface (for example, |ValveThermo| implementing |IValveContinuous| ) provide an output itf* (example: itfValveContinuous). This is about to support usability of the function block in CFC. More specific implementation rules for actuators and aggregates: Actuators and aggregates must provide an INPUT xEnable (BOOL) and work accordingly. Actuators and aggregates most likely provide the OUTPUTs xError and eErrorID. Actuators and aggregates sometimes work with “service indications” (quite often feedback values from the real hardware). “Service indications” INPUTs are implemented as a tuple of two BOOL, for example xSvciWhatEver : BOOL; xSvciWhatEver_Used : BOOL; // xSvciWhatEver_Used indicating if xSvciWhatEver is relevant, used, or connected. “Service indications” have a name prefix “Svci”. Actuators and aggregates sometimes work with “error indications” (error signals from the physical hardware). “Error indications” INPUTs are implemented as one BOOL, for example xErriWhatEver : BOOL; “Error indications” have a name prefix “Erri”. Actuator and aggregates which detect hardware errors (via “error indication” inputs or “command execution monitoring” utilizing “service indications”) optionally allow to hold the hardware error (“malfunction lock”) and shutdown the device (if appropriate) until error is reset
Introduction ¶ The CODESYS Building Automation library is intended to support the application development in the building automation field using CODESYS. It has the following characteristics: Developed by and within a community of contributors (including CODESYS GmbH having contributed functionality, acting as maintainer and taking care for releases) Provided with open source Free of charge The main design aspects or goals include the following: Easy to understand and intuitive to use Use “Common Behaviour Model” wherever appropriate Time (axis) related function blocks are “warp clock” enabled to support non-real-time testing and simulation. Oriented towards VDI 3814 Bl. 3.1 wherever appropriate The CODESYS Building Automation library is not intended to cover all aspects of building automation application development from the very beginning. It is intended to grow over time by contributions. To give users some additional support, the documentation of CODESYS Building Automation library will point to other open-source, free-of-charge libraries containing useful functionality not supported by the CODESYS Building Automation library. The CODESYS Building Automation library is intended as a development template and not as a mature product. The user is solely responsible for the tests in its application modules with the appropriate procedures and for verifying the necessary accuracy, quality, and functionality. Despite this, the CODESYS Building Automation library comes with extensive automatic testing. CODESYS GmbH will act as a maintainer of this library to ensure long-term compatibility and quality. At this point, we reference the license and the disclaimer mentioned in the documentation.
Legal ¶ Disclaimer ¶ TODO … License Terms ¶ TODO …
Levels of application development and functional aspects covered currently ¶ Levels of application development covered currently ¶ Unfortunately, there is not enough proper standardization in building automation application development - partially for good reason. Quite often, buildings (and their demand on building automation) are unique. System integrators have different levels of experience and use different procedures in planning and implementation of building automation. This altogether makes it rather impossible to provide a “complete” library which covers most aspects of the field. In general, it is more likely to provide useful functionality within such a library at levels 1 to 3. Aggregate manufacturers can improve building automation application development efficiency by providing functionality at levels 3 to 4 (possibly level 5) for their specific aggregates in their own libraries or contributing to CODESYS Building Automation library. Building application developers and aggregate manufacturers should be able to use elements provided by the CODESYS Building Automation library to improve their application development efficiency. Functional aspects covered currently ¶ The CODESYS Building Automation library starts with some: Specific actuators Specific aggregates or assemblies Specific control algorithms Specific optimization algorithms an example to demonstrate aggregate variants examples to demonstrate how to use the CODESYS Building Automation library in HVAC, primary plants and room automation To outline the design principles and provide the general infrastructure for implementation, documentation, release, etc. It is up to future contributions to extend and improve.
Examples ¶ The CODESYS Building Automation library comes with extensive examples. First see the sample project Building Automation Examples.project. It contains a ready-to-use application and visualization for all function blocks provided by the CODESYS Building Automation library to learn, simulate, and test. Building Automation Examples.project also includes tutorial-style examples which demonstrate how to use the CODESYS Building Automation library in HVAC (see ExampleAirConditioning1 and ExampleAirConditioning2 ). There are more examples demonstrating other aspects of building automation: room automation example (see ExampleRoomAutomation ) heating circuit example (see ExampleHeating ) hot water boiler control example (see ExampleHotWater ) Building Automation Examples.project also provides examples of aggregate variants using the function blocks |ExampleVariantsRoomControlFCUSimple| or ExampleFancoil3StageAggregate , which does have some variant aspects. Please see also the “aggregate variants” part of the documentation for this specific topic. Building Automation Examples Persistence.project demonstrates how to use the CODESYS Application Composer module Persistencemanager to provide persistence for certain aspects. Building Automation Examples BACnet.project demonstrates how to use the CODESYS BACnet in an application context, especially how to integrate BACnet server objects in your application.
Air types - Terms, abbreviations, and colors ¶ The CODESYS Building Automation library uses terms for specific air types. Terms, abbreviations, and colors are oriented towards DIN EN 16798-3.
Compile options ¶ The CODESYS Building Automation library provides a compile option - BuildingLib_LogErrors - which enables logging for error conditions. In case a function or function block method returns an error, more information regarding error conditions are logged.
SM3_Drive_ETC_SanyoDenki_RS2 Library Documentation ¶ Company : CODESYS Title : SM3_Drive_ETC_SanyoDenki_RS2 Version : 4.16.0.0 Categories : Intern|SoftMotion Author : CODESYS Development GmbH Placeholder : SM3_Drive_ETC_SanyoDenki_RS2 Description [ 1 ] ¶ SoftMotion ETC SanyoDenki RS2 Contents: ¶ AXIS_REF_ETC_SanyoDenki_RS2 (FunctionBlock) DriverName (Property) DriverVersion (Property) state-machine Projektinformationen GetBooleanProperty (Function) GetCompany (Function) GetNumberProperty (Function) GetTextProperty (Function) GetTextProperty2 (Function) GetTitle (Function) GetVersion (Function) GetVersionProperty (Function) Indices and tables ¶ [ 1 ] Based on SM3_Drive_ETC_SanyoDenki_RS2.library, last modified 13.12.2023, 09:24:30. LibDoc 4.4.0.0-b.37 The content file SM3_Drive_ETC_SanyoDenki_RS2.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 13.12.2023, 09:24:38.
HVAC_AntiFreezeControlStartup (FB) ¶ FUNCTION_BLOCK HVAC_AntiFreezeControlStartup HVAC_AntiFreezeControlStartup implements a control strategy for actuators / aggregates exposed to outdoor air flow to counteract potential frost damage. Application example ¶ Certain actuators / aggregates - for example (water filled) HVAC heater coils, HVAC plate type heat exchangers etc. - might be exposed to outdoor air flow at intake which involves the potentially risk of frost damage. Functionality ¶ HVAC_AntiFreezeControlStartup does a controlled startup (ramping up) of the actuator preloading for a given maximum time (tPreloadMax) or until a preload threshold (rPreloadThreshold) is reached. For example HVAC heater coil: flushing the heater coil until return temperature (rPreload) exceeds a temperatur limit (rPreloadThreshold). In case the preload threshold is not reached within the preload maximum time an startup error is signaled (xStartupError). This procedure is started if xEnable is set to TRUE and the outdoor air temperatur is below startup threshold (rStartupThreshold), otherwise there is no startup at all. After successfull preload there is pause (tFollowUp) to get the system settled. End of the pause is signaled by xStartupDone = TRUE to allow subsequent control actions - for example SequenceControl - to take over control of the actuator. InOut: Scope Name Type Initial Comment Input xEnable BOOL TRUE Enable rOutdoorAirTemp REAL Outdoor air temperatur rStartupThreshold REAL 8.0 Startup threshold rPreload REAL Preload rPreloadThreshold REAL 20.0 Preload threshold tPreloadMax TIME TIME#10m0s0ms Preload maximum time tFollowUp TIME TIME#10m0s0ms Preload follow-up time. xReset BOOL FALSE Reset itfDateTimeProvider Util.IDateTimeProvider Globals.g_dtpDateTimeProvider Source for the current date and time information in milliseconds since 1.1.1970 00:00:00.000 Output xStartup BOOL Startup indication xPreload BOOL Preload indication rOutPreload REAL Actuator preload signal (0..100%). xStartupDone BOOL Startup sucessful done tRemaining TIME Time remaining until startup is done xStartupError BOOL Startup error indication xError BOOL Error indication eErrorID Error Error ID