Touchpanel page flips delays?

vegastechvegastech Junior MemberPosts: 369
I am trying to perform page flips on my touchpanel via netlinx, so that I can properly introduce a please wait screen while the system is powering up. However, it seems that the codes don't always work - or at least don't all work. I am doing this:
DEFINE_FUNCTION fcnSAT()  //Satellite Macro
{
	IF (nSysOn = 0)
		{
			fcnROOMON()
			SEND_COMMAND dvCV7Tp, "'@PPX'"
			WAIT 20 'panel wait screen'
				{
				SEND_COMMAND dvCV7Tp, "'PPON-wait'"
				}
			WAIT 100 'Power On Delay'
				{
				PULSE[dvTV,131] //  tv/video
				WAIT 20 'tv input sat'
					{
					PULSE[dvTV,16] // #6
					PULSE[dvRCVR,81] //TVDBS input
					nCurrSource = 1
					SEND_COMMAND dvCV7Tp, "'PPON-tv'"  //flip to sat popup
					}
				}
			
		}
when the function is run, kill all popups, then introduce the wait screen, and then show the tv popup.
	ELSE
		{
		PULSE[dvTV,131] //  tv/video
		WAIT 20 'tv input sat'
			{
			PULSE[dvTV,16] // #6
			PULSE[dvRCVR,81] //TVDBS input
			nCurrSource = 1
			SEND_COMMAND dvCV7Tp, "'@PPX'"
			SEND_COMMAND dvCV7Tp, "'PAGE-main'"  //flip to dvd popup
			SEND_COMMAND dvCV7Tp, "'PPON-footer; main'"
			}
		}
}
It seems that the PPX (close all popups) works, but then nothing thereafter works. Do I need a delay between commands?

Comments

  • DHawthorneDHawthorne Junior Member Posts: 4,584
    I never use PPX; it's possible it adds some overhead to the process. I prefer to arrange my page groups so it's not necessary. In fact, I rarely turn a pop-up off either, just turn on another in the same group.

    That said, I've never had a problem calling a page flip, then immediately calling a pop-up on the page. I also tend not to use the "pop-up; page" nomenclature, I just use the pop-up name. I can't imagine that has any bearing on it, but you never know. I also use the @PPN command instead of PPON, but again can't imagine that matters. My suspicions all fall on PPX.
  • ColzieColzie Senior Member Posts: 470
    You may verify there are no page flips in your TP file. Having those and page flips in code can make things act funky.

    I have used PPX in the past, never had an issue with it.

    I DO use the "pop-up; page" nomenclature without issue. I always specify the page for the popup. My reason for doing this is because during commissioning I would often go into the TP's setup pages (for whatever reason) and occasionally one of my popups would show up. Something in the code would trigger the PPN command and then there was no way to get the popup OFF of the setup page other than manually sending a command or rebooting the TP.
  • jjamesjjames AMX Sustaining Engineer Posts: 2,900
    Colzie wrote: »
    You may verify there are no page flips in your TP file. Having those and page flips in code can make things act funky.

    +1 on that!

    I actually use @PPX quite often (in every job for the past 5 years) and have never had a problem with it.
  • ColzieColzie Senior Member Posts: 470
    The reason I got away from using PPX is I didn't like the "flash" it creates if you are hiding a popup then re-showing it right away. For example, if you have a popup page for a top bar for source selection, selecting a source will hide the nav bar, then show it right back. It doesn't look good.
    define_function fn_ui ()
    {
      send_command dv_TP, '@PPX'
      send_command dv_TP, '@PPN-Source Nav'
    
      switch (i_source)
      {
        case DVD:    send_command dv_TP, '@PPN-Source DVD'
        case VCR:    send_command dv_TP, '@PPN-Source VCR'
        case SAT:    send_command dv_TP, '@PPN-Source SAT'
      }
    }
    
    

    Of course there are ways around this (have the nav as part of the PAGE instead of the POPUP, etc.) but for flexibility (able to use the same TP file for different areas, etc.) using popups is a much better way to go. IMHO

    I much prefer to "manually" track all my popups (like Dave mentioned) and either close individual popups as necessary, or use groups to automatically handle them.
  • vegastechvegastech Junior Member Posts: 369
    Just to clarify, the @PPX function is working for me just fine. The problem I have is that the popups do not appear as programmed, and I don't know why. I am using the same main page background, so I can't tell if my 2nd command, Page-main is working or not (since it doesn't really matter). Does it matter if my popups are in sub-groups within the popups section of TPD4?
  • jjamesjjames AMX Sustaining Engineer Posts: 2,900
    Double check to make sure there are no spaces at the end of the page name in your TPD file. I remember NUMEROUS times when I first started that I'd somehow accidentally put a space at the end of a popup or page name in the TP file, and it wouldn't work from code. Page / popup names are all case sensitive. So if it's "Main" or "MAIN" in the panel, be sure it's the same in code.
  • Joe HebertJoe Hebert Junior Member Posts: 2,154
    vegastech wrote: »
    Does it matter if my popups are in sub-groups within the popups section of TPD4?
    There is nothing wrong with groups as long as you keep in mind that only one popup in a group can be shown at any one time.
  • Joe HebertJoe Hebert Junior Member Posts: 2,154
    jjames wrote: »
    Double check to make sure there are no spaces at the end of the page name in your TPD file.
    Been there done that. Hate when that happens.
  • vegastechvegastech Junior Member Posts: 369
    Honestly, I must be dyslexic or something. I'm reviewing my code and reviewing it....some things work, others don't...Finally it hits me - I'm adding an @ where I shouldn't, and forgetting a @ where I need it! Everything falls in line. Don't believe everything I read! :)
Sign In or Register to comment.