Home AMX User Forum AMX Design Tools

Address and Channel???

Can somebody give me a quick overview of the differences between Addresses and Channels and how they relate to feedback to and from a master? The help documentation in TPD4 seems woefully inadequate for newbies and doesn't give a good explanation. I'd settle for a URL to some good documentation on the subject if you know of any.

Thanks for the help,
Derek.

Comments

  • ericmedleyericmedley Posts: 4,177
    A probably over simplified answer is that Channels are what are used to denote which button got pushed, released (and by inferrence, held)
    BUTTON_EVENT[tp_1,1]
    {
    PUSH:
      {
      // some one pushed button 1, do someting.
      someone_did_something=1
      }
    }
    

    Channels are also used for feedback.
    DEFINE_PROGRAM
    
    IF(someone_did_something=1)
      {
      ON[dv_tp,1] // TURN ON THE FEEDBACK OF BUTTON 1
      someone_did_something=0 // reset the var
      }
    

    NOTE: turning a touch panel button channel on does not equal pushing it.


    The Address portion is typcially used for variable text.

    So,
    IF(someone_did_something=1)
      {
      ON[dv_tp,1] // TURN ON THE FEEDBACK OF BUTTON 1
      SEND_COMMAND dv_tp,'TEXT1-HEY! Stop pushing this button!"
      someone_did_something=0 // reset the var
      }
    
    

    Note: The Address number doesn't have to be the same as the channel number. It could be button Channel 1 and Address 101. If that were the case the above example would look like..
    IF(someone_did_something=1)
      {
      ON[dv_tp,1] // TURN ON THE FEEDBACK OF BUTTON 1
      SEND_COMMAND dv_tp,'TEXT101-HEY! Stop pushing this button!"
      someone_did_something=0 // reset the var
      }
    

    Sorry to use old programming methods, but sometimes it's the easiest way to explain it...
Sign In or Register to comment.