Home AMX User Forum AMX Technical Discussion

Simple Master to Master Question

I currently have a M2M system working just fine, but I had to write a bunch of code to get it to do what I wanted when I was hopeing to do something very simple. Here's the deal:

System 1 needed to control a Biamp Audia unit in system 2. Systems 1&2 are controlling their local Audias via identical code in their respective systems.
I already had TP arrays in both systems. The TPs are using ports 1 & 2.
I made the TP page in system 1 that would control the system 2 Audia, port 3 and put that device in the TP array of system 2. I thought this would make all of the channels generated by port 3 in the TP array of system 2 drive the Audia code in system 2. It did not. Why?

I ended up making a "duplicate" of all my Audia code in system 1 to respond only to port 3 and drive the Audia 232 port in system 2.

Comments

  • a_riot42a_riot42 Posts: 1,624
    drplaid wrote: »
    I currently have a M2M system working just fine, but I had to write a bunch of code to get it to do what I wanted when I was hopeing to do something very simple. Here's the deal:

    System 1 needed to control a Biamp Audia unit in system 2. Systems 1&2 are controlling their local Audias via identical code in their respective systems.
    I already had TP arrays in both systems. The TPs are using ports 1 & 2.
    I made the TP page in system 1 that would control the system 2 Audia, port 3 and put that device in the TP array of system 2. I thought this would make all of the channels generated by port 3 in the TP array of system 2 drive the Audia code in system 2. It did not. Why?

    I ended up making a "duplicate" of all my Audia code in system 1 to respond only to port 3 and drive the Audia 232 port in system 2.

    Are all touch panels and virtual devices defined on both masters?
    Paul
  • Yes they are. (By the way, I would have called AMX tech support about this but the company I work for can't or won't pay the "tech support fee")

    To cut to the chase, my experience leads me to believe that in order to control something in a remote system; you have to have the control code in the local system driving the device port in the remote system.

    I'm not sure this is true. I SHOULD have been able to add the device number of my local TP to the TP array of the remote system and the remote system should have accepted its pushes to control the local device with the local code. Is this right?

    Thank you a_riot42 for replying with a question, but please don't just ask me another yes or no question or this will go on for quite a while.

    Which of my above conclusions is true?
  • Yes they are. (By the way, I would have called AMX tech support about this but the company I work for can't or won't pay the "tech support fee")

    To cut to the chase, my experience leads me to believe that in order to control something in a remote system; you have to have the control code in the local system driving the device port in the remote system.

    I'm not sure this is true. I SHOULD have been able to add the device number of my local TP to the TP array of the remote system and the remote system should have accepted its pushes to control the local device with the local code. Is this right?

    Thank you a_riot42 for replying with a question, but please don't just ask me another yes or no question or this will go on for quite a while.

    Which of my above conclusions is true?
  • viningvining Posts: 4,368
    Show your system 1 & 2 DEFINE_DEVICES. Some event code snippets would help too. My gut instinct is your not using D:P:1 or D:P:2 where necassary but with out definitions & code snippets who knows.
    I currently have a M2M system working just fine, but I had to write a bunch of code to get it to do what I wanted when I was hopeing to do something very simple. Here's the deal:
    How do you now it's working if your simple M2M code isn't? URL entry in master 1 of master 2?
  • HedbergHedberg Posts: 671
    ok, best I an tell from your description, you have two systems, 1 and 2 and you want to control something on system 2 from system 1. You have two identical TPs, one on 1 and the other on 2. On system 2 you define something like:
    define_device
    
    dvBiamp = 5001:1:0
    
    dvtp_local_biamp_1 = 10001:1:0
    dvtp_local_biamp_2 = 10001:2:0
    dvtp_remote_biamp = 10001:3:1
    
    define_variable
    
    constant dev vdvTP_Biamp[] = {dvtp_local_biamp_1,dvtp_local_biamp_2,dvtp_remote_biamp}
    integer nBiampButtonArray[] = {some button array}
    
    define_event[vdvTP_Biamp,nBiampButtonArray]
    {
      push:
      {
        do_something(dvBiamp )
       }
    }
    

    then, button presses on the tp connected to system 1 will trigger events on system 2.

    That's how I've done it, anyway.

    edit:

    I believe that it is absolutely necessary to make the definition in the define_device section of system 2. This, for example, won't work:
    define_variable
    
    dev dvtp_remote_biamp = 10001:3:1
    
    constant dev vdvTP_Biamp[] = {constant dev vdvTP_Biamp[] = {dvtp_local_biamp_1,dvtp_local_biamp_2,dvtp_remote_biamp}
    

    that's my recollection
  • ericmedleyericmedley Posts: 4,177
    It s not true that you have to have code on the attendant master to run on attached devices. I have systems with 5 and 6 netlinx masters and all the code resides on one master.

    It's probably just some goofiness in your device addresses.
  • HedbergHedberg Posts: 671
    ericmedley wrote: »
    It s not true that you have to have code on the attendant master to run on attached devices. I have systems with 5 and 6 netlinx masters and all the code resides on one master.

    This is correct. If you want to control a device on a master using a touch panel which is associated with another master, there are at least two ways to organize it.

    Assume you have master 1 and 2 with tp on device 1 and controlled device on 2. You can:

    1. in the code for master 2 define the tp which is connected to master 1. Program button events (or whatever) on master 2. Master 2 will respond just as if the tp, which is physically connected to master 1, were connected to master 2. No code is necessary on master 1 to implement this.


    2. In the code for master 1 define the device on master 2 that you desire to control from master 1. Button events (or whatever) occurring on master 1 can now address the device on master 2 as if it were attached to master 1. No code is necessary on master 2 to implement this. This is the what, I believe, Eric is talking about. The second master is being used just as a box of ports and doesn't need to have any code on it at all though I suppose there might be some data_events for configuration.
  • viningvining Posts: 4,368
    Hedberg wrote: »
    2. In the code for master 1 define the device on master 2 that you desire to control from master 1. Button events (or whatever) occurring on master 1 can now address the device on master 2 as if it were attached to master 1. No code is necessary on master 2 to implement this. This is the what, I believe, Eric is talking about. The second master is being used just as a box of ports and doesn't need to have any code on it at all though I suppose there might be some data_events for configuration.
    I often wonder why we just don't have a simple black box with device ports for this. Basically a master w/o the abiltiy to define anything other that it's system number (address) and its IP address to act a simple IP to serial/IR/IO/relay server. It seems masters are often used this way for nothing other than their device ports. It would have to be cheaper. Give masters that run code more balls and give basic device ports servers just the ability to serve their connected devices.
  • banobano Posts: 173
    vining wrote: »
    I often wonder why we just don't have a simple black box with device ports for this. Basically a master w/o the abiltiy to define anything other that it's system number (address) and its IP address to act a simple IP to serial/IR/IO/relay server. It seems masters are often used this way for nothing other than their device ports. It would have to be cheaper. Give masters that run code more balls and give basic device ports servers just the ability to serve their connected devices.

    I find that the Accent3 serves as a simple black box, and they're usually available on ebay for around $50.
  • From Hedberg: "1. in the code for master 2 define the tp which is connected to master 1. Program button events (or whatever) on master 2. Master 2 will respond just as if the tp, which is physically connected to master 1, were connected to master 2. No code is necessary on master 1 to implement this."

    What Hedburg describes above is what I was expecting to work, but didn't. There is working Biamp code on both masters that respond to their respective tps. Here are the direct code snips:

    System 1
    DEFINE_DEVICE
    dvTP_PETE1 = 10002:1:1; // NXD-1000i 192.168.1.102
    dvTP_PETE2 = 10002:2:1; // NXD-1000i
    dvTP_PETE3 = 10002:3:1; // NXD-1000i This is the key panel we are talking about
    dvAUDIA = 5001:02:1; // 232 PORT 2 LOCAL AUDIA SYSTEM
    dvAUDIA_PLAZA = 5001:02:2; // 232 PORT 2 AUDIA SYSTEM IN PLAZA


    System 2
    DEFINE_DEVICE
    //TOUCH-PANEL AT FRONT DESK
    dvTP_FRONT_DESK = 10001:1:2; // NXT-CV10 PORT 1
    dvTP_FRONT_DESK2 = 10001:2:2; // NXT-CV10 PORT 2

    //TOUCH-PANEL AT HOSTESS STAND
    dvTP_HOSTESS = 10002:1:2; // NXT-CV7 PORT 1
    dvTP_HOSTESS2 = 10002:2:2; // NXT-CV7 PORT 2

    //TOUCH-PANEL IN PETES OFFICE
    dvTP_PETE3 = 10002:3:1; // PETE'S PANEL IN SYSTEM 1

    dvAUDIA_PLAZA = 5001:01:2; // LOCAL BIAMP IN SYSTEM 2

    DEFINE_CONSTANT

    // MAIN TOUCHPANELS
    DEV vdvTP_1[]=
    {
    dvTP_FRONT_DESK,
    dvTP_HOSTESS,
    dvTP_PETE3
    }

    This DEV array in system 2 should have caught all the pushes from the "PETE3" panel in system 1 and driven the Biamp in system 2. It works for the "FRONT_DESK" and "HOSTESS" panels.

    By the way, the only reason "AUDIA_PLAZA" is currently defined in system 1 is for the current code to work as I described in the original post.

    Any ideas why this didn't work?
  • TurnipTruckTurnipTruck Posts: 1,485
    bano wrote: »
    I find that the Accent3 serves as a simple black box, and they're usually available on ebay for around $50.

    I have used my share of Axcent 3s for adding ports. Be careful with them as their serial ports have small buffers. Devices that speak in long strings will have their messages truncated through Axcent 3s (and Axcess serial cards in frames)
  • ericmedleyericmedley Posts: 4,177
    bano wrote: »
    I find that the Accent3 serves as a simple black box, and they're usually available on ebay for around $50.

    My entire house is done with the old AxLink card frame, several AXB-whatevers and a single NXC-ME260 master. It works beautifully.
  • a_riot42a_riot42 Posts: 1,624
    drplaid wrote: »
    System 1
    DEFINE_DEVICE
    dvTP_PETE1 = 10002:1:1; // NXD-1000i 192.168.1.102
    dvTP_PETE2 = 10002:2:1; // NXD-1000i
    dvTP_PETE3 = 10002:3:1; // NXD-1000i This is the key panel we are talking about
    dvAUDIA = 5001:02:1; // 232 PORT 2 LOCAL AUDIA SYSTEM
    dvAUDIA_PLAZA = 5001:02:2; // 232 PORT 2 AUDIA SYSTEM IN PLAZA


    System 2
    DEFINE_DEVICE
    //TOUCH-PANEL AT HOSTESS STAND
    dvTP_HOSTESS = 10002:1:2; // NXT-CV7 PORT 1
    dvTP_HOSTESS2 = 10002:2:2; // NXT-CV7 PORT 2

    //TOUCH-PANEL IN PETES OFFICE
    dvTP_PETE3 = 10002:3:1; // PETE'S PANEL IN SYSTEM 1

    dvAUDIA_PLAZA = 5001:01:2; // LOCAL BIAMP IN SYSTEM 2


    Any ideas why this didn't work?

    You have two different panels, PETE and HOSTESS addressed the with the same device ID. That isn't going to work even with one master, never mind two. This is why its always a good idea to post your code. That way, obvious errors are caught quickly without wasting everyone's time and effort.
    Paul
  • viningvining Posts: 4,368
    I don't have a problem with the DEV.NUMBERs being the same in both masters since they are differentiated by the DEV.SYSTEM numbers. That's like saying if you're using DEV 5001 on system 1 you can't use DEV 5001 on system 2.

    If I want to send a string out system's 1 serial port 1 I send to 5001:1:1 and likewise to send out system 2's serial port 1 I'll send to 5001:1:2. To do that as discussed nothing has to be defined in either system as long as the URL entry is made.

    The only thing I would say about PETE3 is the port number.
    It works for the "FRONT_DESK" and "HOSTESS" panels.
    HOSTESS & FRONT_DESK are working the BiAmP on port 1 yet PETE3 is on port 3. You should try putting PETE1 into system 2. Of course if the TPs BiAmp interface on PETE3 is actually all set up for port 3 it should work but that would mean you made the same gui page using port 1 & 3 for the differrent TPs.

    Check your TPs and make sure they are set to communicate to the correct master.
    Check the URL entry and make sure one (only one) master has the other master in its list.
    Check your TP interface for the BiAmp and verify the port it uses match your TPs DPS in the DEV EVENT, especially PETE3.
  • a_riot42a_riot42 Posts: 1,624
    vining wrote: »
    I don't have a problem with the DEV.NUMBERs being the same in both masters since they are differentiated by the DEV.SYSTEM numbers.

    You're right, I read it wrong. I always use the 10001:1:0 nomenclature for local devices to avoid confusion in M2M systems and highly recommend it. I'm not getting the 5001:02:1 nomenclature though, when the touch panels aren't defined similarly.
    Paul
Sign In or Register to comment.