Predefined object pool
Dynamic objects are created with the __NEW
operator. If the number of objects to be created is known or can be estimated at the time of the first PLC start, the library provides a predefined object pool. This is more memory efficient than using the __NEW
operator. The elements named nPool_XX
in the BACnet_Param
section of the library GVLs can be set up to save resources.
For example, if 42 instances of a FB_BACnet_AV
are used, the variable nPoolAV
can be set to 42 as the default value. If more objects are created than are available in the pool, the creation process will continue to use the __NEW
operator.