Hi All, I had been asked to provide functionality in a Mk2 B&W TS (with logic) to have the store lights come up to full brightness x number of minutes (customisable by client) before store opening. Looking through the help file I though great, I'll grab the schedule time and then minus the minutes the user sets. Store_Open_Sched := GetIntIBSystemIO("Schedule Time"); Lights_to_max_minutes := GetIntSystemIO("Lights on mins. before store open"); Lights_to_max_seconds := Lights_to_max_minutes * 60; Calc_Time := (Store_Open_Sched - Lights_to_max_seconds); DecodeTime(Calc_Time, Hour1, Min1, Sec1); WriteLn('Calc_Time = ', Hour1, Min1 , Sec1); I used the above code to check the time calculated. This works fine, if the schedule you want is schedule number 1. How do you select other schedules though?? This seems quiet a handy function, but would have limited use if it can only be used in conjunction with schedule number 1. Surely I must be doing something wrong. :o