Skip to main content

Command: Create Extension Module

Symbol: ac_icon_create_extension.png

The command creates an extension module for a submodule slot. It is only available if an empty module slot or a submodule is selected in the module tree.

The command opens a dialog, where you define, whether the extension is to be created as a new module ("No Variation") or as a variation of an existing module or a module instance. For this purpose all modules suitable at the slot are offered in a drop-down list.

There are two options:

Derive Variation

The extension module derives from the module or module instance selected in Variation of. The chosen module gets imported via IMPORTS to the extension module and the function block of the new module derives from the module template function block.

Copy source for Variation

A new extension module is created by copying the complete module declaration including the function block and the related visualizations from the module selected in Variation of (incl. source code). This is possible only if the module selected in Variation of is available in source code and not only as module of a compiled library.

Extension modules serve to add any user specific modification or extension to the existing and predefined modules or module instances.

After Closing the dialog with OK a new folder will be created in the POUs pool with the name of the extension module.

In this folder the following objects will be created (where <name> is the name of the extension module):

  • Standard case: A function block with the name <name>, extending the class "Modules" and implementing the required interface of the slot´s type. In this function block all methods and properties will be created, which exist in an implemented interface but which are not implemented in any base class.

  • Variation case: Like in the standard case, a corresponding function block will be created. This function block derives from the chosen module template function block (Derive Variation) or is a copy of it (Copy source for Variation).

  • An image pool and a text list (name IP_<name> or TL_<name>). The image pool contains two icons with identifier Icon_16 and Icon_32. The text list contains the entry Desc, which is filled with a <name>. There are no languages in the text list, only the column Standard.

  • An empty visualization page Visu_M_<name>, which implements the required interface. If Copy variation from source is selected, the visualizations of the source module are copied instead.

  • An extension module will be added to the module tree, which has neither parameters nor I/Os. For the meta data the created images, texts and visualization elements will be used. The category is "Extension". If it is a "derived" variation the module template declaration is additionally imported via IMPORTS. If it is a "copied" variation the declaration of the module template is copied and adapted in a way that it uses the corresponding text lists and image pools of the extension module.