E_TcMemoryArea

The F_CheckMemoryArea function returns information about the memory area in which the requested variable with the specified size is located. A return value of type E_TcMemoryArea is used for this purpose.

{attribute 'qualified_only'}
{attribute 'strict'}
TYPE E_TcMemoryArea :
(
    Unknown := 0,
    Static  := 1, // static PLC memory
    Dynamic := 2, // dynamic memory
    CNC     := 3
)UDINT;
END_TYPE

Unknown: The memory area is unknown. For example, this could be memory in a Windows context. The memory area is also output as unknown if the specified memory size results in two different memory areas being involved. Furthermore, the memory area is output as unknown if it is a stack memory.

Static: These are static PLC memories.

Dynamic: These are dynamically allocated memories, which were allocated during the runtime or during the initialization phase of the PLC.

CNC: These are memories of the CNC driver.

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.4022

PC or CX (x86, x64, ARM)

Tc2_System (system)