Home AMX User Forum NetLinx Studio

TP pages control

Hey guys,
i see more experienced programmers talking about making pages flip on the tp based on code rather than thru TPD4... how is this done?
thanks in advance...

Comments

  • HedbergHedberg Posts: 671
    You can do all sorts of things with touch panels from the code. To do a page flip, it's something like:

    If your page is named "MY_PAGE''

    send_command dvTouchPanel,'PAGE-MY_PAGE'

    Note that 'PAGE-MY_PAGE' is a string literal. You don't need to send a string literal. You can do a string expression or a string variable or whatever so long as it ends up being a string that starts out with 'PAGE-' and is followed by the name of the page as specified in the touch panel file.

    Look in the touch panel documentation for other neat things.
  • kbeattyAMXkbeattyAMX Posts: 358
    Control of a touch panel should be balanced with the need to provide a DEMO panel for client preview and sign off. This is accomplished by using G4 Panel Preview. AMX made great strides between G3 and G4 panels. The biggest plus for G4 is all of the control given over Pages and Popup Pages with in TPD4. The biggest argument for controlling the TP through code is the ability to keep pages and popup pages in sync with multiple duplicate panels. But there is a work around. All TP send strings back to the controller that include page flip information. All you have to do to sync another TP is to take those page flip strings and send them back out to other panels that need to be synced or tracked. It's that simple.
  • ipssheldonipssheldon Posts: 106
    Some examples of why you would put the page flips in code:

    Any time the user login determines their access to certain pages. In this case, once the user enters their PIN or other login information, the code determines access and gives access to or protects certain pages as the user is operating the panel.

    Another user would be in a room where there is a simple button panel on the wall, near the door for instance. The user hits power on, via the keypad and maybe even selects a source. The user then walks over to the lectern to user the system and wants the panel to be configured for access to the appropriate devices. In this case, the code would have to force the panel to the appropriate page and/or set of popups based on what was triggered at the keypad.

    There are lots of other reasons as well. It just depends on the application.
  • ericmedleyericmedley Posts: 4,177
    One of the biggest reasons I do almost all my panel navigation in code is that in the installations I do, it would be maddening to try managing the TP files for so many panels with so much customization.

    My panel files are all the same for each project. They are essentially blank templates that are filled in by the program. The choice of background images, button images, button text, zone names, source names, etc.. are all done in code. they also contain just about everything we do. So, each client has a panel file with all our stuff whether they use it of not. If they later decide they want to add something, it's no big deal. the work's pretty much already done. It just magically shows up the next time.

    Another issue is the fluid nature of our projects since our work flow is quite often 18-24 months out and a lot of what we're looking at is plans on homes that are still salt-water marsh. We are often working on new construction. So, we don't know what a room is going to be called but I want to know that it works. So, we'll use the architectual plan's room numbers for a zone name to test. When the client gets in and says, "That room is Bobby's room" I can then easily change it in code and all the TPs change instantly.
    TP_Nav_HA_Zone_Name[11][01]='Bedroom 207'
    // becomes
    TP_Nav_HA_Zone_Name[11][01]='Bobby''s Room'
    

    And when they later say, "Oh, that's Bobbie, not Bobby... " it's still no big deal. I don't have to manually modify umpteen panel files and upload them all.

    It's nice to be able to make significant changes to all or some or one of the touch panels without having to load a single TP file.

    It's something I've built up over time and it has gotten quite complex. However, it only takes me about half a day to fill in all the data on an installation and I'm ready to go. This includes systems over $500K. I simply could not do what I do using the TPs built-in navigation. I'll quite often have 4 or 5 popups open over a page to build it and managing that with almost no logic cannot be done.

    As far as demoing is concerned. We have 2-3 systems running at our shop and at one home. I also have a fake demo running on my mothership Netlinx master. The sales people can get a panel setup and speaking to it anywhere they can get the panel connected online. The difference being that they can demo a real working system.
Sign In or Register to comment.