Function Block REPEAT_WEEKLY

The function block REPEAT_WEEKLY generates a weekly repetition as a string for the input REPEAT at the function block TIMESWITCH_ADD.

Input EVERY

Defines the repetition as an integer every X-th week. If the input is not defined, the minimum 1 is assumed.

Input UNTIL

Defines the end of the repetition. Three different formats can be used:

  • No end is defined by 0, FALSE or NULL.
  • An integer can be used to define the number of repetitions.
  • A date D#2016 can be used to define an end date.

Input BYDAY

With this input, the weekdays can be defined. These can be passed as a string or as a number. It is checked whether the current weekday is present in the number. Multiple days can be specified one after another. For example, 135 for Monday, Wednesday and Friday. If no value is specified (0, NULL, FALSE or an empty string), repetition does not occur on any day.

Number Weekday
1 Monday
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday
7 Sunday

Input DIS

Disables the repetition and returns an empty string.

Output Q

Returns a string with the repetitions for the input REPEAT of the function block TIMESWITCH_ADD.