Home AMX User Forum NetLinx Studio

System Shutdown on Non-Activity

I need to perform a power down on the entire rack if the touch panel hasn't been touched in 2 hours. Anyone have any good ideas or sample code?

Comments

  • FrankieFrankie Posts: 71
    I've done this with a TimeLine. I created the time line when the power was turned on and did a restart of the time line when the buttons were released. If no button is pressed then the time line will run and at the end of the timeline turn the system back off.
  • So, we basically reset the timer upon each button release? Do you use a WAIT structure with a variable as the delay and reset that variable?

    Thank you.
  • If it's netlinx you can just do a Button_event[dvTp,0] which is for all buttons. If there's a button event within the 2 hours or whatever, do a timeline_kill, otherwise, let it do it's shutdown thing after the 2 hours.

    Alex
  • I will give it a try. Thanks a ton guys!

    Phil.
  • Spire_JeffSpire_Jeff Posts: 1,917
    Originally posted by phil
    So, we basically reset the timer upon each button release? Do you use a WAIT structure with a variable as the delay and reset that variable?

    Thank you.

    You can reset a Timeline with:

    TIMELINE_SET (TL1,0)


    On a different note:

    From a residential perspective, I immediately think of a movie that is 2 1/2 hours long. I would probably code it so that at 1 hour 55 minutes the timeline would trip an event that beeps the panel and pops up a page that tells the user that the rack will shutdown in 5 minutes. (I might even go as far as putting a count down timer on the popup if I felt ambitious) This might not be needed in your application, just something I thought of while waiting for a call from the security company that has had me on hold for a while.


    Jeff


    P.S.
    Sorry if someone beat me to it.... the security guy called while I was writing this and I had to deal with that before finishing this message.
  • I would use the BUTTON_EVENT[dvTP,0] to reset a timeline. Or listen for the "SLEEP" string from the touch panel to start a timeline and the "WAKE" string to kill the timeline.

    FYI, if you do use decide to use the [dvTP,0] approach, make sure it is in an event and not in mainline. :)
  • Jeff has got a great point about displaying a popup message prior to actually shutting down the system. In fact all systems I have seen with this feature do include a warning message (and perhaps a beep) on the touch panel that allows the user to cancel the shutdown.
  • Great points. I appreciate all your comments.

    Thanks again.

    Phil.
Sign In or Register to comment.