Home AMX User Forum AMX Design Tools

Address Code versus Channel Code

I am a newbie on the TP4 stuff, so sorry if this is a dumb question. Why would one use and Address Code for a button that is differenent than the Channel Code? More specifically, what is the purpose of the Address Code as compared to the Channel Code?

Comments

  • Spire_JeffSpire_Jeff Posts: 1,917
    First off, I personally can't think of an instance in which I use a channel code that was different than the address code for that particular button. I do, however, use buttons that only have channel codes and also buttons that only have address codes.

    You might be seeing some stuff that is a carry-over from the older panels. They had a much more limited channel/address code space. It was necessary in a big project to be more conservative in channel/address code use so that you actually had enough to provide control over everything.

    The address code is used when the processor needs to change the way a button looks (Change the text, the icon, the bitmap, anything else listed in AMX PI). The channel code is what generates button events in your code and it is also used to control the ON/OFF state of the button.

    Hope this helps,
    Jeff
  • Thanks Jeff, I totally get your answer. That helps a bunch.
    keith
  • a_riot42a_riot42 Posts: 1,624
    pushtoplay wrote:
    Thanks Jeff, I totally get your answer. That helps a bunch.
    keith

    I believe the iPod module uses different address/channel codes. I have done this as well from time to time especially when I am using layered buttons. I will use a channel code so that either button will turn on that channel but one layer will have a different address code because I want only one layer to get highlighted. Do enough projects and you will need to do this at some point I'm sure.
    Paul
  • DHawthorneDHawthorne Posts: 4,584
    I use different channel codes than address codes all the time - mainly because nearly every button needs a channel code, but not all need an address. I just don't like large gaps of unused codes scattered throughout. It also makes it easier to deal with feedback when you know your addresses are a contiguous 1-20, not 1-3, 6-10, 33, 46, and 51-61. I also tend to think of feedback as an entirely separate entity from event generating; since address codes are strictly feedback, I prefer not to have them scattered all over the map when I assign them.

    But this is entirely a personal preference thing - it doesn't really matter how you assign channels and addresses, as long as you keep proper track of them. Whatever works best for the way you think is the best way for you.

    But, the summary is: channel codes are what the panel sends to your master, address codes are what master uses to send to your panel (beyond the on/off button state, that is).
Sign In or Register to comment.