PoolExtender (FB)

FUNCTION_BLOCK FINAL PoolExtender EXTENDS WorkerTask IMPLEMENTS IPoolExtender

The library Memory Block Manager provides two different types of pools
- Block-Pool. See: POOL_TYPE.BLOCK_POOL
- Message-Pool. See: POOL_TYPE.MESSAGE_POOL
This function block provides a possibility to extend a pool instance with the help of a background task.
The properties for the background task can be set by library paramters
VAR
    hPool : MBM.HANDLE := MBM.PoolCreateH(ctNumBlocks:=10, szBlockSize:=100, 0);
    hJob  : MBM.HANDLE;
    xExtend : BOOL;
    eErrorID : AJM.ERROR;
END_VAR

IF xExtend THEN
       eErrorID := AJM.g_PoolExtender.ExtendPool(udiNumElements:=10, hPool:=hPool, hJob:=hJob);
       xExtend := (eErrorID = AJM.ERROR.PENDING);
END_IF
InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input Const

itfAsyncProperty

IAsyncProperty

WorkerTask

udiJobCount

UDINT

POOL_EXTENDER_N_JOBS

This is the maximum number of orders that the PoolExtender can accept at one time

Methods:

Structure: