Home AMX User Forum NetLinx Studio

Channel Code

Hi all,
I need to have the possibility to change the channel code of a touch panel button. I mean to have a channel code of 50 for example and then to change that to channel code of 0 and the opposite
Can I do that through NetLinx Studio with a send_command ?

George

Comments

  • mpullinmpullin Posts: 949
    Hi all,
    I need to have the possibility to change the channel code of a touch panel button. I mean to have a channel code of 50 for example and then to change that to channel code of 0 and the opposite
    Can I do that through NetLinx Studio with a send_command ?

    George

    First of all, you can't have a button with channel code 0. 0 is the code that is used to check for any channel on a device, e.g. BUTTON_EVENT[dvTP,0] will keep track of any button push.

    Secondly, you can't change the channel of a button. There are a lot of things you can change about a button but channel isn't one of them. Chances are good that what you're trying to do can be accomplished another way via programming, e.g. changing a flag in your code and having ONE button that does different things depending on what the flag is.
  • Jeff BJeff B Posts: 37
    George, since you want to change the channel code to 0 I am assuming you want to enable and then disable the use of a button.

    This touch panel command will do that.

    "'^ENA-<variable text address range>,<command value>'"
    Enable or disable buttons with a set variable text range.

    Syntax:
    SEND_COMMAND <DEV>,"'^ENA-<vt addr range>,<command value>'"

    Variables:
    variable text address range = 1 - 4000.
    command value = (0= disable, 1= enable).

    Example:
    SEND_COMMAND Panel,"'^ENA-500.504&510.515,0'"
    Disables button pushes on buttons with variable text
    range 500-504 & 510-515.


    Jeff B
  • Jeff,
    this what I need to do. This is a good idea.
    Thanks a lot.

    George
  • DHawthorneDHawthorne Posts: 4,584
    ^SHO is similar, but can actually hide the button completely. Once hidden, it can no longer be pressed.
  • Dave,
    this is a good idea too but I need this buton not to be hidden.

    George
  • JeffJeff Posts: 374
    I don't know how well this would work for what you're doing, but I've also had good luck disabling buttons by popping up a transparent popup over the buttons I didn't want working.

    I've only ever used it on systems with projectors, where I've automated it so much that the user never consciously controls the projector. As a result, I had to find a way to prevent them from trying to start up the system immediately after shutting down the system, giving the projector time to cool down. I created a transparent popup page with a 120 second timeout, and then I put in the code to pop it off if the projector sends a message saying its all cooled down.

    I dont know what you're doing and it seems like you've already gotten much more precise advice, but this was a very easy solution to my problem, and the buttons never get stuck in the off position because of the timeout on the page.

    J
Sign In or Register to comment.