Samples for initializations
Weekly schedule/week for FB_BA_ScheduleBinary
From Monday to Sunday, a function is switched on at 6:00. It is switched off every day at 18:00. If this function was switched on externally after 18:00, it is switched off again at 0:00.
// Monday
Schedule.aWeek[E_BA_Weekday.eMonday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,1].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,2].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,3].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nSecond := 0;
// Tuesday
Schedule.aWeek[E_BA_Weekday.eTuesday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].stTime.nSecond := 0;
// Wednesday
Schedule.aWeek[E_BA_Weekday.eWednesday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].stTime.nSecond := 0;
// Thursday
Schedule.aWeek[E_BA_Weekday.eThursday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eThursday,1].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eThursday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eThursday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eThursday,2].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eThursday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eThursday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eThursday,3].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eThursday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,3].stTime.nSecond := 0;
// Friday
Schedule.aWeek[E_BA_Weekday.eFriday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eFriday,1].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eFriday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eFriday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eFriday,2].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eFriday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eFriday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eFriday,3].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eFriday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,3].stTime.nSecond := 0;
// Saturday
Schedule.aWeek[E_BA_Weekday.eSaturday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSaturday,1].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eSaturday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eSaturday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].stTime.nSecond := 0;
// Sunday
Schedule.aWeek[E_BA_Weekday.eSunday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSunday,1].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eSunday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eSunday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSunday,2].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eSunday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eSunday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSunday,3].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eSunday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,3].stTime.nSecond := 0;
Weekly schedule for FB_BA_ScheduleMultistate
From Monday to Sunday, the value 2 is set at 23:00 and 0:00, but the value 1 is set at 5:00.
// Monday
Schedule.aWeek[E_BA_Weekday.eMonday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,1].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nHour := 23;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,2].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,3].uValue.udiVal := 1;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nHour := 5;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nSecond := 0;
// Tuesday
Schedule.aWeek[E_BA_Weekday.eTuesday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].stTime.nHour := 23;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].uValue.udiVal := 1;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].stTime.nHour := 5;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].stTime.nSecond := 0;
// Wednesday
Schedule.aWeek[E_BA_Weekday.eWednesday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].stTime.nHour := 23;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].uValue.udiVal := 1;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].stTime.nHour := 5;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].stTime.nSecond := 0;
// Thursday
Schedule.aWeek[E_BA_Weekday.eThursday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eThursday,1].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eThursday,1].stTime.nHour := 23;
Schedule.aWeek[E_BA_Weekday.eThursday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eThursday,2].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eThursday,2].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eThursday,3].uValue.udiVal := 1;
Schedule.aWeek[E_BA_Weekday.eThursday,3].stTime.nHour := 5;
Schedule.aWeek[E_BA_Weekday.eThursday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,3].stTime.nSecond := 0;
// Friday
Schedule.aWeek[E_BA_Weekday.eFriday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eFriday,1].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eFriday,1].stTime.nHour := 23;
Schedule.aWeek[E_BA_Weekday.eFriday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eFriday,2].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eFriday,2].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eFriday,3].uValue.udiVal := 1;
Schedule.aWeek[E_BA_Weekday.eFriday,3].stTime.nHour := 5;
Schedule.aWeek[E_BA_Weekday.eFriday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,3].stTime.nSecond := 0;
// Saturday
Schedule.aWeek[E_BA_Weekday.eSaturday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSaturday,1].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eSaturday,1].stTime.nHour := 23;
Schedule.aWeek[E_BA_Weekday.eSaturday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].uValue.udiVal := 1;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].stTime.nHour := 5;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSaturday,3].stTime.nSecond := 0;
// Sunday
Schedule.aWeek[E_BA_Weekday.eSunday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSunday,1].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eSunday,1].stTime.nHour := 23;
Schedule.aWeek[E_BA_Weekday.eSunday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSunday,2].uValue.udiVal := 2;
Schedule.aWeek[E_BA_Weekday.eSunday,2].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eSunday,3].uValue.udiVal := 1;
Schedule.aWeek[E_BA_Weekday.eSunday,3].stTime.nHour := 5;
Schedule.aWeek[E_BA_Weekday.eSunday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eSunday,3].stTime.nSecond := 0;
Combination of the exception in the date range with a weekly schedule for FB_BA_ScheduleAnalog
This sample shows a combination of a date range in connection with a weekly timer.
In the date range from March 1, 2026 to September 31, 2026, the analog value 14.0 is specified every day at 0:00.
Outside this date range, the weekly schedule is active. From Monday to Friday, the value 22.0 is issued at 6:00, the value 16.0 at 18:00 and the value 14.5 at 0:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay01;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eSetember;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 0;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.rVal := 14.0;
// Monday
Schedule.aWeek[E_BA_Weekday.eMonday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,1].uValue.rVal := 22.0;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,2].uValue.rVal := 16.0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,3].uValue.rVal := 14.5;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nSecond := 0;
// Tuesday
Schedule.aWeek[E_BA_Weekday.eTuesday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].uValue.rVal := 22.0;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].uValue.rVal := 16.0;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].uValue.rVal := 14.5;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eTuesday,3].stTime.nSecond := 0;
// Wednesday
Schedule.aWeek[E_BA_Weekday.eWednesday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].uValue.rVal := 22.0;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].uValue.rVal := 16.0;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].uValue.rVal := 14.5;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eWednesday,3].stTime.nSecond := 0;
// Thursday
Schedule.aWeek[E_BA_Weekday.eThursday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eThursday,1].uValue.rVal := 22.0;
Schedule.aWeek[E_BA_Weekday.eThursday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eThursday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eThursday,2].uValue.rVal := 16.0;
Schedule.aWeek[E_BA_Weekday.eThursday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eThursday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eThursday,3].uValue.rVal := 14.5;
Schedule.aWeek[E_BA_Weekday.eThursday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eThursday,3].stTime.nSecond := 0;
// Friday
Schedule.aWeek[E_BA_Weekday.eFriday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eFriday,1].uValue.rVal := 22.0;
Schedule.aWeek[E_BA_Weekday.eFriday,1].stTime.nHour := 6;
Schedule.aWeek[E_BA_Weekday.eFriday,1].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,1].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,2].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eFriday,2].uValue.rVal := 16.0;
Schedule.aWeek[E_BA_Weekday.eFriday,2].stTime.nHour := 18;
Schedule.aWeek[E_BA_Weekday.eFriday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,3].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eFriday,3].uValue.rVal := 14.5;
Schedule.aWeek[E_BA_Weekday.eFriday,3].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,3].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eFriday,3].stTime.nSecond := 0;
Exception Date
The following samples show possible variants for the date exception of a schedule with a binary schedule entry.
Variant 01
The exception date is always active. Switching on at 6:00 and switching off at 18:00 every day.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 255;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 02
For the entire year 2025, switching on at 6:00 and switching off at 18:00 every day.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 125;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 03
In February, switching on at 6:00 and switching off at 18:00 every day.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 255;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.eFebruary;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 04
Switching on at 6:00 and switching off at 18:00 on the 29th of every month.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 255;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 05
Switching on at 6:00 and switching off at 18:00 every Monday.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 255;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 06
On March 29, switching on at 6:00 and switching off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 255;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 07
In 2025, always switching on at 6:00 and switching off at 18:00 on the 29th of each month.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 125;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 08
The 29th of a month must be a Monday to switch on at 6:00 and to switch off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 255;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 09
In April 2025, switching on at 6:00 and switching off at 18:00 every day.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 125;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.eApril;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 10
In April, switching on at 6:00 and switching off at 18:00 every Monday.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 255;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.eApril;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 11
In 2030, switching on at 6:00 and switching off at 18:00 every Monday.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 130;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 12
On May 29, 2030, switching on at 6:00 and switching off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 130;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.eMay;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 13
In 2030, switching on at 6:00 and switching off at 18:00 every Monday in May.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 130;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.eMay;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 14
In 2030, the 29th of the month must be a Monday to switch on at 6:00 and to switch off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 130;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 15
April 29 must be a Monday to switch on at 6:00 and switch off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 255;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.eApril;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 16
February 28, 2025 would have to be a Monday to switch on at 6:00 and to switch off at 18:00. The function block checks whether the switch on condition is correct. Since February 28, 2025 is on a Friday, the weekday eDayOfWeek will be corrected to Friday, so that on Friday, February 28, 2025 it will be switched on at 6:00 and switched off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eDate;
Schedule.aException[1].uDate.stDate.nYear := 125;
Schedule.aException[1].uDate.stDate.eMonth := E_BA_Month.eFebruary;
Schedule.aException[1].uDate.stDate.nDay := E_BA_Day.eDay28;
Schedule.aException[1].uDate.stDate.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Exception Week and Day/WeekNDay
The following samples show possible variants for the exception week and exception day with a binary schedule entry.
Variant 01
The WeekNDay exception is always active. Switching on at 6:00 and switching off at 18:00 every day.
Schedule.aException[1].eType := E_BA_DateValChoice.eWeekNDay;
Schedule.aException[1].uDate.stWeekNDay.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stWeekNDay.eWeekOfMonth := E_BA_Week.Unspecified;
Schedule.aException[1].uDate.stWeekNDay.eWeekday := E_BA_Weekday.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 02
In August, switching on at 6:00 and switching off at 18:00 every day.
Schedule.aException[1].eType := E_BA_DateValChoice.eWeekNDay;
Schedule.aException[1].uDate.stWeekNDay.eMonth := E_BA_Month.eAugust;
Schedule.aException[1].uDate.stWeekNDay.eWeekOfMonth := E_BA_Week.Unspecified;
Schedule.aException[1].uDate.stWeekNDay.eWeekday := E_BA_Weekday.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 03
On days 8-14 of each month, switching on at 6:00 and switching off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eWeekNDay;
Schedule.aException[1].uDate.stWeekNDay.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stWeekNDay.eWeekOfMonth := E_BA_Week.eWeek2;
Schedule.aException[1].uDate.stWeekNDay.eWeekday := E_BA_Weekday.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 04
Every Monday, switching on at 6:00 and switching off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eWeekNDay;
Schedule.aException[1].uDate.stWeekNDay.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stWeekNDay.eWeekOfMonth := E_BA_Week.Unspecified;
Schedule.aException[1].uDate.stWeekNDay.eWeekday := E_BA_Weekday.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 05
On days 29-31 in March, switching on at 6:00 and switching off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eWeekNDay;
Schedule.aException[1].uDate.stWeekNDay.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stWeekNDay.eWeekOfMonth := E_BA_Week.eWeek5;
Schedule.aException[1].uDate.stWeekNDay.eWeekday := E_BA_Weekday.Unspecified;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 06
On every Monday in March, switching on at 6:00 and switching off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eWeekNDay;
Schedule.aException[1].uDate.stWeekNDay.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stWeekNDay.eWeekOfMonth := E_BA_Week.Unspecified;
Schedule.aException[1].uDate.stWeekNDay.eWeekday := E_BA_Weekday.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 07
One of the days 29-31 of a month must be a Monday to switch on at 6:00 and to switch off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eWeekNDay;
Schedule.aException[1].uDate.stWeekNDay.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stWeekNDay.eWeekOfMonth := E_BA_Week.eWeek5;
Schedule.aException[1].uDate.stWeekNDay.eWeekday := E_BA_Weekday.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Variant 08
One of the days 1-7 in March must be a Monday to switch on at 6:00 and to switch off at 18:00.
Schedule.aException[1].eType := E_BA_DateValChoice.eWeekNDay;
Schedule.aException[1].uDate.stWeekNDay.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stWeekNDay.eWeekOfMonth := E_BA_Week.eWeek1;
Schedule.aException[1].uDate.stWeekNDay.eWeekday := E_BA_Weekday.eMonday;
Schedule.aException[1].aEntry[1].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[1].stTime.nHour := 6;
Schedule.aException[1].aEntry[1].stTime.nMinute := 0;
Schedule.aException[1].aEntry[1].stTime.nSecond := 0;
Schedule.aException[1].aEntry[1].uValue.bVal := TRUE;
Schedule.aException[1].aEntry[2].eState := E_BA_SchedEntryState.eValue;
Schedule.aException[1].aEntry[2].stTime.nHour := 18;
Schedule.aException[1].aEntry[2].stTime.nMinute := 0;
Schedule.aException[1].aEntry[2].stTime.nSecond := 0;
Schedule.aException[1].aEntry[2].uValue.bVal := FALSE;
Autocorrection initializations
In the event of incorrect initialization, an autocorrection takes place within the function block. The following samples show possible initializations for autocorrection.
DateRange
Sample 01
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 255;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 255;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.Unspecified;
Automatic correction because no specific period is specified.
Schedule.aException[1].eType := E_BA_DateValChoice.Invalid;
Sample 02
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 127;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eSetember;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.eMonday;
Automatic correction, the date ranges are swapped and the weekdays are corrected.
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eSetember;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay30;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.eWednesday;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 127;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.eWednesday;
Sample 03
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 125;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.eTuesday;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eSetember;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.Unspecified;
Automatic correction. The weekdays are adjusted if incorrect.
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 125;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eSetember;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.eTuesday;
Sample 04
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 222;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := 123;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := 126;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := 222;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 220;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := 121;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := 145;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := 127;
Automatic correction, the highest valid entries are used for year, month and day - 31.12.2100. The day of the week is adjusted to the resulting date.
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 200;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eDecember;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.eFriday;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 200;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eDecember;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.eFriday;
Sample 05
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 124;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eFebruary;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eFebruary;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay30;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.Unspecified;
Automatic correction, the days of the month are adjusted. The day of the week is adjusted to the resulting date.
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 124;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eFebruary;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.eThursday;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eFebruary;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay28;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.eSaturday;
Sample 06
Schedule.aWeek[E_BA_Weekday.eMonday,1].eState := E_BA_SchedEntryState.Invalid;
Schedule.aWeek[E_BA_Weekday.eMonday,1].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nHour := 30;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nMinute := 120;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nSecond := 124;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nHundredths := 124;
Schedule.aWeek[E_BA_Weekday.eMonday,2].eState := E_BA_SchedEntryState.eUndefined;
Schedule.aWeek[E_BA_Weekday.eMonday,2].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nHour := 11;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nMinute := 12;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nSecond := 13;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nHundredths := 14;
Schedule.aWeek[E_BA_Weekday.eMonday,3].eState := E_BA_SchedEntryState.eNull;
Schedule.aWeek[E_BA_Weekday.eMonday,3].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nHour := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nMinute := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nSecond := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nHundredths := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,4].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,4].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eMonday,4].stTime.nHour := 99;
Schedule.aWeek[E_BA_Weekday.eMonday,4].stTime.nMinute := 111;
Schedule.aWeek[E_BA_Weekday.eMonday,4].stTime.nSecond := 222;
Schedule.aWeek[E_BA_Weekday.eMonday,4].stTime.nHundredths := 100;
Automatic correction, sorting in the weekly schedule according to the order shown in the entries: E_BA_SchedEntryState.eValue > E_BA_SchedEntryState.eNull > E_BA_SchedEntryState.eUndefined. E_BA_SchedEntryState.Invalid becomes E_BA_SchedEntryState.eUndefined.
The times will be adjusted.
Schedule.aWeek[E_BA_Weekday.eMonday,1].eState := E_BA_SchedEntryState.eValue;
Schedule.aWeek[E_BA_Weekday.eMonday,1].uValue.bVal := TRUE;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nHour := 23;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nMinute := 59;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nSecond := 59;
Schedule.aWeek[E_BA_Weekday.eMonday,1].stTime.nHundredths := 99;
Schedule.aWeek[E_BA_Weekday.eMonday,2].eState := E_BA_SchedEntryState.eNull;
Schedule.aWeek[E_BA_Weekday.eMonday,2].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nHour := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nMinute := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nSecond := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,2].stTime.nHundredths := 0;
Schedule.aWeek[E_BA_Weekday.eMonday,3].eState := E_BA_SchedEntryState.eUndefined;
Schedule.aWeek[E_BA_Weekday.eMonday,3].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nHour := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nMinute := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nSecond := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,3].stTime.nHundredths := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,4].eState := E_BA_SchedEntryState.eUndefined;
Schedule.aWeek[E_BA_Weekday.eMonday,4].uValue.bVal := FALSE;
Schedule.aWeek[E_BA_Weekday.eMonday,4].stTime.nHour := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,4].stTime.nMinute := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,4].stTime.nSecond := 255;
Schedule.aWeek[E_BA_Weekday.eMonday,4].stTime.nHundredths := 255;
Sample 07
Schedule.aException[1].eType := E_BA_DateValChoice.Invalid;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 127;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eSetember;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.eMonday;
Automatic correction, the date range is swapped and the days of the week are corrected.
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eSetember;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay30;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.eWednesday;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 127;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.eWednesday;
Sample 08
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 125;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.Unspecified;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eSetember;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.Unspecified;
Automatic correction, the days of the week are adjusted
Schedule.aException[1].eType := E_BA_DateValChoice.eDateRange;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nYear := 125;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eMonth := E_BA_Month.eMarch;
Schedule.aException[1].uDate.stDateRange.stDateFrom.nDay := E_BA_Day.eDay31;
Schedule.aException[1].uDate.stDateRange.stDateFrom.eDayOfWeek := E_BA_WeekDay.eMonday;
Schedule.aException[1].uDate.stDateRange.stDateTo.nYear := 126;
Schedule.aException[1].uDate.stDateRange.stDateTo.eMonth := E_BA_Month.eSetember;
Schedule.aException[1].uDate.stDateRange.stDateTo.nDay := E_BA_Day.eDay29;
Schedule.aException[1].uDate.stDateRange.stDateTo.eDayOfWeek := E_BA_WeekDay.eTuesday;