Commands and functions
P.
184 of 349
Shading and the
position of the sun
Sun - Day or night?
Azimuth
The function
sun
returns whether it is day or night. It requires the Enertex
®
EibPC's knowledge of the
longitude and latitude of the concerned location.
These can be entered in Enertex
®
EibStudio.
Definition
●
Function
sun
()
Effect
●
Return Value: The return value is 1 binary, if it is day and 0 binary, if it is night.
Data type result (Return)
●
Data type b01
Example 2: Solar altitude
If it is day, the variable SunblindsOn should be set to 0.
The implementation in the user program is then:
if (sun()==1b01) then SunblindsOn=0 endif
if (sun()==BRIGHT) then SunblindsOn=0 endif
“BRIGHT“ is a predefined variable (see page 339) with the binary value 1b01 and hence can be
stated as a comparison operator instead of 1b01.
Definition
●
Function
azimuth
()
Arguments
●
None. However, the Enertex
®
EibPC should know the longitude and latitude of the place.
These can be entered in Enertex
®
EibStudio (see page 184).
Effect
●
This function cyclically (time frame: 5 minutes) calculates the azimuth of the sun in
degrees, north through east.
(Source: Wikipedia)
Data type (Return)
●
Data type f32
Example 3: Calculate azimuth
Calculate the azimuth angle of the sun for the location of the Enertex
®
EibPC every 5 minutes.
The implementation in the user program then reads:
AAngle=azimuth()
Note:
This function is needed in house awnings. In the library EnertexBeschattung.lib you will find detailed
examples.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]