Working with user-defined function blocks
User-defined function blocks (UDFBs) are composite function blocks constructed by combining other function blocks and/or other user-defined function blocks in a sequence to perform higher-level control operations.
Like other logic blocks, UDFBs have parameters and instance (member variables) data. Use the UDFB block type to define function blocks and use them in controller programs with the standard function blocks provided in the
FactoryTalk Design Workbench
instruction set.UDFB operation
UDFBs operate the same way as other instruction blocks within a program. UDFBs can be used to call other types of blocks or other UDFBs.
In
Toolbox
, UDFBs are included in the User-defined
category.Optimal use of UDFBs
UDFBs encapsulates commonly used functions and are best at providing a specific type of functionality or device control. UDFBs are designed to fully encapsulate the code and data associated with the instruction. The logic inside a UDFB uses only the local variables and parameters defined by the instruction definition. There is no direct programmatic access to the global or program scope variables. UDFB is a standalone component that can execute in any program that calls it.
Provide Feedback