TimerTime

Discussion in 'General Discussion' started by grssll, Feb 2, 2018.

  1. grssll

    grssll

    Joined:
    Jun 13, 2014
    Messages:
    64
    Likes Received:
    0
    Location:
    Sydney
    Hi, question for the gurus.
    Is it possible to count Timertime from Timer end to 0.
    For example my front light will go on after certain time after dark and I want to display timer counting from 50min to 0min.
    Thanks
    once (GetLightingLevel("55_front sensor") <= 3%) then
    begin
    TimerStart(2);
    end;
    once (timertime(2) > 3200) then
    begin
    SetLightingState("9_entry light", ON);
    timerstop(2);
    end;
     
    grssll, Feb 2, 2018
    #1
  2. grssll

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,521
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Timers only count up, but that's not really a problem.

    The time remaining is 3200 - TimerTime(2). Stick it in a systemio and display it.
     
    Ashley, Feb 2, 2018
    #2
  3. grssll

    grssll

    Joined:
    Jun 13, 2014
    Messages:
    64
    Likes Received:
    0
    Location:
    Sydney
    Hi Ashley,
    I can display timertime in logic timer monitor and its counting from 0 to 3200.
    I want to display it count from 3200 to 0.
    Cheers
    George
     
    grssll, Feb 2, 2018
    #3
  4. grssll

    grssll

    Joined:
    Jun 13, 2014
    Messages:
    64
    Likes Received:
    0
    Location:
    Sydney
    When I put it in a systemio what type do I choose?
    Thanks
     
    grssll, Feb 2, 2018
    #4
  5. grssll

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,521
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Create a TIME system IO (which is just an integer that is the number of seconds since midnight. Set it such:

    Code:
    SetIntSystemIO("countDown", 3200 - timerTime(1));
    If you are displaying it on a Touchscreen place a CLOCK component, on Visual properties select SystemIO
    Time, show seconds, 24Hour. Then under SystemIO tab select key functions Status, and your system IO.

    For a Wiser if you want minuters and seconds you will have to format it yourself.
     
    Ashley, Feb 3, 2018
    #5
  6. grssll

    grssll

    Joined:
    Jun 13, 2014
    Messages:
    64
    Likes Received:
    0
    Location:
    Sydney
    Thanks Ashley,
    Much appreciated.
     
    grssll, Feb 3, 2018
    #6
  7. grssll

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,420
    Likes Received:
    62
    Location:
    Adelaide
    Maybe bother option..

    The normal timer buttons count down... if you put on of these on your page you could probably trigger it from logic... and the. As a bonus you have a button you can press to cancel it or trigger it manually.

    Nick
     
    NickD, Feb 5, 2018
    #7
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.
Similar Threads
There are no similar threads yet.
Loading...