Commands and functions
P.
189 of 349
Comparator time switches
Basics
Weekly comparator time
switch
Comparator time switches are objects that allow a time comparison. Depending on the result of the
comparison, a bus telegram can then be initiated, for example, every night from 1:00 to 6:00 the
garage lights are turned off. If the set time is reached, they are 1b01 until the next day, in contrast to
the time switches, which jump only at the exact time to 1b01 and immediately after back to 0b01.
Thus, comparison time switches are very similar to the more common timers, but have the
advantage, that the time must be not be reached accurately (e. g. power failure, reboot).
As the reference time for all comparator time switches, the system time of the Enertex
®
EibPC is
used (see also page 149), which is given the Enertex
®
EibPC either by the Internet or via a KNX
system device.
To facilitate the application, we distinguish four types of comparator time switches:
●
The weekly comparator time switch which triggers one action per week,
●
the daily comparator time switch which runs one action every day,
●
the hourly comparator time switch which is active once hourly, and finally
●
the minute comparator time switch which triggers one action per minute.
A weekly comparator time switch is defined as follows:
Definition
●
cwtime(
hh,mm,ss,dd
)
with:
ss
: Seconds (0..59)
mm
: Minutes (0..59)
hh
: Hours (0..23)
dd
: Day (0 = Sunday, 6 = Saturday)
Arguments
●
4 arguments are of data type u08
Effect
●
The return value is 0b01, if the current time and day of Enertex® EibPC's system clock are
not equal to
hh
:
mm
:
ss
and
dd
. When the time is reached, the output value rises to 1b01
and remains at this value until the following Sunday, 00:00:00.
Data type result (Return)
●
Data type b01
Example: Week comparator time switch
Every week from Tuesday at 01:00 Clock, 30 seconds, the variable LightActuatorOn is to be
set to '0'. With the beginning of a new week, the variable should be set back to '1'.
Implementation in the user program:
if cwtime(01,00,30,THUSDAY) then LightActuatorOn=0 else LightActuatorOn=1 endif
Note:
1.
For the days weekdays and weekend, constants are defined (written in capitals), e. g.
if cwtime(01,00,30,WEEKEND) then LightActuatorOn=0 else LightActuatorOn=1 endif
2.
cwtime
and WEEKDAYS returns a constant values of 1b01.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]