GetIntIBSystemIO("Schedule Time") function

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by Ianr, Jul 6, 2009.

  1. Ianr

    Ianr

    Joined:
    Aug 26, 2005
    Messages:
    36
    Likes Received:
    0
    Location:
    Wellington, NZ
    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.

    :eek:
     
    Ianr, Jul 6, 2009
    #1
  2. Ianr

    Mark

    Joined:
    Oct 28, 2004
    Messages:
    196
    Likes Received:
    1
    Location:
    Grenoble, France
    Schedule Number

    Hi Ian,

    It's not entirely obvious, but the Schedule Time is returned for the selected Schedule Number. So before you grab the time you should first set the Schedule Number using:
    SetIntIBSystemIO("Schedule Number", _value_);

    Cheers,
    Mark.
     
    Mark, Jul 6, 2009
    #2
  3. Ianr

    Ianr

    Joined:
    Aug 26, 2005
    Messages:
    36
    Likes Received:
    0
    Location:
    Wellington, NZ
    Thanks Mark,

    Same as usual, easy when you know it.

    :) Ian
     
    Ianr, Jul 20, 2009
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.