Home AMX User Forum NetLinx Studio

no button press timeout action

Hi AMX experts..

My VC equipment is always overheating as nobody turns it off. (well before you couldn't turn it off - but with your help I have got it powering off on the occassions when people exit on the panel).
However, many people don't exit. The credenza is shut (manually, nothing fancy) and the screens/camera then proceed to cook!

my power off just works on a simple relay switch on the amx which activates a power sequencer,
is there some code that would do the following?
Button_event

{If vPanelOne no button is pushed for 2 hours & relay is on, 
then {PUSH:{Send_Command vPanelOne,'PPON-system shutting down'}
if cancel button is pressed, reset timeout, if not switch relay off.}

Or something like that...

Thanks,

David

Comments

  • DHawthorneDHawthorne Posts: 4,584
    If it's a Netlinx processor, create a timeline that will run for two hours. Create an event for the terminating sequence that will shut down your system. Then make every button press reset the timeline to zero. When the sytem is turned on again, restart the timeline.
  • What I typically do is something like the following:
    button_event[dvTP,0]{
      push:{
       if(!timeline_active(TL_ACTIVITY)){
        timeline_restart(TL_ACTIVITY)
       }
       else{
        timeline_create(TL_ACTIVITY,lTL_ACTIVITY,length_array(lTL_ACTIVITY),TIMELINE_ABSOLUTE,TIMELINE_ONCE)
       }
     }
    }
    

    The 0 makes the button event trigger when ever any button is pressed on the touchpanel, restarting the timeline. The times array for the timeline only has one entry, and that is for however long you want for the timeout. In the timeline event, you put whatever code you want for the shutdown of the system.

    Hope that helps.
  • viningvining Posts: 4,368
    You should Think about adding an alarm contact to the credenza and wire it back to the an IO on the master, maybe a motion int the room wired the same then if the credenza is closed or there's no motion in the room for x amount of time you can start the shutdown process.
  • [Deleted User][Deleted User] Harman Integrated Technologies Group (ITG) Posts: 0
    David,
    Another option would be to use a named wait. Cancel the named wait on any button press, and start the named wait on the button release. That will create the inactivity timer you are seeking. My example below is lengthy, but is intended to be readable and demonstrate one approach for this.
    PROGRAM_NAME='NewInclude'
    DEFINE_DEVICE
    dvTP	= 10001:1:0
    
    DEFINE_CONSTANT
    VOLATILE LONG lTwoHourWait = 72000	//tenth of a second (10=1 sec, 600=1 min, 36000=1hr)
    VOLATILE LONG lThirtySecondWait = 300
    VOLATILE INTEGER nTimerStart	= 1
    VOLATILE INTEGER nTimerStop = 2
    
    DEFINE_FUNCTION fnSystemShutdown()
    {
    	//Do What You Need Here
    }
    
    DEFINE_FUNCTION fnSystemShutdownWarning()
    {
    	SEND_COMMAND dvTP,'PPON-system shutting down'
    	WAIT lThirtySecondWait 'Inactivity_Warning_Timer'
    	{
    		fnSystemShutdown()
    	}
    }
    
    DEFINE_FUNCTION fnInactivityTimer(nAction)
    {
    	SWITCH(nAction)
    	{
    		CASE nTimerStart:
    		{
    			WAIT lTwoHourWait 'Inactivity_Timer'
    			{
    				fnSystemShutdownWarning()
    			}
    		}
    		CASE nTimerStop:
    		{
    			CANCEL_WAIT 'Inactivity_Timer'
    			CANCEL_WAIT 'Inactivity_Warning_Timer'
    		}
    	}
    }
    
    DEFINE_EVENT
    BUTTON_EVENT[dvTP,0] //any button
    {
         PUSH:
         {
    	fnInactivityTimer(nTimerStop);
         }
         RELEASE:
         {
    	fnInactivityTimer(nTimerStart);
         }
    }
    
  • annuelloannuello Posts: 294
    For our classrooms (where people regularly leave data projectors running when they are finished for the day) we have a combination of motion sensor (typically 90 minute time-out, but we can tweak it) and a "catch all" shutdown at midnight. The "catch all" is useful if the PIR is damaged or adjusted too sensitively. We use a timeline for the shutdown, which is reset on motion sensor movement as well as any button push.

    In some venues we also allow people to blank (video mute) the projectors. If a projector is blanked for 30 minutes we assume they don't want to use it any more so we turn it off but leave the rest of the system running.

    Roger McLean
    Swinburne University
  • PhreaKPhreaK Posts: 966
    Some other sensing to consider is the internal light sensor in the panels, the motion sensor on the panel as well as if you have any DSP's in the room you can generally pull signal presence. Between these you can pretty reliably sense room occupation without having to install any additional gear. The light sensor alone may be a good one to pick up if the credenza is shut.
Sign In or Register to comment.