beckhoff TE1200 — 4.4.1.3 Stack size [number of bytes]

Configuration | Metrics 4.4.1.2 Variables size [number of bytes] | Variables size [number of bytes] Sample: FUNCTION F_Sample : INT VAR_INPUT a,b : INT; END_VAR VAR c,d : INT; END_VAR VAR_STAT f,g,h : INT; END_VAR The function has three static variables of type INT ( f, g, h ), each of which requires 2 bytes of storage space. F_Sample therefore has a variable size of 6 bytes. 4.4.1.3 Stack size [number of bytes] | Stack size [number of bytes] Sample: FUNCTION F_Sample : INT VAR_INPUT a,b : INT; END_VAR VAR c,d,e : INT; END_VAR VAR_STAT f,g,h : INT; END_VAR c := b; d := a; e := a + b; TE1200 95 Version:

2.11.1 Title short form Code size Categories Informative, efficiency Definition Number of bytes that a function block contributes to the application code Further information The number also depends on the code generator. For example, the code generator for Arm® processors generally generates more bytes than the code generator for x86 processors. Title short form Variables size Categories Informative, efficiency Definition Size of the static memory used by the object Further information For function blocks, this is the size used for an instance of this function block (which may also contain memory gaps depending on the memory alignment).

For programs, functions and global variable lists, this is the sum of the size of all static variables. Title short form Stack size Categories Informative, efficient, reliable Definition Number of bytes required to call a function or function block Further information Input variables and output variables are aligned with the memory. This can create a gap between these variables and the local variables. This gap is counted. Return values from called functions that do not fit into a register are pushed onto the stack. The largest of these values determines the additionally allocated memory, which is also counted.

Functions or function blocks that are called within the POUs under consideration have their own stack frame. Therefore, the memory for such calls does not count. Depending on the code generator used, intermediate results of calculations also use the stack. These results are not counted.