Chapter 7 Function Block and Library The function block instances produced when the program is compiled according to the relation described above are as follows. Owing to the fact two instances of function block C are declared in the local symbol table in function block B, two instances of function block C are produced when another instance of function block B is produced. Since function block D is declared in the global symbol table, the function of the function block system only produces one instance of function block D. Although function block D is called by the two POUs, instance and the data stored in the function block instance can be used by all the POUs.
In other words, the the same instance of function block D is executed in the two POUs. The items which will appear in the project management area after the program is compiled are shown in the figure below. The superior POU of the program type and the inferior POUs are in the brackets at the end of a function block instance. Users can not declare function block instances in the local symbol table in a function block in a project for a DVP series PLC. If a function block wants to call another function block, the inferior function block instance must be declared in the global symbol table.
As a result, users have to be more careful about the correctness of the data when a function block calls another function block. If an independent memory block is required, users have to declare another instance of a function block in the global symbol table. 7-23