Home AMX User Forum NetLinx Studio

Query Panel for Current Page

Greetings,

Does anyone know of a way to query a panel for its current page? Nothing is documented. I've tried PAGE? PAGE-? with no luck.

Thanks.

Comments

  • mpullinmpullin Posts: 949
    Greetings,

    Does anyone know of a way to query a panel for its current page? Nothing is documented. I've tried PAGE? PAGE-? with no luck.

    Thanks.
    You have to turn on page tracking and catch the PAGE- strings coming back from the touchpanel, and simply keep track of what page each panel is on. Keep in mind this only happens when the page flip is triggered by a press via a page flip setting on the panel file. Page flips that happen via code are not tracked. (presumably you already know about them)

    To answer the question more directly, no, I don't believe this is possible.
  • TurnipTruckTurnipTruck Posts: 1,485
    What you described is exactly what I am doing.

    I am trying to find a way to fetch the current page at the online event of the panel. If the panel has been offline due to disconnection, it may return online on a different page.
  • jjamesjjames Posts: 2,908
    This is why I think some people advocate tracking which page the panel should be on via code - this way, when a panel does come back online it knows where to go. When a panel goes offline, it shouldn't work - period. When it's offline, I try to disable as much as possible - this way, the user doesn't think they're doing something when they're really not. In our systems, the user cannot navigate to anything other than a REBOOT page that reboots the panel.
  • Joe HebertJoe Hebert Posts: 2,159
    Does anyone know of a way to query a panel for its current page?
    SEND_COMMAND dvTP, 'TPAGEON'

    When you send that command the TP replies with the current page even if page tracking is already on.
  • jjamesjjames Posts: 2,908
    I don't have a panel to test, but does it also send you what pop-ups are on as well?
  • Joe HebertJoe Hebert Posts: 2,159
    No. I don't know of any popup tracking, only page tracking.
  • mpullinmpullin Posts: 949
    Joe Hebert wrote: »
    SEND_COMMAND dvTP, 'TPAGEON'
    When you send that command the TP replies with the current page even if page tracking is already on.
    Forgot about this trick. Yes, that would work. (only for pages, not popups)
    Joe Hebert wrote: »
    No. I don't know of any popup tracking, only page tracking.
    I believe page tracking will send PPON strings if popups are launched from buttons on the TP file.
  • DHawthorneDHawthorne Posts: 4,584
    mpullin wrote: »
    Forgot about this trick. Yes, that would work. (only for pages, not popups)I believe page tracking will send PPON strings if popups are launched from buttons on the TP file.

    It actually sends @PPN-<popup name>, not PPON, but only if done in panel. I suppose it's assumed if you are doing it in code, you don't need a notification.
Sign In or Register to comment.