Programming - First steps
P.
47 of 349
A hallway
with time control
A time switch
Commissioning
Switch
Example 4: A motion detector, switches and brightness depending on the time of day
RS 232
EibPC
EibPC
“Lamp-1/1/1“
“Dimmer–1/1/1“
“DimmerValue-1/1/2“
“Switch-1/0/0“
“Motion detector
-1/2/0“
KNX-Bus
Figure 12: Block Diagram 3
We use the same example as in Figure 9 (Fig. 12). The dimmer will change its intensity time-
controlled.
Here is our own task
If the switch is pressed “ON“, the lamp should turn on and the dimmer should go to 100%. If it
goes to OFF, the lights will go out. If the switch is active, the motion is to be disabled.
If the motion detector sends an ON telegram, the dimmer should go to
–
50% of its luminosity, if it is after 20:00 Clock
–
30% of its luminosity, if it is after 23:00 Clock
–
10% of its luminosity, if it is after 3:00 Clock
–
100% of its luminosity, if it is after 7:30 Clock
With our previous considerations in mind, you can do this almost without help. But you should know
how to program a timeswitch. There is the time function
htime
:
htime
(hour, minute, second)
The function returns a logical
ON
(1
b01
), when the day is
precisely
achieved. In the other case it is
OFF
(0
b01
). Using an if statement, it can now be changed at any time.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]