List of shading elements

The data of all shading objects (building components, trees, etc.) per facade are stored in a field of structure elements of type ST_BA_ShdObj within the program.

The shading correction FB_BA_ShdCorr only reads the information from this list, while the management function block FB_BA_ShdObjEntry has read and write access as input/output variable.
It is therefore advisable to declare this list globally:

VAR_GLOBAL
     arrShdObj : ARRAY[1..gBA_cMaxShdObj] OF ST_BA_ShdObj;
END_VAR


The variable gBA_cMaxShdObj represents the upper limit of the available elements and is defined as a global constant within the program library:

VAR_GLOBAL CONSTANT
     gBA_cMaxShdObj  : INT := 20;
END_VAR