Home AMX User Forum AMX General Discussion

Combining Wired and wireless TP

I am new to programming and I have made combine device wired TP and wireless TP (NXD 7000 and Modero 8400). The issue was it does not follow each other once you push any button. I define Virtual TP to combine two touch panel as one. Is there other method to combine TP..

Comments

  • ericmedleyericmedley Posts: 4,177
    edgelitoc wrote: »
    I am new to programming and I have made combine device wired TP and wireless TP (NXD 7000 and Modero 8400). The issue was it does not follow each other once you push any button. I define Virtual TP to combine two touch panel as one. Is there other method to combine TP..

    I would recommend using a DEV array. This doesn't tie the devices together in a strict sense. It's just a convenient way to group several things together for sending / recieving stuff.

    It looks something like this..
    DEFINE_DEVICE
    
    dvTP_1 = 10001:01:0
    dvTP_2 = 10002:01:0
    dvTP_3  = 10003:01:0
    
    DEFINE_VARIABLE
    
    volatile DEV dev_TP[]=
    {
    dvTP_1,
    dvTP_2,
    dvTP_3
    }
    
    
    volatile integer dev_TP_Buttons[]=
    {1,2,3,4,5,6,7,8,9,10}
    
    DEFINE_EVENT
    
    BUTTON_EVENT[dev_TP , dev_TP_Buttons]
    {
    PUSH:
      {
      TP_DEVICE=Button.Input.Device.Number  // This will tell you wich real device was pushed.
      TP_PORT=Button.Input.Device.Port // which port
      TP_SYSTEM=Button.Input.Device.System  // from which system
      TP_BUTTON_PUSHED=BUTTON.INPUT.CHANNEL  which button
      // DO SOMETHING.
      send_command dev_TP, *some command*  // this will send the command to all devices in the array.
      send_command TP_DEVICE:TP_PORT:TP_SYSTEM, * some command *   // This sends the command to just the one that really pushed the button.
      }
    }
    
    
    

    Hope that helps
  • Thank you so much for the help... I will try this one today.....
Sign In or Register to comment.