Home AMX User Forum NetLinx Studio

Getting page status from Touch Panel

Is there a way to ask the touch panel what page is currently being displayed?

Comments

  • Is there a way to ask the touch panel what page is currently being displayed?

    No, the only way is to track the last page(s) opened by panel design with the page tracking function of the panel, or to manually track all the page and popup flips you do by code.
  • ericmedleyericmedley Posts: 4,177
    That's one of the things they tried to beat into us in programmins school: Get in the habit of doing all page/popup navigation from within the program.

    I create a large data table with all the possible Pop Ups. (I only use one Page that contains the navigation and everything else is a popup) The Nav buttons relate to the data table and the program sends the ppon- command. that way I can know where the user is at at all times.

    so for example. Nav button 3 will call popup 3 which might be 'DVD controls 1'
  • GSLogicGSLogic Posts: 562
    I use an array to keep track of each touchpanels page location and send all page/popup commands from the program. This is a MUST if you're working with many panels on a single system, it gives you the ability to only send data to the panel(s) viewing that location.
  • Do it all in the code

    I concur. Except for the very simplest panels and simplest situations, do all page navigation in your code right from the beginning, because some little thing or other always requires it later on.
  • DHawthorneDHawthorne Posts: 4,584
    I have always subscribed to the opposite position. I only do page flips in code if I absolutely must. The main reason is modularity. If I write a module that I intend to re-use, I really have no idea if I am going to be able to use the same page names. I was using an Escient Fireball module for a project once that required two instance of the module because I had two of them, and the module was not written with multiple devices in mind (they have since corrected this). It had a boatload of internal page flips with some pretty generic names. If I used them as written, I would have pages flipping on panels that were controlling the other device, so I had to go into the module, find every flip, and rename the pages. To me, needing to do something like that defeats the purpose of making it modular in the first place. Then there is the issue of generic page names - if a module internally calls for something named "_keypad," any other device can't use the name or its going to pop up when you don't want it to.

    The other issue is latency. If you have a big, busy system, there can be a delay of a few seconds before a page comes up. Impatient operators are going to hit the button a few times, and potentially fire a bunch of redundant code, adding to the latency and possibly making something happen too many times. If the page flip is done by the panel, it is instantaneous. The customer sees something happening, and is not inclined to mash buttons. If it takes a second or two to populate text and update feedback, that's OK, because they have seen progress.

    Probably I have these issues because many of my jobs tend to be large ones, with no less than a half dozen modules running and multiple panels. Single-room systems with one panel are probably not subject to the same annoyances.
  • Do it in the code!

    I also subscribe to do a touch panel management in the program.

    Reasons:

    1) The ability to keep track of the logic in only one place. (a biggie)
    2) Much easier to scale the system and keep multiple panels controlling the same room in sync.
    3) The ability to populate text buttons before a popup/page flip.
    4) Shows the user that the panel is connected to the system; no page flips equals no connection.
    5) Since there are times you must do flips in the code why not do all the flips in the code.

    With proper program management, latency is not an issue Worst case with an extremely large system and a busy network, 2/10 of a second.

    Much of my opinion comes with the previous experience of managing large systems in the Axcess programming environment with G3 panels and it has carried over. Could I learn a different way, perhaps? I would need a very good reason.

    The only plus I see to using the panel file to manage page flips is the the convenience of using Panel Preview to demostrate the GUI.
Sign In or Register to comment.