Clock7d1Ch
Clock7d1Ch (FB)
FUNCTION_BLOCK Clock7d1Ch
Short description
Timer switch with 7 weekdays, each with one switch-on / switch-off time and a binary overall output. The operating mode (on period or off period) can be defined for each weekday. Typical application: definition of the night / day operation of zone temperature control.
Representation

Interfaces
Inputs
xEn
BOOL
Enable input
Outputs
xActive
BOOL
Display of active switching periods
todActivatedFrom
TOD
Switch-on time of the current weekday
todActivatedTo
TOD
Switch-off time of the current weekday
Setpoints / Parameters
todMonFrom
TOD
TOD#07:00
Switch-on time - Monday
todMonTo
TOD
TOD#12:00
Switch-off time - Monday
xMonMode
BOOL
TRUE
Mode - switching period - Monday
todTueFrom
TOD
TOD#07:00
Switch-on time - Tuesday
todTueTo
TOD
TOD#12:00
Switch-off time - Tuesday
xTueMode
BOOL
TRUE
Mode - switching period - Tuesday
todWedFrom
TOD
TOD#07:00
Switch-on time - Wednesday
todWedTo
TOD
TOD#12:00
Switch-off time - Wednesday
xWedMode
BOOL
TRUE
Mode - switching period - Wednesday
todThuFrom
TOD
TOD#07:00
Switch-on time - Thursday
todThuTo
TOD
TOD#12:00
Switch-off time - Thursday
xThuMode
BOOL
TRUE
Mode - switching period - Thursday
todFriFrom
TOD
TOD#07:00
Switch-on time - Friday
todFriTo
TOD
TOD#12:00
Switch-off time - Friday
xFriMode
BOOL
TRUE
Mode - switching period - Friday
todSatFrom
TOD
TOD#07:00
Switch-on time - Saturday
todSatTo
TOD
TOD#12:00
Switch-off time - Saturday
xSatMode
BOOL
TRUE
Mode - switching period - Saturday
todSunFrom
TOD
TOD#07:00
Switch-on time - Sunday
todSunTo
TOD
TOD#12:00
Switch-off time - Sunday
xSunMode
BOOL
TRUE
Mode - switching period - Sunday
sNotice
STRING
‘Notice’
Label - time switch
Functional description
General
Weekdays 1 - 7 (Monday … Sunday, XXX = Mon, Tue, Wed, Thu, Fri, Sat, Sun)
Each of the seven weekdays is assigned its own switching period. Each switching period is defined by configurable data (switch-on time todXXXTimeFrom and switch-off time todXXXTimeTo) is defined. In addition, an operating mode (xXXXMode) can be set for each weekday. If the switch-off time is before the switch-on time, then for the check the switch-off time is set to the value of the switch-on time. A switching period is active if the current time on weekday XXX is within the switching period of weekday XXX (xXXXMode = TRUE). A switching period is active if the current time on weekday XXX is outside the switching period of weekday XXX (xXXXMode = FALSE).
Special case 1: switch-on time = switch-off time = TOD#00:00
With active on period ( xXXXMode = TRUE ) the switching period is not active all day. With active off period ( xXXXMode = FALSE ) the switching period is active all day.
Special case 2: switch-on time = switch-off time = TOD#23:59
With active on period (xXXXMode = TRUE) the switching period is active all day. With active off period (xXXXMode = FALSE) the switching period is not active all day.
Prerequisite for the use of function block Clock7d1Ch
For correct operation, the use of the TimeRead2 function block is required.
On period

Off period

