CAA FB Factory (LIB)

Version

3.5.17.0

Namespace

FBF

Author

3S - Smart Software Solutions GmbH

Placeholder

CAA FB Factory

Description 1

This library provides a base implementation of an function block factory. For further information about how to use the FactoryBase function block please download FBFactoryTest.projectarchive There you will find a test project which uses a test library that demonsrates the usage of the FactoryBase function block. It is recommended to look at how the exemple programm (PLC_PRG) works by setting a breakpoint and stepping into each action of the program. Do not go online in simulation mode! Moreover the documentation of the FB Factory Test Library (which is already added to the Library Manager in the test project) explains what is done in each part of the library.

There is a template for libraries in CODESYS which is called CODESYS Library which assists you building your own FB Factory. Therefore please open a new project and choose the category Libraries and afterwads the template CODESYS Library.

../Images/1_NewProject_CODESYSLibrary.png

In this project the folder Templates contains the subfolder FBFactory with all the important FBs, methods and properties.

../Images/2_OrdnerFBFactory.png

All relevant function blocks should be copied in the folder with the title Function Blocks in order to be able to modify them.

Afterwards change the names of every element to suitable expressions.

../Images/3_OrdnerFunctionBlocks.png

By clicking on each element with the right mouse button and choosing Properties -> Build you can deactivate Exclude from build

../Images/4_ExcludeFromBuild.png

Moreover it is advisable to adapt the array abyPoolMemory in the function block TestFBFactory to ones own needs.

../Images/5_TestFBFactory_Array.png

Make sure that everywhere in TestFBFactory (for exemple in the first line of the method TestFBFactory.Create) the expression Custom is substituted by the name you chose for these elements.

../Images/6_TestFBFactory.Create.png

By calling up the method Create it is now possible to dynamically create a FB instance.

Contents:

Indices and tables

1
Based on CAA FB Factory.library, last modified 20.04.2021, 14:33:14. LibDoc 3.5.16.40
The content file CAA FB Factory.library.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 14:33:14.