Delta ISPSoft — 7.2.7 Memory Configuration of Function Block

Chapter 7 Function Block and Library The calculation for the example is as follows. The size of the memory that a function block instance occupies is 2 words. There are four function block instances in the example, and therefore the size is 8 words. The size of the memory that a local symbol whose data type is not a function block in a function block instance occupies is calculated as follows.  Function block instance INS_A  Two words (DWROD x 1) + Four words (LREAL x 1) The sum is 2+4=6 (words).  Function block instance INS_B  One word (WORD x 1) + Four words (REAL x 2) The sum is 1+4=5 (words).

 Function block instance INS_C1/INS_C2 The size of the memory that a local symbol occupies is calculated by the word. The size which is less than one word is calculated as one word. As a result, the size of the memory that a local symbol whose data type is BOOL occupies is calculated as one word. The size of the memory that a local symbol whose array type is BOOL and whose array size is 22 elements occupies is larger than one word, but is less than two words. The size is calculated as two words. The calculation is as follows.  Two words (BOOL x 2) + Two words (Boolean array which is composed of twenty-two elements x 1) The sum is 2+2=4.

There are two instances of function block C, and therefore the size of the memory that the two function block instances occupy is 2x4=8 (words). The size of the memory that the function block instances and the local symbols occupy is 8+6+5+8=27 (words). 7-27 Function block B One symbol whose data type is WORD. Two symbols whose data type is REAL. Two inferior function block instances. Function block C Two symbols whose data type is BOOL. One symbol whose array type is BOOL and whose array size is 22 elements.