locking out a button
Thomas Hayes
Posts: 1,164
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.
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.
0
Comments
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.
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
"'^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.
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)
-- John
You might be a programmer geek if......
Jeff
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)
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.
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
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