Home AMX User Forum NetLinx Studio

Master to Master communication

bobbob Posts: 296
Hi there,

I am preparing a housewide install and would like to use one NI-700 or NI-900 in each of the rooms and have a "master" controll controlling all of them. How difficult would be to implement the master to master communication or should I extend the bus and have all bus devices on the same bus controlled by the same master? There are all kind of devices like Lutron lightning, RS232, Relais, A/V, etc, etc

PS: I have never done master to master programming so that I would need some advice. Thanks much for your suggestions.

Comments

  • kbeattyAMXkbeattyAMX Posts: 358
    Master to Master control is kind of misleading. When you connect a master to another master through the URL listing under diagnostics the ports on the remote master are now available to the local master as if they were built into the local master.

    Local master is defined as System 0 in the Device:Port:System
    The remote masters is communicated with by using it's system number. So System number 25 is defined in the local master as Device:Port:25. Then program like it's local to the system.

    Local System 5001:1:0
    Remote System 25 5001:1:25

    These 2 addresses address serial port 1 on the local system and port 1 on the remote system. I hope this helps.

    Keep in mind that all of the masters must have unique system numbers and do not put a masters IP address in it's own URL List. For your system I would suggest a single hop setup. In other words all of the connections would reside in one master unless you want to distribute processing between Masters.
  • bobbob Posts: 296
    kbeattyAMX wrote: »
    Master to Master control is kind of misleading. When you connect a master to another master through the URL listing under diagnostics the ports on the remote master are now available to the local master as if they were built into the local master.
    Excellent, this is kind of what I was hoping to hear! With other words I am using Ethernet to extend the Axlink bus.
    kbeattyAMX wrote: »
    For your system I would suggest a single hop setup. In other words all of the connections would reside in one master unless you want to distribute processing between Masters.
    How does this distribution work? You mean like processing lokal RS232 devices instead in the master-master, they can be processed in the remote-master on its own?! This will probably only complicate things in my case. Is there any difference with processing speed between a NXI-900, 2000, 3000, 3100 or the ME-260/64 or which one should I choose as a master-master?

    Thanks again!
  • ericmedleyericmedley Posts: 4,177
    Bob,

    There are quite a few threads on the forum dealing with Master to Master comm (or M2M)

    A lot of issues that commonly come up are covered by them. Just do a search for m2m and you'll find a whole bunch of helpful info.

    The basic answers to your questions are yes, that's a good thing to do.

    To setup M2M you go into the URL settings of your sub-masters (the ni700s) and put in the IP address of the main master. A common mistake in this step is the programmer will also put in the sub-masters' IP addresses in the URL list of the main master. This mistake is easily understood since one would think you'd normally do this to establish 2-way communication. However, the act of connecting one master to the other establishes 2-way comm by defenition. If you do make the mistake you'll notice very flaky behavior. (double button hits, double string/command messages, etc...)

    Another common mistake is not properly addressing the system number of each master. The default sys number of a master is 1 out of the box. You'll need to make sure all your masters have unique sys numbers.

    Once this M2M network is setup, you're ready to go.

    There is much debate on this forum as to how to handle multi-mastered systems.

    the two basic camps are 1) split up your code between masters and essentiall keep local systems local nad global systems on the main master and 2) put all the code in one master and essentially use the sub-masters as gazinta/gazouta extenders. (need more rs-232 ports in a room, need more IR in a room, etc..)

    You can read about this debate by searching the forums.

    Also, another set of issues is how does one get information such as varialbe values and whatnot form one master to another. That too is covered in many threads.

    Hope all this helps.

    eric
  • Spire_JeffSpire_Jeff Posts: 1,917
    Master to master is probably easier than you are making it out in your mind, but there are a few little quirks that can pop up. The biggest problem that I have encountered is making sure devices that are shared are defined on both processors. As Ken was saying, just give each processor a unique system number and then use that system number in the device definition. I would recommend starting with one device. Get that configured and running on a separate processor and post any problems you come across as you encounter them. I'm sure someone here will be able to give you the pointers to get past the problem (if one even comes up). After you do it once, the rest should be easy.

    I would recommend running the comm module on the processor that the device is physically attached to. You can then decide if you want to run UI code there as well, or just keep all of the UI code on the main processor.

    Jeff
  • Spire_JeffSpire_Jeff Posts: 1,917
    bob wrote: »
    Is there any difference with processing speed between a NXI-900, 2000, 3000, 3100 or the ME-260/64 or which one should I choose as a master-master?

    Given the list, I would choose the NI-3100 as the master. It is definitely a faster processor than the 2000, 3000 and ME-260 (I think). There is a chance the NX-900 is the same processor and memory as the 3100, but given the other processors you listed, I am guessing it is an older processor.

    Jeff
  • kbeattyAMXkbeattyAMX Posts: 358
    bob wrote: »
    Excellent, this is kind of what I was hoping to hear! With other words I am using Ethernet to extend the Axlink bus.

    How does this distribution work? You mean like processing lokal RS232 devices instead in the master-master, they can be processed in the remote-master on its own?! This will probably only complicate things in my case. Is there any difference with processing speed between a NXI-900, 2000, 3000, 3100 or the ME-260/64 or which one should I choose as a master-master?

    Thanks again!

    Ethernet is a heck of a lot faster than Axlink! I've run large systems for the NY Public Library where processing for the locally attached devices are processed locally. Information relevant to the whole system is sent to a local virtual device and that device is monitored by the Main System. We had tons of PClink devices that chewed up tons of processing when a lot of them came online. So different processors handled different PClink devices.
  • Best resource which explains Master-to-Master concept is https://help.harmanpro.com/Documents/2337/919-Master-to-Master unveiled.pdf

Sign In or Register to comment.