This specification defines two main ObjectTypes:
- an instance of CalendarType represent a globally defined set of dates that can be referenced by schedule Objects;
- an instance of ScheduleType represent a schedule, that defines for specific dates or weekdays specific times and actions, that shall be executed at those times.
An overview is given in Figure 1. Instances of ScheduleType can have a WeeklySchedule, defining per weekday specific times and per specific time a list of actions that shall be executed at that time. Optionally, the WeeklySchedule can be configured by OPC UA Clients.
In addition, or as alternative, a schedule Object can have a ExceptionSchedule. This defines special dates (days), either by defining a concrete date, a range of dates, or recurring dates, or by referencing instances of CalendarType. The optional Methods AddExceptionScheduleElements and RemoveExceptionScheduleElements can be used to configure the ExceptionSchedule by an OPC UA Client.
Figure 1 – Overview Scheduler Information Model
The CalendarType defines a DateList with specific dates. The optional AddDateListElements and RemoveDateListElements Methods can be used to manipulate the DateList Property by OPC UA Clients.
This specification does not define any specific entry points where to find schedule or calendar Objects. It is expected that they are placed reasonable in the AddressSpace, for example as child Object of an Object that is manipulated by actions of the schedule Object.
This specification does not define any specific mechanism how new schedule or calendar Objects are added or removed via OPC UA. Information Models using those Objects might define specific mechanisms like Methods or using the NodeManagement Service Set.
A schedule Object can contain a WeeklySchedule with one entry per weekday and / or an ExceptionSchedule. One of both shall be defined. The WeeklySchedule contains for each day actions, that should be taken at specific times. The ExceptionSchedule contains specific dates or ranges of dates, and the corresponding actions that should be taken at specific times. For example, the ExceptionSchedule can contain an entry with all public holidays and another with plant holidays. Since the different entries of the ExceptionSchedule might overlap, each entry contains a priority. If overlapping entries exist, the one with the highest priority is used. If both, WeeklySchedule and ExceptionSchedule exist, the exception schedule has priority over the WeeklySchedule. That is, if the exception schedule has a matching date, the exception schedule is used, otherwise the weekly schedule.
When a Server restarts or starts the first time, and when a schedule Object becomes active (by reaching its EffectivePeriod, see 7.2.2) there are two options how a schedule Object shall react.
If the ApplyLastAfterStart Property is set to TRUE, the Server shall find the last set of actions to be executed before the current time and execute those actions. The mechanism to find the last set of actions is to find the last element in the list of TimeActionsType that occurs on or before the current time, and then use that element’s actions. If no such element is found, then no action is executed.
If the ApplyLastAfterStart Property is set to FALSE, the Server does not consider any previous actions and starts executing actions according to the defined schedule defined in the future.