# ClockSlave32

## `ClockSlave32` (FB)

FUNCTION\_BLOCK ClockSlave32 EXTENDS Uhr\_Base IMPLEMENTS IUhr

### Short description

> Slave - function block for a clock system with 32 weekly timers, 30 public holidays, 10 holiday periods and 5 special switching times.

### Representation

<figure><img src="/files/ee4cce39bc79640942693764582b0f99abc5af7a" alt=""><figcaption></figcaption></figure>

### Function description

#### General

This function block serves as a slave function block for a clock system with 32 weekly timers, 30 public holidays, 10 holiday periods and 5 special switching times.\
It allows individual activation / deactivation of the 32 weekly timer channels, the public holiday channel, the holiday channel and the special switching times channel (FALSE = deactivation, TRUE = activation).\
The connection between the master function block and the slave function blocks is made via the output *itfToClockSlave32* or the inputs *itfFromClockMaster32* established.\
The inputs *sTitle* or *sLine1* allow specifying the label of the title or line 1 in the visualization.

#### State of the slave channel *xActive*

The output *xActive* (FALSE = not active, TRUE = active) is determined by the current states of the **assigned** weekly timer channels (**xClockCH\_01** to **xClockCH\_32** = TRUE) of the **assigned** public holiday channel (**xPublicHoliday** = TRUE), the **assigned** holiday channel (**xHoliday** = TRUE) or the **assigned** special switching times channel (**xSwitchTimeS** = TRUE) defined as follows (Note: channels that are not assigned automatically take the state FALSE):

| Weekly timer channels | Public holiday channel | Holiday channel | Special switching times channel | Central activation (Master) | Central deactivation (Master) | *xActive* | Notes                                  |
| --------------------- | ---------------------- | --------------- | ------------------------------- | --------------------------- | ----------------------------- | --------- | -------------------------------------- |
| FALSE                 | FALSE                  | FALSE           | FALSE                           | FALSE                       | FALSE                         | FALSE     | Normal operation - Off                 |
| TRUE                  | FALSE                  | FALSE           | FALSE                           | FALSE                       | FALSE                         | TRUE      | Normal operation - On                  |
| X                     | TRUE                   | FALSE           | FALSE                           | FALSE                       | FALSE                         | FALSE     | Public holiday operation - On          |
| X                     | FALSE                  | TRUE            | FALSE                           | FALSE                       | FALSE                         | FALSE     | Holiday operation - On                 |
| X                     | X                      | X               | TRUE                            | FALSE                       | FALSE                         | TRUE      | Special switching times operation - On |
| X                     | X                      | X               | X                               | TRUE                        | FALSE                         | TRUE      | Central activation ( Master )          |
| X                     | X                      | X               | X                               | X                           | TRUE                          | FALSE     | Central deactivation ( Master )        |

Legend: X = any

#### Central removal of all assignments **xResetAssignment**

This setpoint / parameter is used for the central removal of all assignments made in the slave function block.

### Visualization

#### Representation

<figure><img src="/files/5c5297d364a1341c5d68db35dc582998798bfc1d" alt=""><figcaption></figcaption></figure>

#### Interfaces Visu-Element

| Name                  | Data type     | Type         | Initial value | Function                                                                                                                                                                                                      |
| --------------------- | ------------- | ------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **FB\_ClockSlave32**  | ClockSlave32  | VAR\_IN\_OUT |               | Enter FB ClockSlave32 here e.g. PRG.ClockSlave32                                                                                                                                                              |
| **FB\_ClockMaster32** | ClockMaster32 | VAR\_IN\_OUT |               | Enter the corresponding(!) FB ClockMaster32 here e.g. PRG.ClockMaster32                                                                                                                                       |
| **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. |

\
Note: VAR\_IN\_OUT interfaces must be assigned, VAR\_INPUT are optional.

### CODESYS

InOut:

| Scope       | Name                   | Type           | Initial | Inherited from |
| ----------- | ---------------------- | -------------- | ------- | -------------- |
| Input       | `itfFromClockMaster32` | `IUhrProtocol` |         | Clock\_Base    |
| Input       | `sTitle`               | `STRING`       |         |                |
| Input       | `sLine1`               | `STRING`       |         |                |
| Input       | `sLine2`               | `STRING`       |         |                |
| Input Const | `ClockSlvPara`         | stSlvClockData |         |                |
| Input Const | `xSwitchTimeS`         | `BOOL`         |         |                |
| Input Const | `xPublicHoliday`       | `BOOL`         |         |                |
| Input Const | `xHoliday`             | `BOOL`         |         |                |
| Input Const | `xClockCH_32`          | `BOOL`         |         |                |
| Input Const | `xClockCH_31`          | `BOOL`         |         |                |
| Input Const | `xClockCH_30`          | `BOOL`         |         |                |
| Input Const | `xClockCH_29`          | `BOOL`         |         |                |
| Input Const | `xClockCH_28`          | `BOOL`         |         |                |
| Input Const | `xClockCH_27`          | `BOOL`         |         |                |
| Input Const | `xClockCH_26`          | `BOOL`         |         |                |
| Input Const | `xClockCH_25`          | `BOOL`         |         |                |
| Input Const | `xClockCH_24`          | `BOOL`         |         |                |
| Input Const | `xClockCH_23`          | `BOOL`         |         |                |
| Input Const | `xClockCH_22`          | `BOOL`         |         |                |
| Input Const | `xClockCH_21`          | `BOOL`         |         |                |
| Input Const | `xClockCH_20`          | `BOOL`         |         |                |
| Input Const | `xClockCH_19`          | `BOOL`         |         |                |
| Input Const | `xClockCH_18`          | `BOOL`         |         |                |
| Input Const | `xClockCH_17`          | `BOOL`         |         |                |
| Input Const | `xClockCH_16`          | `BOOL`         |         |                |
| Input Const | `xClockCH_15`          | `BOOL`         |         |                |
| Input Const | `xClockCH_14`          | `BOOL`         |         |                |
| Input Const | `xClockCH_13`          | `BOOL`         |         |                |
| Input Const | `xClockCH_12`          | `BOOL`         |         |                |
| Input Const | `xClockCH_11`          | `BOOL`         |         |                |
| Input Const | `xClockCH_10`          | `BOOL`         |         |                |
| Input Const | `xClockCH_09`          | `BOOL`         |         |                |
| Input Const | `xClockCH_08`          | `BOOL`         |         |                |
| Input Const | `xClockCH_07`          | `BOOL`         |         |                |
| Input Const | `xClockCH_06`          | `BOOL`         |         |                |
| Input Const | `xClockCH_05`          | `BOOL`         |         |                |
| Input Const | `xClockCH_04`          | `BOOL`         |         |                |
| Input Const | `xClockCH_03`          | `BOOL`         |         |                |
| Input Const | `xClockCH_02`          | `BOOL`         |         |                |
| Input Const | `xClockCH_01`          | `BOOL`         |         |                |
| Input Const | `xResetAssignment`     | `BOOL`         | FALSE   |                |
| Output      | `xClockActive`         | `BOOL`         |         |                |
| Output      | `todTodayTON`          | `TOD`          |         |                |
| Output      | `todTodayTOF`          | `TOD`          |         |                |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-library/functionblocks/clock/clockslave32.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
