Home AMX User Forum NetLinx Studio
Options

Combining TPs across Masters

I have a master with 2 touch panels which I've put into a device array to mimic each other, which works properly
dev dvPanels[]= { dvTP1, dvTP2 }

I would like to add a third panel which is on a second master to mimic some of the button presses and feedback.

What is the best way to do this?
I tried this
dvTP1Remote = 10001:1:1 (*Touch Panel Remote Connected to System 1*)
dvTP2Local = 10002:1:0 (*Touch Panel Local Connected to System 3*)
vdvTPx = 33001:1:0

COMBINE_DEVICES(vdvTPx, dvTP1Remote, dvTP2Local)

The secondary master sees the button presses and feedback on the Remote system as well as the virtual device, and also the secondary master and virtual device see the local button presses, but it doesn't appear to be passed from local to remote panels.

How can I achieve this?

Comments

  • Options
    ericmedleyericmedley Posts: 4,177
    What are the system numbers of your two masters?
  • Options
    jabramsonjabramson Posts: 106
    "Local" is 3, "Remote" is 1. I'm trying to get 3 to mimic 1.
  • Options
    ericmedleyericmedley Posts: 4,177
    Try using a dev array instead of combine devices.

    Example
    define_variable
    
    Volatile dev my_TPs[]={
    TP_local,
    TP_remote
    }
    
    

    Then replace the virtual device with my_TPs

    Combine devices doesn't work so well when a device in the combine goes offline or takes a long time to come online. It's really an old Axess command carried over for compatibility.

    I never use it since dev arrays are so much more functional and flexible.
  • Options
    jabramsonjabramson Posts: 106
    I'm somewhat confused. I know how to use the device array when using all panels on the same master.

    However this is a panel connected to a secondary master referencing another master/panel combo.

    How do I get those values to pass from the remote to local system?

    Right now I have this which seems not very efficient
    DEFINE_PROGRAM
    
    FOR (i=1; i<=999; i++)
        {
    	[dvTP2Local,i] = [dvTP1Remote,i]
        }
    

    And then when someone pushes a button on this system, it does a DO_PUSH to the other system.
  • Options
    ericmedleyericmedley Posts: 4,177
    I suppose you'd just reference the virtual device if the other master. But here again, I'd not use the combine device. You're running into one of he difficulties of choosing touse it right now. It's not very flexible.
  • Options
    HedbergHedberg Posts: 671
    Do exactly what Eric suggests and write a button_event just like you do when you have a device array which exists entirely on one master.

    Here is what Eric suggests:
    define_variable
    
    Volatile dev my_TPs[]={
    TP_local,
    TP_remote
    }
    

    Then just write a button event for [my_TPs, nSomeButtonNumber] and do whatever. The button event will be triggered by the press of nSomeButtonNumber on either panel regardless of the master it is connected to. Netlinx doesn't care what master the device is connected to.

    Likewise, feedback can then be sent to [my_TPs, nSomeButtonNumber] and it will affect the button on both panels even though they are connected to different masters because Netlinx doesn't care what master the device is connected to.

    You can create arrays of other devices too. For example, if you have an IR controlled tv on master #1 and another on master #2 you can have:
    define_variable
    
    dev vdvTVs[] = {dvTV_ON_MASTER_1, dvTV_ON_MASTER_2}
    
    
    and then you can pulse, for example, [vdvTVs,9] and it will do them both.

    added:
    When you define your devices you must adhere to the D:P:S scheme. That will allow you to control, or receive events, from a properly defined device no matter which master it is connected to. D:P:0 is shorthand for defining a device which is connected to the master on which the program resides. For example, if your system number is 666, the following are the same:

    dvSomeDevice = 5001:1:0
    dvSomeDevice = 5001:1:666

    that should explain what I mean when I say that Netlinx doesn't care what master a device is connected to.
Sign In or Register to comment.