A function block instance is always stored completely in memory. This is necessary
so that the same code can work on different instances. If only one variable in a function
block is marked with PERSISTENT
, then the function block instance is stored completely with all variables in remanent
memory, although only the one variable is treated as persistent. However, non-volatile
memory is not available to the same extent as main memory.
A function block with a pointer to an instance in SRAM as a variable is not stored in the protected memory.