Enable input xEn
xEn
xActive
todActivatedFrom
todActivatedTo
Note
FALSE
FALSE
unchanged
unchanged
FB deactivated
TRUE
State depending on the weekday, the time, and the switching period
Switch-on time of the switching period of the current weekday
Switch-off time of the switching period of the current weekday
FB activated
Display output xActive
The display output xActive assumes the state TRUE if, with active enable input (xEn = TRUE) the time on weekday XXX lies within the switching period of weekday XXX (xXXXMode = TRUE, on period). The display output xActive assumes the state TRUE if, with active enable input (xEn = TRUE) the time on weekday XXX lies outside the switching period of weekday XXX (xXXXMode = FALSE, off period). In all other cases the display output xActive assumes the state FALSE.
xEn
xActive
Switching period XXX
xXXXMode - XXX
Note
FALSE
FALSE
X
X
FB deactivated
TRUE
FALSE
FALSE
TRUE
On period not active
TRUE
TRUE
TRUE
TRUE
On period active
TRUE
TRUE
FALSE
FALSE
Off period not active
TRUE
FALSE
TRUE
FALSE
Off period active
Switch-on time of the switching period of the current weekday todActivatedFrom
This output permanently shows the switch-on time of the switching period of the current weekday, if the enable input (xEn = TRUE) is active. In all other situations it is not changed. In special cases 1 and 2, the value TOD#00:00 is always displayed.
Switch-off time of the switching period of the current weekday todActivatedTo
This output permanently shows the switch-off time of the switching period of the current weekday, if the enable input (xEn = TRUE) is active. In all other situations it is not changed. In special case 1, the value TOD#00:00 is always displayed; in special case 2, the value TOD#23:59 is displayed.
Visualization
Suitable visualization element from the HVACV Visu Library: FB_Clock7d1Ch
Representation
Interfaces visualization element
FB_Clock7d1Ch
Clock7d1Ch
VAR_IN_OUT
Enter FB Clock7d1Ch here, e.g. PRG.Clock7d1Ch
Or visualization element Clock7d1Ch_D as a dialog. Call up the dialog, e.g. via the visualization element Clock7d1Ch_Button
Interfaces visualization element
FB_Clock7d1Ch
Clock7d1Ch
VAR_IN_OUT
Enter FB Clock7d1Ch here, e.g. PRG.Clock7d1Ch
ClockNumber
INT
VAR_INPUT
Clock number. Used only for displaying the title.
BMS_Active
BOOL
VAR_INPUT
BMS (Building Management System) GLT (building management and control system). If BMS_Active = TRUE, input/editing of the clocks is disabled because they can then only be set via the BMS. Times can then only be viewed.
DisableInput
BOOL
VAR_INPUT
DisableInput = TRUE times of the weekly clocks can only be viewed and not edited.
Note: VAR_IN_OUT interfaces must be assigned; VAR_INPUT is optional.
CODESYS
InOut:
Input
xEn
BOOL
Input Const
todMonFrom
TOD
TIME_OF_DAY#6:0
Input Const
todMonTo
TOD
TIME_OF_DAY#18:0
Input Const
xMonMode
BOOL
TRUE
Input Const
todTueFrom
TOD
TIME_OF_DAY#6:0
Input Const
todTueTo
TOD
TIME_OF_DAY#18:0
Input Const
xTueMode
BOOL
TRUE
Input Const
todWedFrom
TOD
TIME_OF_DAY#6:0
Input Const
todWedTo
TOD
TIME_OF_DAY#18:0
Input Const
xWedMode
BOOL
TRUE
Input Const
todThuFrom
TOD
TIME_OF_DAY#6:0
Input Const
todThuTo
TOD
TIME_OF_DAY#18:0
Input Const
xThuMode
BOOL
TRUE
Input Const
todFriFrom
TOD
TIME_OF_DAY#6:0
Input Const
todFriTo
TOD
TIME_OF_DAY#18:0
Input Const
xFriMode
BOOL
TRUE
Input Const
todSatFrom
TOD
TIME_OF_DAY#6:0
Input Const
todSatTo
TOD
TIME_OF_DAY#18:0
Input Const
xSatMode
BOOL
TRUE
Input Const
todSunFrom
TOD
TIME_OF_DAY#6:0
Input Const
todSunTo
TOD
TIME_OF_DAY#18:0
Input Const
xSunMode
BOOL
TRUE
Input Const
sNotice
STRING
‘Notice’
Input Const
eMode
eClockMode
eClockMode.EachModeSeparately
Output
xActive
BOOL
Output
todActivatedFrom
TOD
Output
todActivatedTo
TOD
Last updated

