List of facade elements
The data of all windows (facade elements) per facade are stored within the program in a field of structural elements of the type ST_BARFacadeElement.
The declaration is global, because the management function block FB_BARFacadeElementEntry as well as the shading correction FB_BARShadingCorrection / FB_BARShadingCorrectionSouth access this field directly via input/output variable:
VAR_GLOBAL
arrFacadeElement : ARRAY[1..iColumnsPerFacade, 1..iRowsPerFacade] OF ST_BARFacadeElement;
END_VAR
The variables iColumnsPerFacade and iRowsPerFacade thereby define the upper limit of the available elements and are to be globally declared as constants:
VAR_GLOBAL CONSTANT
iRowsPerFacade : INT :=10;
iColumnsPerFacade : INT :=20;
END_VAR