Home AMX User Forum NetLinx Studio
Options

locking out a button

Hello all
I am looking into locking out 1/many/all buttons on a touch panel for a specific event and set time. I would like to see if others are/have done this and what methods they have used. While the button(s) are locked out I would like them to blink (or something) to indicate that they are locked out during the time period. The reason is that many projectors require a switching time and I have some clients that keep pressing the source selection button in panic mode if they don't see an image displayed in 1 nano-sec. I want to lock these buttons out for the X time factor to allow the projector to switch inputs and auto-sync.

Comments

  • Options
    DHawthorneDHawthorne Posts: 4,584
    I just pop up a page that covers 90% of the panel that is modal, and has a message saying the projector is warming/cooling, and that they should wait. I use a variable text to tell them how long it will be, and pop it off again when it times out. I also put a hidden button in the corner to shut it down in case a comm interuption prevents it from going away on it's own.
  • Options
    Thomas HayesThomas Hayes Posts: 1,164
    Hi Dave
    I use a page that it flips to for warm/cooling with a bargraph display instead of the numeric counter already. However you gave me an idea to put a clear pop-up over top of the button(s) for the the 8 sec's that it takes for the projector to sync.
  • Options
    dchristodchristo Posts: 177
    Thomas,

    If you're using a G4 series panel you can set the buttons to "disabled" to grey them out, and then after the time period set them back to "enabled". I don't remember the commands right off the top of my head, but they're in Software History.

    --D
  • Options
    mpullinmpullin Posts: 949
    I find it helpful to have the software history for the panels I'm using as a txt file under 'Other' in my workspace.

    "'^SHO-<vt addr range>,< 1-0>'"
    Turns button On or Off (0=hide, 1=show).

    So I'd do a

    SEND_COMMAND dvTp, '^SHO-100.199,0'

    if I wanted to hide all buttons 100 thru 199.
  • Options
    champchamp Posts: 261
    I tried to explain it in words, but code is better.
    Basically the projector will do whatever the last button pressed was, but not until it's ready. I used to stack all commands and issue them all, but this is very bad when someone presses on,off,on,off....


    DEFINE_TYPE
    STRUCTURE _sStatus
    {
    CHAR cInput // CURRENTLY ACTIVE INPUT SOURCE
    CHAR cPower // POWER STATE
    }

    DEFINE_VARIABLE
    PERSISTENT _sStatus uStatusCurrent
    PERSISTENT _sStatus uStatusPending

    DEFINE_FUNCTION SendCommand()
    {
    SELECT
    {
    ACTIVE (uStatusPending.cPower <> uStatusCurrent.cPower) :
    ExecutePower()
    ACTIVE (uStatusPending.cInput <> uStatusCurrent.cInput) :
    ExecuteInput()
    ACTIVE (TIMELINE_ACTIVE(TL_COMMAND)) :
    TIMELINE_KILL(TL_COMMAND) // all commands processed
    }
    }

    DEFINE_FUNCTION CurrentEvent()
    {
    IF(TIMELINE_ACTIVE(TL_COMMAND))
    SendCommand()
    ELSE
    TIMELINE_CREATE(TL_COMMAND, lCommandArray, 1,
    TIMELINE_RELATIVE, TIMELINE_REPEAT))
    }

    DEFINE_EVENT
    DATA_EVENT[vdvDEV]
    {
    COMMAND :
    {
    SWITCH (DATA.TEXT)
    {
    CASE 'POWER=ON' :
    {
    uStatusPending.cPower = POWER_ON
    CurrentEvent()
    }
    CASE 'INPUT=1' :
    CASE 'INPUT=RGB':
    {
    uStatusPending.cInput = RGB_1
    CurrentEvent()
    }
    }
    }
    }

    DATA_EVENT[dvDEV]
    {
    COMMAND :
    {
    SWITCH (DATA.TEXT)
    {
    CASE 'PON' : uStatusCurrent.cPower = POWER_ON
    CASE 'IN1' : uStatusCurrent.cInput = RGB_1
    }
    }
    }

    TIMELINE_EVENT[TL_COMMAND]
    {
    SendCommand()
    }

    DEFINE_PROGRAM
    WAIT 10
    BLINK = !BLINK

    [dvPANEL, PROJ_ON] = (uStatusCurrent.cPower = POWER_ON
    || (uStatusPending.cPower = POWER_ON && BLINK))

    //I've editted it severely to make it shorter. (Cut out the poling part)
  • Options
    I typically do the same as Dave, Large modal popup with info during lockout.

    -- John
  • Options
    Spire_JeffSpire_Jeff Posts: 1,917
    champ wrote:
    I tried to explain it in words, but code is better.

    You might be a programmer geek if...... ;)

    Jeff
  • Options
    Thomas HayesThomas Hayes Posts: 1,164
    Thanks Guys
    All are great ideas. I'm using both G3 and G4 panels but mostly the G3's. I was looking in the software history to find a 'blink' command that I could send to a button followed by a 'on' command but I didn't see any.(Not to say there isn't such a command) :)
  • Options
    Thomas HayesThomas Hayes Posts: 1,164
    Champ, to prevent the client from turning the projector on and off rapidly I have a warm up and cool down page that has no buttons. There is a 40 sec. warm up and a 2 min. cool down. I also display a bargraph to give the client a visual indicator of the X time.
  • Options
    champchamp Posts: 261
    Lockout pages are effective and easy. Unfortunately I have had impatient clients who wanted to do other stuff while the projector is warming. Therfore I came up with the above solution.

    The blinking button is easy

    DEFINE_PROGRAM
    WAIT 10
    blink = !blink
    [PANEL, PROJ_ON] = ((ProjPower = POWER_ON) && blink)

    Bar graphs and text messages are great for the wow factor. I have considered wasting lots of time making an extremely accurate bar graph indicator to log the amount of time the display has previously taken to warm and cool and compare it to the length of time it has been on for. All this just to make an accurate bar graph because I hate windows installer bar graphs sitting on 100% for minutes.
    I could do that in my spare time or I could do somethng interesting.
  • Options
    Spire_JeffSpire_Jeff Posts: 1,917
    champ wrote:
    The blinking button is easy

    DEFINE_PROGRAM
    WAIT 10
    blink = !blink
    [PANEL, PROJ_ON] = ((ProjPower = POWER_ON) && blink)

    A shorter way to do this would be:

    WAIT 10
    [PANEL, PROJ_ON] = ![PANEL, PROJ_ON] && ProjPower

    At least I think I've done something similar before. Oh, this assumes that ProjPower = 1 for ON and 0 for OFF. If not, just use (ProjPower == POWER_ON) like above.


    Jeff
  • Options
    If I need something blinking/oscillating in code, I usually have a WAIT 5 blink = !blink somewhere in my feedback timeline, then incorporate it like this:
    [TP,1] = ([Proj,PowerOn] OR ([Proj,Warming] AND blink))
    

    A very wizened programmer (or two or three) at AMX told me back when I was first starting to program that I shouldn't use channels on a touch panel on the right side of a boolean equation like you would with other devices, like a com port, or a variable. (I.E., asign to the channels, but don't use them as reference)

    I don't remember the explanation if there was one, but it's just been one of those "you just shouldn't do it" type things that's stuck with me for most of the past decade...

    - Chip
Sign In or Register to comment.