
The Function Block TIMESW is a simple weekly timer.
Note: If you need a more complex calendar for visualization, take a look at the Function Block TIMESWITCH.
Note: The times of the Function Block are absolute. This means that after a server restart or failure, the same reaction occurs.
Defines the start time. The input is defined with the data type T#. A format like e.g. T#7h30m is expected, which means 07:30.
Defines the end time. The input is defined with the data type T#. A format like e.g. T#22h30m is expected, which means 22:30.
With the 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 the other. For example, 135 for Monday, Wednesday and Friday. If no value is specified (0, NULL, FALSE or an empty string), the output Q is switched every day.
| Number | Weekday |
|---|---|
| 1 | Monday |
| 2 | Tuesday |
| 3 | Wednesday |
| 4 | Thursday |
| 5 | Friday |
| 6 | Saturday |
| 7 | Sunday |
The output is true if the current time is between the times PT1 and PT2.
Tip: The input PT1 may be smaller than the input PT2. This means it can be switched from PT1=T#22h to PT2=T#6h. The weekdays are recalculated and considered at midnight.