PublicHoliday

PublicHoliday (FB)

FUNCTION_BLOCK PublicHoliday

Short description

Display of the states of public holidays. Typical application: Detection of public holidays in a clock system

Representation

Interfaces

Inputs

Name
Data type
Value range
Initial value
Function

xEn

BOOL

Enable / disable the function (FALSE = disabled, TRUE = enabled)

astPublicHoliday

ARRAY[0..29] OF HVACTYPES.stPublicHoliday

Passing of the defined public holidays with name, date and enable status

Outputs

Name
Data type
Value range
Initial value
Function

xActive

BOOL

Display - status - public holidays (FALSE = not active, TRUE = active)

sName

STRING(30)

Name of the active public holiday

Setpoints / parameters

Name
Data type
Value range
Initial value
Function

eCountry

eCountryList

eCountryList.UserDefined, eCountryList.DE

eCountryList.DE

Selection of the country-specific public holidays

Function description

General

This function block determines whether a public holiday is active and displays the name for that holiday. The function block must be enabled via the input xEn to be activated (TRUE = function active). The public holidays can be defined via the structure stPublicHoliday. Here the name, the date of the holiday and the enable status are specified. Holidays can be defined as a fixed date, with an offset to Easter or a weekday before a fixed date. The setpoint / parameter eCountry allows the specification of the country whose holidays should be used. Currently only the holidays for Germany are implemented.

Visualization

Representation

Visu-Element interfaces

Name
Data type
Type
Initial value
Function

FB_PublicHoliday

PublicHoliday

VAR_IN_OUT

Enter FB PublicHoliday here e.g. PRG.PublicHoliday

BMS_Active

BOOL

VAR_INPUT

BMS (Building Management System) GLT (building management). If BMS_Active = TRUE the 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. /// - BMS (Building Management System) GLT (Building control technology). If BMS_Active = TRUE the input/editing of the clocks is disabled because they can then only be set via the BMS. Times can then only be viewed.

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

CODESYS

InOut:

Scope
Name
Type
Initial

Input

xEn

BOOL

TRUE

Input

astPublicHoliday

ARRAY [0..29] OF stPublicHoliday

[STRUCT(sName := '00', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '01', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '02', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '03', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '04', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '05', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '06', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '07', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '08', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '09', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '10', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '11', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '12', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '13', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '14', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '15', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '16', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '17', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '18', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '19', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '20', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '21', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '22', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '23', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := '24', datDate := DATE#1970-1-1, xEnable := FALSE), STRUCT(sName := 'Public Holiday 1', datDate := DATE#2022-1-1, xEnable := TRUE), STRUCT(sName := 'Public Holiday 2', datDate := DATE#2022-1-1, xEnable := TRUE), STRUCT(sName := 'Public Holiday 3', datDate := DATE#2022-1-1, xEnable := TRUE), STRUCT(sName := 'Public Holiday 4', datDate := DATE#2022-1-1, xEnable := TRUE), STRUCT(sName := 'Public Holiday 5', datDate := DATE#2022-1-1, xEnable := TRUE)]

Input Const

eCountry

eCountryList

eCountryList.DE

Output

xActive

BOOL

Output

sName

STRING(30)

Last updated