Function blocks as local instances

Top 

 

Instead of calling a FB with a specially created instance DB you can also use a part of the current IDB (the IDB of the calling block). For this you have to declare a static variable of the type ‘FB x’ (x = FB-Nr) (not BLOCK_DB !). Than the call happens as follows:

 

       CALL #Local Instance

 

It is assumed that #local instance is the name of the static variable.

 

If you have entered the called FB into the symbol table the symbol of the FB will appear as data type of the static variable.