Facility Control

Expand all | Collapse all

Timer countdown to specific time in Dashboard

  • 1.  Timer countdown to specific time in Dashboard

    Posted 5 days ago
    Hello,

    I am trying to create a timer in DashBoard that counts down to a time. For example, our show ends at 17:58:30, is there a way I can create a field in DashBoard where I can type this time in (or any time, depending on the show's out time) & then press a "Start" button & have a countdown timer to the inputed time? Thanks so much!

    #DashBoard

    ------------------------------
    Bobby P
    Supervisor
    ------------------------------


  • 2.  RE: Timer countdown to specific time in Dashboard

    MalThePal
    Posted 5 days ago
    Do you want to display a countdown that ends at 00:00.00?

    ------------------------------
    Malcolm Thorpe
    TV Syndicate/Icon Fitness
    ------------------------------



  • 3.  RE: Timer countdown to specific time in Dashboard

    Ross Staff
    Posted 5 days ago
    This video might help you out:
    Adding Clocks to your Panel
    Ross Video remove preview
    Adding Clocks to your Panel
    Having a display of different times is handy to have in a panel. Timers can be used show you: the current time how much time has passed since the start of your production how much time remains until a specific event occurs other clocks This video shows you how to put a timer in your panel, and how to configure it.
    View this on Ross Video >


    You essentially have to create a timer where the start time is the remaining time, and the stop time is 0:00:00.

    There are methods you can use to set the start time as well.   Most of it is explained in that video.   Start there and if you still have questions, post them here.

    Ben

    ------------------------------
    Ben Gatien
    Ross Video
    ------------------------------



  • 4.  RE: Timer countdown to specific time in Dashboard

    Posted 3 days ago
    Hi,

    yes, say for example the show ends at 14:28:00 (2:28 pm) & we start the show... during the show we realize at 14:06:00 we want to start the countdown, in Dashboard I imagine a text box where I can put the show end time in & Dashboard begins counting down from 14:06:00 to 14:28:00. Another box will say there is 22 minutes remaining. I used a simple example but sometimes the shows end at some unusual minutes & seconds, like 17:59:04.  Basically, I'd love for Dashboard to do the math & the count for me.

    thanks!

    ------------------------------
    Bobby P
    Supervisor
    ------------------------------



  • 5.  RE: Timer countdown to specific time in Dashboard

    Posted 3 days ago
    Hi Ben,

    I think I sort of got it but I am not sure how to edit the time I wish for it to count to. I changed the type of clock to "Count Time Until" but I'd like to create a field in DashBoard where I could enter the "Stop Time", this is where I am getting stuck as I don't know what variable to replace in the source. If it helps you, I replied to Malcolm in this thread what I am trying to do.

    Thanks! 



    ------------------------------
    Bobby P
    Supervisor
    ------------------------------



  • 6.  RE: Timer countdown to specific time in Dashboard

    Ross Staff
    Posted 3 days ago
    Hi Bobby
    I have attached an example panel that takes a time of day (24-hour clock) in a text field and updates the stop value of the timer to that value. The tricks here are to:
    1. Use "Time of Day" timer type
    2. Use script to grab the timer's "formatter" and use it to convert your text into a value the timer can understand (that's in the "Update" method)
    For some extra ease-of-use, I have also set the widget for the text field to our built-in time picker. If you keep this, you will want to make sure its w.format property uses the same time format as the timer.
    <abs contexttype="opengear" id="_top" keepalive="false" style="">
       <meta>
          <api>function updateStopTimeFromText(timerID, text)
    {
       var timer = ogscript.getTimerManager().getTimer(timerID);
       var parsedStartValue = timer.getFormat().parseObject(text);
       timer.setStop(parsedStartValue);
       timer.startTimer(false);
    }
    </api>
          <params>
             <param access="1" maxlength="0" name="cddisplay" oid="cddisplay" stateless="true" type="STRING" value="37:55" widget="label"/>
             <param access="1" maxlength="0" name="cdstop" oid="cdstop" type="STRING" value="15:30:00" widget="time-picker"/>
          </params>
          <timer autostart="false" id="cdtimer" pattern="HH:mm:ss" rate="500" stop="15:00:00">
             <timertask tasktype="ogparamset">params.setValue('cddisplay', 0, event.getDisplay());</timertask>
          </timer>
          <ogscript handles="onload">var stopValue = params.getValue('cdstop', 0);
    updateStopTimeFromText('cdtimer', stopValue);
    
    </ogscript>
       </meta>
       <param expand="true" height="56" left="24" oid="cddisplay" showlabel="false" style="style:timerLabel;" top="36" width="327"/>
       <param expand="true" height="42" left="22" oid="cdstop" showlabel="false" top="103" width="236">
          <config key="w.format">HH:mm:ss</config>
       </param>
       <button buttontype="push" height="44" left="262" name="Update" top="102" width="93">
          <task tasktype="ogscript">var stopValue = params.getValue('cdstop', 0);
    updateStopTimeFromText('cdtimer', stopValue);
    
    </task>
       </button>
    </abs>
    ​



    Cheers

    James

    ------------------------------
    James Peltzer
    Ross Video
    ------------------------------



  • 7.  RE: Timer countdown to specific time in Dashboard

    Posted 2 days ago
    Hi James,

    awesome! this is exactly what I was envisioning! thanks so much for taking the time to build this example!! have a great one!

    ------------------------------
    Bobby P
    Supervisor
    ------------------------------