CAA FB Factory (LIB)
- Version
3.5.19.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 open in this library folder Source and double click on FBFactoryTestProjectarchive.
This 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
.

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

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.

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

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

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.

By calling up the method Create
it is now possible to dynamically create a FB instance.
Contents:
ERROR
(ENUM)Factory
Instance
Interfaces
IData
(ITF)IFactory
(ITF)Private
IFactory.prvAllocInstMem
(METH)IFactory.prvFreeInstMem
(METH)IFactory.prvGetInstPointer
(METH)IFactory.prvInsertInst
(METH)IFactory.prvInstCount
(PROP)IFactory.prvInstInit
(METH)IFactory.prvInstPoolAdr
(PROP)IFactory.prvInstPoolExtendsFactor
(PROP)IFactory.prvInstPoolSize
(PROP)IFactory.prvInstSize
(PROP)IFactory.prvRemoveInst
(METH)
IInstance
(ITF)
Indices and tables
- 1
- Based on CAA FB Factory.library, last modified 02.03.2023, 10:51:12. LibDoc 4.3.0.0The content file CAA FB Factory.library.json was generated with CODESYS V3.5 SP16 Patch 3 on 02.03.2023, 10:51:14.