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 reads the information from this list. The management function block FB_BA_ShdObjEntry reads and writes it as input/output variable.
It is therefore advisable to declare this list globally:
VAR_GLOBAL
aShdObj : ARRAY[1..BA_Param.nSunPrt_MaxShdObj] OF ST_BA_ShdObj;
END_VAR
The variable nSunPrt_MaxShdObj represents the upper limit of the available elements and is defined as a global constant within the program library:
VAR_GLOBAL CONSTANT
nSunPrt_MaxShdObj : UINT := 20;
END_VAR