Step 1: Create Toplevel Module "Room"
Add a module declaration and a function block to the POUs pool. The function block is used for the implementation (function program) of the module. In this example, the module and function block are given the name Room
. Moreover the function block has to extend the base type AC.Module
, which is part of the AC_ModuleBase
library and provides a broad range of properties and functionalities. Since we don’t want to change the latter, all properties and functions, which are created with the function block, can be deleted.

The declaration starts with the keyword MODULE
followed by the module name and IMPLEMENTED_BY
and the name of the function block implementing the module, which is, for the case at hand, the function block Room. In this specific case, this is the Room
function block. In most cases, the section MetaData
is declared now. For detailed information about all parameters of all sections see the help pages in Module Declaration.
Because Room is the toplevel module in our example, the next section declared is the Toplevel
section. The latter allows to define a name for the global variable list (GVL_name
) including the instances of the toplevel function blocks after generation. After that, at least one more task must be defined in the toplevel section. This is Standard_Task
in this example, which is defined as a MEDIUM
task and contains the flags CREATE_IF_MISSING
and UPDATE_IOS
.
Room

All Icons and Strings, which are used for the description- and icon-placeholders of the module (parameters Desc
, Icon_16
and Icon_32
) have to be referenced from text lists and image pools. Having said this, an appropriate text list TL
and image pool IP
, which include all the referenced icons and texts, must be created and added to the POUs pool.
