Home AMX User Forum AMX General Discussion
Options

Headers and Footers disappear...

Ok, I have got some help with various other problems in regards to the system I am working on, but this one is driving me mad!

I use pop-ups for the headers and footers, and sometimes they simply go away, making no way to navigate off the page. I have them being shown in online events for the touch panel, so in theory if it goes offline and back they would be replaced. With that said, the panel is still online, the commands work fine on that page, just no header and footer.

Some background for those new to my $@*$* system...

Three NI-3100 controlling around 30 devices - residential system, big things are two autopatch boxes for audio and a Vantage lighting control system.

I am just trying to get a feel for where I start looking, code, network problem, panel, etc?? A panel that doesn't get used, it never disappears. It can be (it seems) on any page. And could be a couple days or minutes.

Any guesses before I just put show pop-up commands in a timeline :)

Curt

Comments

  • Options
    HedbergHedberg Posts: 671
    I used pop ups for navigation on one job. Got the idea from using the panel builder thingie -- that was my big mistake, in my opinion. Ran into a similar situation as the one you describe. What was causing my problem was that the panel was going to a page that killed the pop ups and then could be buttoned back to the previous page and the pop ups were therefore gone.

    I would think that you could address this problem by using page tracking--call for the popus whenever the relevant page appears.. Or, rather than just showing the pop ups, you could show the pop ups on just the page where they belong and then remove any method that kills them (@PPX or whatever).

    Of course, I'm just guessing as to what's causing your problem, but it is clear that you should be able to bring up the popups on the appropriate page no matter how that page gets displayed.
  • Options
    Thanks, unfortunately it is a bit goofier, they show up just like they should, but will then just dissapear. You could be staring at the page, not touch a thing, and they will be gone. Seems more like a resource issue or something, but what is having a problem I just can't seem to get a handle on.

    Curt
  • Options
    viningvining Posts: 4,368
    Is this the same system w/ MAX? I seem to recall ealier posts about strange pop up behavior caused by MAX. Like in the previous post any rogue code (MAX) calling PPX out of turn will call major headaches.
  • Options
    It has a MAX system, but I removed all references to PPX in the UI module, and it doesn't seem to be related to the AMX being used. You had me excited though, I went and double checked...
  • Options
    Spire_JeffSpire_Jeff Posts: 1,917
    Have you turned on device notifications for one of the touch panels and monitored it for traffic until the symptom occurs? Occasionally I find a rogue bit of code or a command that is causing a problem that I didn't even anticipate.

    I can tell you that I use a lot of pop-ups for navigation and other things on my panels and the only time I've ever had any problems is when I did something in code that caused the problem. One thing that might be causing your problems is the use of touch panel arrays. I have in the past missed a reference (ie dvTP_Array instead of dvTP_Array[x]) and I've also referenced the wrong TP array in a GET_LAST statement. Watching the commands going to and from the touch panel should help you catch most of these problems.

    Jeff
  • Options
    I use TP arrays a lot, but on modules that all touchpanls should be synced. For example, the Sharp television modules are all passed in arrays since the tv is always in the same state for all touchpanels (as compared to say a video switcher where they are all on a different input).

    So I have:
    MODULE_NAME='SharpLCD_UI' (DEV vdvDevice, DEV dvTP[])
    
    in the module declaration

    Things like this:
    If (FIND_STRING(data.text,'1',1)>0)
    		SEND_COMMAND dvTP,"'TEXT30-Sidebar'"
    
    in the module itself and:
    DEFINE_MODULE 'SharpLCD_UI' SharpUI1   (vdvBarTV,dvTPArrayBarTV)
    
    thats in my main program.

    Am I doing something stupid in there?

    Thanks for your help,

    Curt
  • Options
    Joe HebertJoe Hebert Posts: 2,159
    TrikinCurt wrote:
    I use pop-ups for the headers and footers, and sometimes they simply go away, making no way to navigate off the page.
    Spire_Jeff wrote:
    Have you turned on device notifications for one of the touch panels and monitored it for traffic until the symptom occurs? Occasionally I find a rogue bit of code or a command that is causing a problem that I didn't even anticipate.

    I can tell you that I use a lot of pop-ups for navigation and other things on my panels and the only time I've ever had any problems is when I did something in code that caused the problem.
    Turning on device notifications is a very good idea. I too have not had the problem of popups disappearing on their own. There is another possibility. On the general tab for a popup there is a property called timeout. Is there any chance that is set to a number other than 0? If it?s not that then I would have to lean towards a code issue.
  • Options
    Spire_JeffSpire_Jeff Posts: 1,917
    I would think that it is not a timeout value being set, otherwise it would always disappear after a set amount of time..... unless the processor is constantly sending @PPN commands in some situations. I would definitely try the device notifications to help narrow down where the problem is occurring.

    Jeff
  • Options
    ericmedleyericmedley Posts: 4,177
    I use a different approach that you may want to consider in that it kinda solves your problem.

    I put the navigation buttons on a page instead of a popup. Everything else on the panel is a popup. There is technically only one page on each panel.

    I also only create on TP file for every TP in the system. In the file I create a Startup page that is specific for each panel in the house. For example, TP_1 may be in the Kitchen. so, the page is called Startup_Page_1, The panel in the Home Theater might be Startup_Page_2, etc... the device numbers determine what panel number we're talking about. 10001=panel 1, 10002=panel 2, 10003=panel 3, etc...

    The page that is the default startup page for the panel has some generic nav buttons and a message that the panel is offline.

    In the DATA_Event for each panel I put a command in the ONLINE: section that is something like
    ONLINE:
    {
    send_command TP_DEVICE:01:0," 'PAGE-Startup_Page_',itoa(TP_DEVICE-10000) "
    }
    
    
    When the panel comes online it is sent to the correct page for that room. (also by default they have the correct navigation buttons that are pertinent for that room)

    the other rule I follow is that the navigation buttons can never be covered up by a popup. We've found great success in this because the client is never more than one button away from the topmost level. They can easily get back out if they're confused.

    That's my 2 cents...
  • Options
    a_riot42a_riot42 Posts: 1,624
    I don't think I fully understand the issue but just to make sure, you do know that if a series of popups are in a group, then they are mutually exclusive and will disappear on you if another popup in the group gets displayed.

    For something like this I would usually do an Alt-T-I and search for PPK or PPX and see if you can locate a bad popup call.
    Paul
  • Options
    ericmedleyericmedley Posts: 4,177
    a_riot42 wrote:
    I don't think I fully understand the issue but just to make sure, you do know that if a series of popups are in a group, then they are mutually exclusive and will disappear on you if another popup in the group gets displayed.

    For something like this I would usually do an Alt-T-I and search for PPK or PPX and see if you can locate a bad popup call.
    Paul

    Yes, I do put my popups in different groups. For example, I may have left-side popups, right-side popups, middle popups, AVcontrol popups, etc... It depends upon their function.

    My popup navigation is managed from a database in my program. To make changes in the navitation, I just change the data tables. The rest is handled for me by the program. It's pretty bullet-proof. I can manage hundreds of popups on several touch panels with completely different looks with only one touch panel file. Once you do the heavy lifting in the beginning, the rest is a cake walk.
  • Options
    Okay,

    time to keep looking more into the obvious... I had switched some modules to just pass in an array of touch panels, as opposed to using 12 instances of the UI module. I am not sure if that gains me anything, but it sure made the queues much happier on startup.

    So, simple question, when passing in an array of touch panels, is it okay to say the following:
    SEND_COMMAND dvTP,"'^TXT-52,1&2,',data.text"
    

    This does thing like update the current song on the XM and HD radios.

    Thanks,

    Curt
  • Options
    viningvining Posts: 4,368
    That's will work fine but for clarity I would make the array dvTP_Arry for instance just so it's obvious to me that I working with all the panels not just a single panel. If I want to send to the single panel of the array that initiated a button event or data event I would send_command DATA.DEVICE or send_command BUTTON.INPUT.DEVICE so that only the device that triggers the event is addressed, especially when it initiates a pop up.

    DHawthorne posted a nice combining function that will modify the panels of the array based on what panels are actually on a particular page so that you only send feedback to the panels that really need it. Of course with this would have to have the codes structured to allow a panel that joins the combined array to get updated when it joins.

    You can also use GET_LAST(dvTP_Array) on a button or data event to return the array index position of the TP that initiated the event. I personal think that these methods are better than using a separate instance of a UI module for each TP in a system.
  • Options
    a_riot42a_riot42 Posts: 1,624
    vining wrote:
    You can also use GET_LAST(dvTP_Array) on a button or data event to return the array index position of the TP that initiated the event. I personal think that these methods are better than using a separate instance of a UI module for each TP in a system.

    Is get_last reentrant? I am always worried that since my TP array is a global variable that other threads could change a get_last result before anothers finished processing. Anyone ever run into that? Does get _last return the last button push on the actual touch panel or would it also include a do_push to that panel from code?
    Paul
  • Options
    viningvining Posts: 4,368
    Since it should only be used in a button event or data event (maybe elsewhere but I can't think of where...channel event) it will return the last of the TP_Array or Button_Array index which was used to initiate the event.

    A Do_Push runs through the Button event just as a real TP button would.

    Since there is no multi threading it will just return the last X of the event it's call in.
  • Options
    a_riot42a_riot42 Posts: 1,624
    vining wrote:
    Since it should only be used in a button event or data event (maybe elsewhere but I can't think of where...channel event) it will return the last of the TP_Array or Button_Array index which was used to initiate the event.

    A Do_Push runs through the Button event just as a real TP button would.

    Since there is no multi threading it will just return the last X of the event it's call in.


    Ok thanks. The docs say it can be used anywhere btw, not just inside of an event.
  • Options
    viningvining Posts: 4,368
    a_riot42 wrote:
    Ok thanks. The docs say it can be used anywhere btw, not just inside of an event.
    Yes but for reasons you eluded to ealier it "should only" be used in events. Obviously depending on circumstances it may be desired and appropriate to use outside events but then you may run into situations where it may returns an index value other than the one you were expecting. There are a lot of situations where using get_last outside an event will return exactly what you want. Knowing what the most recently used TP_Array index or Button_Array index is can be very useful outside an event depending on what you're looking to accomplish.
  • Options
    Well if nothing else this ordeal has got me to clean up a lot of modules and code :)

    I hate to admit it, but I found a couple of PPX commands in the Carrier Infinity code. The panels have run the last several days without anything magically disappearing so it may have been as easy as that. What a silly dangerous command...

    Curt
  • Options
    a_riot42a_riot42 Posts: 1,624
    TrikinCurt wrote:
    I hate to admit it, but I found a couple of PPX commands in the Carrier Infinity code.
    Curt

    That's just plain mean :(
  • Options
    Spire_JeffSpire_Jeff Posts: 1,917
    TrikinCurt wrote:
    Well if nothing else this ordeal has got me to clean up a lot of modules and code :)

    I hate to admit it, but I found a couple of PPX commands in the Carrier Infinity code. The panels have run the last several days without anything magically disappearing so it may have been as easy as that. What a silly dangerous command...

    Curt

    Did you find the PPX commands in the Comm module, or the UI code?

    Jeff
  • Options
    It is a Duet module (which is bad enough), so it was in the UI. They pop up a message whenever it is initializing, but issues a PPX first. Since I didn't even have this pop-up I didn't notice it. Apparently it must be going offline now and again and re-initializing, taking away all of the headers and footers in the process.

    Frustrating, I had disabled the module over a month ago and thought I still had problems, but since I took out the PPX it has been running solid as can be.

    I am just happy to work on features instead of bug fixes for a change!

    Curt
  • Options
    Also be careful when using popups to navigate in an RMS system, there is a PPX command in one of the standard RMS modules. We spent quite a bit of time chasing it during training and couldn't figure out exactly where it was in the code but it seemed to be tied to the scheduling functionality.
Sign In or Register to comment.