The function block allocates a memory block for a "Dynamic Text". The value of the input signal “size” specifies the number of allocated bytes. The function block supports only sizes between 1 and 4096 bytes. In other cases a memory block with the size 0 is provided at the output “dtxt”.
After the allocation the text of the input “init” is copied into the memory block. The remaining bytes in the memory block are initialized with 0. If the initialization text plus the terminating 0 is too long for the memory block, only a part of the text is copied.