Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

waits while projector is warming up

I have written some code ( with help from you fine people) that produces a variety of events:
screen down/rack power on/projector on. This occurs on the main page and is designed for user simplicity. In a nut shell choosing a variety if media sources( vcr/dvdd/ld/or laptop/desktop computer) will produce the same cascade of effects. After the user pushs one of these buttons I have a page flip that sends the user to a source page . The problem I am having is that during projector warm up the projector seems immune to a command to either flip to video/s-video and an rgb input. I imagine I need to throw some waits in there but was wondering if this will slow mainline down and if anyone has a work around that is more elegant? For example when choosing "dvd" for example everything comes on but usually the input is for the computer ( input-a as it is a default) . The user must then return to the main page and rechoose "dvd' even though the code has taken care of this ....
What would be a reasonale "wait" for either a sony or panasonic projector?

Comments

  • ericmedleyericmedley Posts: 4,177
    Stewart wrote: »
    I have written some code ( with help from you fine people) that produces a variety of events:
    screen down/rack power on/projector on. This occurs on the main page and is designed for user simplicity. In a nut shell choosing a variety if media sources( vcr/dvdd/ld/or laptop/desktop computer) will produce the same cascade of effects. After the user pushs one of these buttons I have a page flip that sends the user to a source page . The problem I am having is that during projector warm up the projector seems immune to a command to either flip to video/s-video and an rgb input. I imagine I need to throw some waits in there but was wondering if this will slow mainline down and if anyone has a work around that is more elegant? For example when choosing "dvd" for example everything comes on but usually the input is for the computer ( input-a as it is a default) . The user must then return to the main page and rechoose "dvd' even though the code has taken care of this ....
    What would be a reasonale "wait" for either a sony or panasonic projector?

    This is quite common. Many projectors will not respond to any command while they are warming up. There's a variety of ways to handle it. One that makes sense to me is to create a message que that monitors the state of the projector. The queue can store commands to send while it waits for the projector to come online again.

    I'd opt for this kind of thing because it's less dependent upon make and model of projector. If you change out projectors some day, then you'd have to re-write all the wait times and whatnot.

    I'd also track current states of video inputs in the program as well. For example, if the Projector is already on and is viewing the DVD player, why resend the power on and video input 'whatever' commands again.

    The way to build a good queue is to set up a command list and associate the correct wait time with the list. For example: *using phony baloney commands*
    Proj_Command[1]='PWR-1' // power on
    Proj_Command[2]='PWR=0' // power off
    Proj_Command[3]='VGA1' // video iinput 1
    Proj_Command[4]='VGA2' // video input 2
    etc...
    
    Proj_Command_Wait[1]=600  wait for 60 seconds before next command
    Proj_Command_Wait[2]=900 // cool down takes 90 seconds
    Proj_Command_Wait[3]=10 // 1 second
    Proj_Command_Wait[4]=10
    Proj_Command_Wait[5]=10
    etc...
    

    Then pass both variables into the cue using the Proj_Command_Wait as the timeout until the next command is sent. That way you can avoid collisions and the queue will handle other possible collisions if the projetor is hanging up for some reason.

    Just an idea...
    e
  • viningvining Posts: 4,368
    Stewart wrote:
    I need to throw some waits in there but was wondering if this will slow mainline down and if anyone has a work around that is more elegant?
    You could always fire up a timeline that kills itself when the timeline.repitition reaches the desired wait time limit.

    As far as waits bogging down the mainline I really don't think that's much of an issue since I beleive they are controlled by a timeline run by the master that checks and decrements its queued contents every 100ms and then executing it's its code when the count reaches 0. So its not really different then any other code that runs in another timeline, just a timeline event firing every so often to see if anything is ready to be executed. Wait_until's might be another story but I haven't really found a use for them that aren't better handle in other ways.
  • DHawthorneDHawthorne Posts: 4,584
    Waits will not slow up mainline to any appreciable degree. They simply set a flag; every pass of mainline checks that flag for the timer expiration, and when it's due, the code fires. It's probably less processor intensive than an IF statement in mainline.

    Personally, I stay away from timelines for simple timeouts like this. I always just use a named wait for projector warmups. I'll spend some time with the projector figuring out an optimal value; if I'm so fortunate to have a projector that actually reports its state, I'll set it a bit above the maximum timeout, then cancel the wait when the projector says it's ready.
  • What I have typically done, is either track it by feedback or by a power variable. If the projector is off then I issue the normal commands to turn it on, etc, while at the same time doing a PPON command to flip on a modal popup page that says something like "please wait while the projector warms up." and then it has a count down timer that is controlled by ^TXT commands sent to the touchpanel. This way the user knows something is happening and that it's not a frozen panel or something. At the end of the warmup time, I send the appropriate input commands and then kill the popup. If I have determined that the projector is already on at the time the button is pressed, then I just do the appropriate input switching. I have also seen other programmers who have something like a windows progress bar that scrolls instead of the count down timer.
Sign In or Register to comment.