Echelon i.LON SmartServer Technical Information Page 366

  • Download
  • Add to my manuals
  • Print
  • Page
    / 443
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 365
i.LON SmartServer 2.0 Programmer’s Reference
21-14
//create exception dates
myCalendar.Exception[0].Schedule = new iLON_SmartServer.UFPTcalendar_CfgExceptionSchedule[4];
myCalendar.Exception[0].Schedule[0] = new iLON_SmartServer.UFPTcalendar_CfgExceptionSchedule();
myCalendar.Exception[0].Schedule[1] = new iLON_SmartServer.UFPTcalendar_CfgExceptionSchedule();
myCalendar.Exception[0].Schedule[2] = new iLON_SmartServer.UFPTcalendar_CfgExceptionSchedule();
myCalendar.Exception[0].Schedule[3] = new iLON_SmartServer.UFPTcalendar_CfgExceptionSchedule();
//create 4th of July exception
//==========================
myCalendar.Exception[0].Schedule[0].UCPTschedMonth = new iLON_SmartServer.E_LonString();
myCalendar.Exception[0].Schedule[0].UCPTschedMonth.LonFormat = "UCPTschedMonth";
myCalendar.Exception[0].Schedule[0].UCPTschedMonth.Value = "MN_JUL";
myCalendar.Exception[0].Schedule[0].UCPTschedDay = new iLON_SmartServer.E_LonString();
myCalendar.Exception[0].Schedule[0].UCPTschedDay.LonFormat = "UCPTschedDay";
myCalendar.Exception[0].Schedule[0].UCPTschedDay.Value = "DM_DAY_4";
//set start date
myCalendar.Exception[0].Schedule[0].StartDate = new iLON_SmartServer.UFPTcalendar_CfgESDate();
myCalendar.Exception[0].Schedule[0].StartDate.UCPTdate = new DateTime(2009, 6, 8);
//set end date
myCalendar.Exception[0].Schedule[0].EndDate = new iLON_SmartServer.UFPTcalendar_CfgESDate();
myCalendar.Exception[0].Schedule[0].EndDate.UCPTdate = new DateTime(2020, 12, 31);
//create Labor Day exception
//==========================
myCalendar.Exception[0].Schedule[1].UCPTschedMonth = new iLON_SmartServer.E_LonString();
myCalendar.Exception[0].Schedule[1].UCPTschedMonth.LonFormat = "UCPTschedMonth";
myCalendar.Exception[0].Schedule[1].UCPTschedMonth.Value = "MN_SEP";
myCalendar.Exception[0].Schedule[1].UCPTschedDay = new iLON_SmartServer.E_LonString();
myCalendar.Exception[0].Schedule[1].UCPTschedDay.LonFormat = "UCPTschedDay";
myCalendar.Exception[0].Schedule[1].UCPTschedDay.Value =
"DM_FIRST_MON";
//set start date
myCalendar.Exception[0].Schedule[1].StartDate = new iLON_SmartServer.UFPTcalendar_CfgESDate();
myCalendar.Exception[0].Schedule[1].StartDate.UCPTdate = new DateTime(2009, 6, 8);
//set end date
myCalendar.Exception[0].Schedule[1].EndDate = new iLON_SmartServer.UFPTcalendar_CfgESDate();
myCalendar.Exception[0].Schedule[1].EndDate.UCPTdate = new DateTime(2020, 12, 31);
//create Thanksgiving exception
//==========================
myCalendar.Exception[0].Schedule[2].UCPTschedMonth = new iLON_SmartServer.E_LonString();
myCalendar.Exception[0].Schedule[2].UCPTschedMonth.LonFormat = "UCPTschedMonth";
myCalendar.Exception[0].Schedule[2].UCPTschedMonth.Value = "MN_NOV";
myCalendar.Exception[0].Schedule[2].UCPTschedDay = new iLON_SmartServer.E_LonString();
myCalendar.Exception[0].Schedule[2].UCPTschedDay.LonFormat = "UCPTschedDay";
myCalendar.Exception[0].Schedule[2].UCPTschedDay.Value = "DM_FOURTH_THU";
//set start date
myCalendar.Exception[0].Schedule[2].StartDate = new iLON_SmartServer.UFPTcalendar_CfgESDate();
myCalendar.Exception[0].Schedule[2].StartDate.UCPTdate = new DateTime(2009, 6, 8);
//set end date
myCalendar.Exception[0].Schedule[2].EndDate = new iLON_SmartServer.UFPTcalendar_CfgESDate();
myCalendar.Exception[0].Schedule[2].EndDate.UCPTdate = new DateTime(2020, 12, 31);
//Create Christmas exception
//==========================
myCalendar.Exception[0].Schedule[3].UCPTschedMonth = new iLON_SmartServer.E_LonString();
myCalendar.Exception[0].Schedule[3].UCPTschedMonth.LonFormat = "UCPTschedMonth";
myCalendar.Exception[0].Schedule[3].UCPTschedMonth.Value = "MN_DEC";
Page view 365
1 2 ... 361 362 363 364 365 366 367 368 369 370 371 ... 442 443

Comments to this Manuals

No comments