Scheduler Overview

The timer blocks are intended to trigger actions on certain days in the year/ month/ week. The action can be triggered via a start event or a start time and terminated via an end event, end time or duration. The following combinations are possible:

Scheduler Overview 1:

The grey-blue fields indicate the timer type. The day is determined by the periodicity (red fields) and further discretization (orange). A common feature of all blocks is that they have the same start and end criteria (green). The start criterion relates to the selected day, the end criterion depends on the starting point. For each instance of a function block only one start and end criterion can be defined. To trigger several actions on the same day several instances of the function block are required.

Time overlaps

Time overlaps Time overlaps of two consecutive switch-on and switch-off criteria may occur in the same instance of the function block if the switching duration is not limited to less than 1 day. In this case a start event may be followed by another start event before the end of the preceding period. The following overlap scenarios are possible in the situation described above:

Starttime / Endtime (type TOD, TOD)
No overlap possible since for Starttime<Endtime the start and end point are on same day, and for Starttime>=Endtime the end point is assumed to be on the next day. This means that the duration is this limited to less than 1 day.

Starttime / Duration (type TOD, TIME)
Overlap is possible, since the duration is freely selectable, and the TIME variable type can be up to 50 days. It would therefore be possible to trigger an action with a duration of 3 days daily. The action would never be completed since it would be constantly restarted.

Starttime / End event (type TOD, BOOL)
Overlap possible, since the end event is variable and cannot occur before the next start time.

Start event / Endtime (type BOOL, TOD)
Overlap may be possible. The end time is calculated when the start event occurs. If Starttime<Endtime the end time is on the same day. In this case no overlap is possible. On the other hand, if Starttime>=Endtime the end point is on the next day. An overlap occurs if the start is triggered on this day before the end of the previous action has been reached.

Start event / Duration (type BOOL, TIME)
Overlap is possible, since the duration is freely selectable, and the TIME variable type can be up to 50 days. It would therefore be possible to trigger an action with a duration of 3 days on a daily basis. The action would never be completed since it would be constantly restarted.

Start event / End event (type BOOL, BOOL)
Overlap possible, since the end event is variable and cannot occur before the next start event.

An overlap means that the control output bOut for the respective function block does not change to FALSE. Instead, the system waits for end of the next period.

Further documentation

The following table contains an overview of the documentation for the individual blocks:

FB_DailyScheduler()

FB_WeeklyScheduler()

FB_MonthlyScheduler1()

FB_MonthlyScheduler2()

FB_YearlyScheduler()

switches every n-th day

switches every n-th week on certain weekdays (multiple selection possible)

switches in certain months (multiple selection possible) on a certain day of the week

switches in certain months (multiple selection possible) on a certain day of the month

switches on a certain day of the year

Example Program

A sample program uses a daily switching block (FB_DailyScheduler) to illustrate how the blocks must be parameterized.