Programming - First steps
P.
58 of 349
Shading
Variables can also be arguments of
the macros.
We use the example on page 28 again.
Now, we want to change the automation in such a way that the shading is performed via the release
of the switch object, but only if it is already brighter than 5000 Luz outside at 9:00 in the morning. In
the evening, all roller blinds should move to the night position (roller blinds down).
The site may be Nuremberg (49°27', 11° 5'). You can modify this data set by using the menu O
PTIONS
– C
OORDINATES
FOR
THE
S
UN
POSITION
CALCULATION
SETTING
(see page 184).
And here is the resulting program. You should already know all of the programming elements. This
example illustrates only the “mixing“ at the usage of macros and programming.
[Location]
// Longitude and Latitude of the installation location
11.083333333333334
49.45
[Macros]
//Macros
ShadingRolloEastTime(ShadeRelease,"Window-East-2/5/1","Window-East-2/5/1",5000)
ShadingRolloSouthTime(ShadePassing,"WindowSouth-2/5/2","WindowSouthStop-2/5/5",4500)
ShadingRolloWestTime(ShadePassing,"WindowWest-2/5/3",""WindowWestStop-2/5/6",4000)
[MacroLibs]
//Macro-Libraries
EnertexBeschattung.lib
[ETS-ESF]
// From the ets exported ESF-Data
Shading.esf
[EibPC]
ShadePassing=OFF
if ("PassingShading-2/5/0"==ON) and ("Light-2/1/1">5000f16) and chtime(9,00,00) then \\
ShadePassing=ON endif
// At sunset...
if sun()==OFF then \\
write("Window-East-2/5/1",EIN); write("WindowSouth-2/5/2",ON); write("WindowWest-2/5/3",ON) endif
Whether the arguments of macros may be variables or group of addresses, or both, depends on the
implementation of the macro. At the specified macro libraries, this is always stated within the macro-
wizard.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]