Commands and functions
P.
188 of 349
Hourly time switch
Minute time switch
The hourly timer is defined as follows:
Definition
●
mtime(
mm,ss
)
with:
mm
: Minutes (0..59)
ss
: Seconds (0..59)
Arguments
●
2 arguments are of data type u08
Effect
●
The return value is 0b01, if the current minute-second-time of the Enertex
®
EibPC's system
clock is not equal to
mm
:
ss
(the hour is not relevant). When the time is reached (and
matches exactly), the output value is set to 1b01 (if the date is exceeded, it returns to
0b01).
Data type result (Return)
●
Data type b01
Example: Example hour time switch
Every hour, always 22 minutes, 7 seconds after a full hour, the variable LightActuatorOn will
be set to '0'.
Implementation in the user program:
if mtime(22,07) then LightActuatorOn=0b01 endif
The minute timer is defined as follows:
Definition
●
stime(
ss
)
with:
ss
: Seconds (0..59)
Arguments
●
1 argument is of data type u08
Effect
●
The return value is 0b01, when the current second-time of the Enertex® EibPC's system
clock is not equal to
ss
(hour and minute are not relevant). When the time is reached (and
matches exactly), the output value is set to 1b01 (if the date is exceeded, it returns to
0b01).
Data type result (Return)
●
Data type b01
Example: Example minute time switch
Always after 34 seconds after a full minute, the variable WindowContacts should be set to '0'.
Always after 5 seconds after a full minute, the variable should be set to '1'.
Implementation in the user program:
if stime(34) then WindowContacts=0 endif
if stime(5) then WindowContacts=1 endif
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]