Programming for experts
P.
104 of 349
States of realisation
Direct picture of the “state machine”
in EibPC
TFrueh : morning (from 0:00 clock)
Presence simulation
State 1:
Description:
Early mode
Target:
It should not be run through a macro regardless of whether
"Presence-8/1/1"
is ON or OFF.
FreigabeVar
has to be set to OFF respectively has to remain in the (OFF-)-condition.
State 2:
Description:
Day mode
Target:
If
"Presence-8/1/1"
is set to ON,
FreigabeVar
has to be set to ON, the macros will be
activated, if
"Presence-8/1/1"
is set to OFF.
FreigabeVar
should set to OFF the macros will
be deactivated.
If the group address
"Presence-8/1/1"
is changed (bus telegram/user) should the
FreigabeVar
immediately accept its value.
State 3:
Description:
Late mode
Target:
If
"Anwesenheit-8/1/1"
is set to ON,
ReleaseVar
should be set to ON, the macros so are
activated, if
"Presence-8/1/1"
is set to OFF.
FreigabeVar
should be set to OFF the macros
will deactivated.
This can now directly be converted into a program:
FreigabeVar=AUS
TFrueh=chtime(00,00,01) and !chtime(12,00,00)
// Zustand 1: Frühmodus
if TFrueh and !sun() then FreigabeVar=AUS endif
// Zustand 2: TagModus
if sun() and change("Anwesenheit-8/1/1")
then FreigabeVar="Anwesenheit-8/1/1" endif
// Zustand3 Spätmodus
if !TFrueh and !sun() then FreigabeVar="Anwesenheit-8/1/1" endif
Especially here is the use of variable
TFrueh.
This is realized via a link from one timer at midnight
and a second at noon. This is ensures that
TFrueh
is set at 0:00 clock to ON and from the afternoon
to OFF.
The macro collection includes macros for presence simulation. The basis concept of these macros is
to be explained in the following.
With a presence simulation two states can be differentiated.
1. Record
During this phase selected group addresses are recorded before. Group telegrams are
often triggered by residents e.g. upon actuation of switches. The recording is usually
performed over a 2-week interval in which the recording continuously overwrites the old
values.
2. Play
If the resident of a property e.g. goes on vacation the group telegrams will now be triggered
by the Enertex® EibPC so that outsiders will have the impression of presence of the
residents. There the play has to take place same day and time, so that e.g. the recording
of Saturday is played on a Saturday again too.
As above mentioned conditions the following is needed:
•
Determination of raw data of the telegrams
•
Determination of sending group address
•
Determination of telegrams arrival time
•
Recording of data
•
Sending of raw data time-shifted to the bus
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]