Schedule Object
- Last UpdatedDec 08, 2020
- 3 minute read
The schedule object has special properties that demand further explanations on its syntax. The effective period, weekly schedule and exception schedule are these properties, combining dates and times on ranges and periods.
Effective Period:
The tag must have a value complying to the following syntax:
<start date>|<end date>
where,
<start date>|<end date> is a date as specified before, on the data types section. As the effective period property implies a period, two dates must be supplied, separated by the | (pipe) character.
For example a period starting at Apr/12/2010 and ending at May/14/2010 shall be:
12-4-2010|14-5-2010
Weekly Schedule:
The weekly schedule is used to specify times and values for specific days. This property combines times with enumerations for types and values, onto an array of 7 elements (corresponding to the 7 days of a week). Each element of the array may also have multiple times. Starting with a single time instance, the following syntax is used:
<time instance> = <time>,<type>,<value>
where,
time: time as specified on data types section
type: one of the elements of the Tag Number enumeration
value: the value of <type> associated with this time
A single day may contain zero or more time instances. Those are divided by a semi-colon character, forming a daily schedule element:
<daily schedule> = [<time instance>;<time instance>;...]
This syntax means that each day might have any number of time configurations on the schedule, using a semi-colon to separate them. The following example clarifies this syntax:
Time 12h 25m 32s 500ms Type: Boolean(1) Value: True (1)
Value for the day: 12:25:32.50,1,1
Time 13h 40m 3s 20ms Type: Boolean (1) Value: False(0)
Value for the day: 13:40:3.2,1,0
It is important to notice that the above example was only for one day but it is necessary to specify the seven days even though some of them may not be defined. So, the complete syntax of a weekly-schedule is:
<monday>|<tuesday>|<wednesday>|<thursday>|<friday>|<saturday>|<sunday>|
Example:
The complete and valid value for the weekly-schedule:
12:34:56.99,4,5.12;22:10:0.0,2,135|||4:5:12.0,1,1|||1:2:3.4,7,sample string
In this example we have the seven days, with schedules for Monday, Thursday and Sunday, summarized on the table:
|
Day of Week |
Time of Day |
Type |
Value |
|
Monday |
34:57.0 |
4 (Real) |
5.12 |
|
Monday |
10:00.0 |
2 (Uint) |
135 |
|
Thursday |
05:12.0 |
1 (Boolean) |
TRUE |
|
Sunday |
02:03.4 |
7 (String) |
sample string |
The value configured on the schedule will be read on the PRESENT-VALUE address of the object on its time of activity.
Exception Scheduler
The Exception Scheduler values are built with a sequence of groups. Each group is composed of a date, a list of time and values and a priority value. The list of time_value are separated by a comma (,), whereas the parts of the group are separated by a semi-colon (;) character:
<group> = <date>;[<time_value>,< time_value>,...];<priority>
Notice that <date> syntax is specified on the data types section and the priority is an unsigned integer number. The <time_value> is composed of a time and a value separated by (/) . The value is composed of a datatype number (see datatype table) and a value separated by (:).
Example of a time 10:15:30.50.
Example of a value like unsigned integer 10 will be 2:10 (2 is the datatype number of the unsigned integer)Now the time_value for this will be 10:15:30.50/2:10
The first group differs from the others only by the date part:
<first group> = <start date>,<end date>;[<time_value>,<time_value>,...];<priority>
The complete syntax of the exception scheduler is composed of the first group and zero or more groups, divided by the | (pipe) character:
<first group>[|<group>|<group>|<group>...]
Example of an exception scheduler with one group:
26-02-2013;12:1:2.0/2:10;0
Example of a more complex exception scheduler with two groups:
6-2-2013;12:1:2.0/2:10;0|0-0-1900;0:0:0.0/0:NULL,0:0:0.0/1:0,0:0:0.0/7:BacneTest;0
Example of an exception scheduler with starting & ending date with one group:
16-11-2013,29-11-2013;3:10:0.0/1:1,11:0:0.0/1:0,14:50:0.0/1:1,23:59:59.0/1:0;2|