Section: CFCCreation
This section contains all subsections that are interpreted by the CFC generator.
SEC cfc.CFCCreation
SEC CreateCFCProgram : <CFC program identifier> //optional: yes, modifier [UPDATE]
StandardCallTask := <Task type>; //optional: yes, type: ID
CustomCallTask := <Task type>; //optional: yes, type: ID
ParentFolder := <create folder ID; //optional: yes, type: ID
END_SEC
SEC CreateCFCModuleCall //optional: yes, modifier [UPDATE]
PreferredCFCProgram := <CFC program> //optional: yes; type: FB type
END_SEC
SEC CreateCFCIOCall : <CFC IO call ID> // optional: yes; modifier [UPDATE]
FB := <FB name>; // optional: no; type: FB type
PreferredCFCProgram := <CFC program> // optional: yes; type: FB type
FBInstanceBaseName := AInput; // optional: yes; type: identifier
END_SEC
SEC CreateFolder : <folder ID> //optional: yes, modifier [UPDATE]
ParentFolder := <folder name>; //optional: yes, type: ID
END_SEC
END_SECDetails regarding the syntax of definition types are described in the section Module Declaration.
Subsection: CreateCFCProgram
If a module declaration contains a section cfc.CFCCreation including the subsection CreateCFCProgram, a CFC program will be created for the assigned module type. The CFC program will be inserted below the target application of the next higher toplevel/decoupled parent module instance. The definition CustomCallTask or StandardCallTask can be used to define the task that calls the CFC program to be created.
The target of the section
CreateCFCProgramidentifies the CFC programs of this module type. Basically a module type can define and create several CFC programs for its module instance.A definition for
StandardCallTaskorCustomCallTaskmust exist, but only one definition is allowed.For
StandardCallTaskthe three IDsLOW,MEDIUM, andHIGHare available to define the task of the next higher toplevel/decoupled parent module instance.For
CustomCallTaskall target IDs are available that are used in the respective custom task of the next higher toplevel/decoupled parent module instance.
In
ParentFolderthe target ID of theCreateFoldersection can be entered. Then the created CFC program is added in this sub subfolder (CreateFolder).
Subsection: CreateCFCModuleCall
If a module declaration contains a section cfc.CFCCreation including the subsection CreateCFCProgram, a call of the module instance FB will be created for the assigned module type in the CFC program of the next higher parent module instance.
PreferredCFCProgramdefines the CFC program to be used if several program are available.
Subsection: CreateCFCIOCall
The section is used to mark I/Os of a module type or module declaration. For these I/Os FB instances of a defined type are created. Then calls of these FB instances are created within the CFC program.
The target of the
CreateCFCIOCallsection defines the module I/O ID for which a global I/O FB will be created. The created I/O FB will be called in a CFC program.FBdefines the type of function block which is globally instantiated and called for the I/O FB mentioned above.PreferredCFCProgramdefines the CFC program to be used if several program are available.FBInstanceBaseNamedefines a "base name" which is used for the naming of the created I/O FBs. If the definition does not exist the name of the module instance is used for the base instance.
Subsection: CreateFolder
This section contains parameters to create subfolders below the AC_CFC_Programs folder. Corresponding to this a ParentFolder can be defined in the CreateCFCProgram section. CFC programs are then generated in the directory which is created by the CreateFolder section. Folders itself can define a ParentFolder to specify further sub and sub-sub folders.
In
ParentFolderthe target ID of theCreateFoldersection can be entered. Then the created directory will be created in this subfolder (CreateFolder).
SEC cfc.CFCCreation
SEC CreateCFCProgram : Standard
StandardCallTask := MEDIUM;
ParentFolder := SubFolderUnderFolder;
END_SEC
SEC CreateFolder : SubFolderUnderFolder
ParentFolder := SubFolder;
END_SEC
END_SEC