Home AMX User Forum NetLinx Studio
Options

on-screen countdown

I need a count-down on a TP-4 device.
The idea is that someone pushes a button and a countdown begins (20, 15 and 10 minutes, depends on the function needed). When it reaches zero it starts to count up again to show minutes and seconds passed the countdown time. The countdown is visible on the screen.
Has anyone done something like this? I have not worked with time functions so this is so it would be helpful if someone could point me in the right direction.

Comments

  • Options
    Thomas HayesThomas Hayes Posts: 1,164
    I do this everytime one of my projectors turns on/off. It gives the client a better idea of how long is left (waiting 2 minutes for a projector to cool cycle can seem forever in front of 100+ people) I use a bargraph but that could just as easy be a timer. Do you want this time to be a constant(start at 10 mins everytime) or a variable depending on what your client inputs?
  • Options
    It´s not an input. But there will be 3 timers, for 10,15 and 20 minutes. But knowing how to do it for 10 minutes would be great. Easily implemented for 15 and 20 minutes later.

    Thanks
  • Options
    DHawthorneDHawthorne Posts: 4,584
    I also do this for projectors. My preferred method is using a timeline that repeats once a second. I set a variable for the total time I want it to run, then start the timeline and pop up a modal countdown popup. Every tick of the timeline, I decrement the variable by one, and SEND_STRING to update a text field on the popup to show the remaining time (though it could easily be elapsed time, or, as Thomas suggests, a SEND_LEVEL). When the variable hits zero, I turn off the page and kill the timeline.

    I have found, with this method, it is a good idea to have a button on the popup (I generally hide it in a corner), to close the popup in case a communications glitch prevents the @PPF from going through for any reason (more an issue with wireless panels than wired).
Sign In or Register to comment.