Function blocks VAR_OUTPUT VAR_OUTPUT fZenith :LREAL; (* topocentric zenith angle [degrees] *) fAzimuth :LREAL; (* topocentric azimuth angle (eastward from north) [ 0 to 360 degree s] *) fAzimuth180 :LREAL; (* topocentric azimuth angle (westward from south) [-180 to 180 degr ees] *) fIncidence :LREAL; (* surface incidence angle [degrees] *) fSuntransit :LREAL; (* local sun transit time (or solar noon) [fractional hour] *) fSunrise :LREAL; (* local sunrise time (+/- 30 seconds) [fractional hour] *) fSunset :LREAL; (* local sunset TIME (+/- 30 seconds) [fractional hour] *) bError :BOOL; (* error flag *) iErrorCode :UINT; (* error code *) END_VAR TS3900 15 Version:
1.1 eFunction Via this enumeration value (E SPA FunctionCode _ _ [} 18]) the type of calculations can be selected. For example, the calculation can be limited to the sun angles, if information on sunrise etc. is not required. fZenith The zenith angle of the sun is defined as the angle between the vertical above the observer (zenith) and the connecting line between the observer and the sun. If the sun is absolutely vertical above the observer, the zenith angle is 0°. Sometimes the sun elevation angle (SunElevation or Altitude) is also used. The following applies: 90° - zenith angle = altitude fAzimuth The azimuth coincides with the horizon.
North is 0°, with the value increasing in clockwise direction. (east = 90°, south=180°, west=270°). A graphical representation of the sun angles can be found on the overview page [} 8]. fAzimuth180 This value corresponds in meaning to the azimuth. However, the azimuth180 is assigned the value 0° in the south. From there the value increases positively in clockwise direction and negatively in counter- clockwise direction. (azimuth-180° = azimuth180) fIncidence fIncidence indicates the angle of solar incidence in relation to the surface specified at the input. If the surface is horizontal fIncidence matches the value of fZenith. fSuntransit fSuntransit indicates the time of the solar apex.
It is specified in hours and used the time zone created at the input. fSunrise fSunrise indicates the sunrise time. It is specified in hours and used the time zone created at the input. fSunset fSunset indicates the sunset time. It is specified in hours and used the time zone created at the input. bError bError is TRUE if an error has occurred. In this case iErrorCode indicates the respective error code. iErrorCode iErrorCode indicates the error value for the calculation. If an error has occurred this value is not equal zero. All possible error values are summarized in the enumeration E SPA ErrorCode [} 19].