Example: Source Template Generator
Product: CODESYS Application Composer
This sample application shows how to use the source template generator of the CODESYS Application Composer. This generator can be used to copy function blocks to the current project and link them to the existing modules.
Description
This example shows different ways to apply the SourceTemplate generator of the CODESYS Application Composer. With the generator, module instances can copy function blocks from the POU pool into the project and use them. You can modify and extend these function blocks after they are generated by the CODESYS Application Composer. Blocks which are copied are not overwritten in later generation cycles.
In order to use the SourceTemplate generator, it must be enabled in the generator configuration.
The function blocks which are specified in the module descriptions and selected to copy are inserted below the application of the module function block.
The copied function block can be used in the program by connecting the module to the copied function block and vice-versa. In this program, it is possible to define a sequence in any IEC 61131-3 compliant implementation language.
The copied function blocks are not overwritten in later generation cycles. If the module instance no longer exists, then the function blocks are not automatically deleted, but simply marked as unused and moved accordingly. When changes have been made, they persist over all successive generation cycles of the CODESYS Application Composer and are not lost.
For more information, see: SourceTemplates.
System requirements and restrictions
Programming system | CODESYS Development System (version 3.5.17.0 or higher) |
Runtime system | CODESYS Control Win (version 3.5.17.0) |
Add-on components | CODESYS Application Composer |
Note
DOWNLOAD Projects