For the complete documentation index, see llms.txt. This page is also available as Markdown.

ClockMaster32

ClockMaster32 (FB)

FUNCTION_BLOCK ClockMaster32 EXTENDS LAT.Element IMPLEMENTS IUhrProtocol, IUhr

Short description

Master function block for a clock system with 32 weekday clocks, 30 public holidays, 10 vacation periods and 5 special switching times. The weekday clocks each contain one switch-on and switch-off time per weekday (448 switching points). Furthermore, 30 public holidays (country-specific), 10 vacation periods (start and end date) as well as 5 special switching times (switch-on and switch-off time and date) can be defined.

Representation

Functional description

General

This function block serves as the Master function block for a clock system with 32 weekday clocks, 30 public holidays, 10 vacation periods and 5 special switching times. It allows the user to specify the time and date values (visualization) and, taking into account the current time and current date, provides the resulting states (weekday clock channel 1 - 32, public holiday channel, vacation channel as well as special switching times channel) to the maximum of 63 Slave function blocks ClockSlave32. In the Slave function blocks, the assignment to the channels (weekday clock channel 1 - 32, public holiday channel, vacation channel as well as special switching times channel) is now made by binary variables (FALSE = not assigned, TRUE = assigned). The connection between the Master function block and the Slave function blocks is established via the output itfToClockSlave32 or the inputs *itfFromClockMaster32 *. The inputs xAllOn or xAllOff allow (input = TRUE) the central activation/deactivation of all outputs xClockActive of all connected Slave function blocks. The input xAllOff has higher priority than the input xAllOn The following function blocks are used to define the time and date values:

Clock7d1Ch

PublicHoliday

Holiday

SwitchTimeS

Example representation in combination with Slave clocks:

Visualization

Representation

The Slave clocks are automatically attached in the order in which they are called in the program. The maximum number is limited to 144 Slave clocks in the Visu element. In ClockMaster32 the maximum number can be adjusted via the library constant.

Interface Visu element

Name
Data type
Type
Initial value
Function

FB_ClockMaster32

ClockMaster32

VAR_IN_OUT

Enter FB ClockMaster32 here e.g. PRG.ClockMaster32

BMS_Active

BOOL

VAR_INPUT

BMS (Building Management System) GLT (building management system). If BMS_Active = TRUE, input/editing of the clocks is disabled, as they can then only be set via the BMS. Time values can then only be viewed.

DisableInput

BOOL

VAR_INPUT

DisableInpput = TRUE the times of the weekday clocks can only be viewed and not edited.

Note: VAR_IN_OUT interfaces must be assigned, VAR_INPUT are optional.

CODESYS

InOut:

Scope
Name
Type
Initial

Input

xAllOn

BOOL

Input

xAllOff

BOOL

Input Const

eCountry

eCountryList

eCountryList.DE

Input Const

ActiveClocksVisu

eActiveClocksVisu

eActiveClocksVisu.Activate16Clocks

Output

itfToClockSlave32

IUhrProtocol

THIS^

Output

ctClockSlave32

CAA.COUNT

Last updated