Home AMX User Forum AMX General Discussion

M2M Communication

I have two touch panels that I want to be controlled by a touch panel. I tried setting up M2M by adding system 2's URL to system 1 but I'm not getting it to work. I did load code onto the second system thinking I needed to. Any suggestions would help, thanks.

Comments

  • Download the AMX technote TN919. It has a good discussion of M2M.
  • trobertstroberts Posts: 228
    I have two touch panels that I want to be controlled by a touch panel. .

    I assume you mean you have two masters not two panels???
    Make sure both panels are defined in both masters. Be sure to define system number for each panels device def to which they are connected to
    There are many other threads on this topic, you can probably find your answer on one of them, but yes TN919 is the best explanation.
  • troberts wrote: »
    I assume you mean you have two masters not two panels???
    Make sure both panels are defined in both masters. Be sure to define system number for each panels device def to which they are connected to
    There are many other threads on this topic, you can probably find your answer on one of them, but yes TN919 is the best explanation.

    Yes two masters sorry. What do you mean both panels defined in both masters? Are you talking about in the netlinx code? Because from reading the TN919 it says to put an empty .tkn file into the master being controlled by the main one.

    So I have follwed the technote and added the second master in the URL list of the first master. I have loaded an empty .tkn file into the secon master. However, I am still not able to control the device on the second master. When I refresh the online tree should I see only the first master or should I see the second master as well? Not sure what else I need to do.
  • GregGGregG Posts: 251
    You should try listing the devices in the "empty" code's define device section which it will be sharing out to the main master. Basically just compile a new code file with only local devices listed. This has helped me in the past.
  • Also, would it matter that I am using an NI-3100 for system 1 and an NI-3000 for system 2?
  • GregG wrote: »
    You should try listing the devices in the "empty" code's define device section which it will be sharing out to the main master. Basically just compile a new code file with only local devices listed. This has helped me in the past.

    So would I only device the devices on my system 2 master in my "empty" code file or are you saying define them in both masters?
  • GregGGregG Posts: 251
    I have mixed and matched almost every combination of netlinx master in M2M.

    Do make sure they have newish firmware (at least the last of the 3.x series) - just in case.

    Also, if you are controlling the second master's devices through a module, the virtual device for that module has to be in the same master that the module definition line resides.

    You have to define them in both masters like:

    Main master code (System 1 here):
    DEFINE_DEVICE
    
    dvMyNI_Serial1 = 5001:1:1
    dvOtherNI_Serial1 = 5001:1:2
    
    DEFINE_EVENT
    
    Data_Event[dvMyNI_Serial1]
    {... set baud, etc}
    Data_Event[dvOtherNI_Serial1]
    {... set baud, etc}
    
    Secondary master code (System 2 here):
    DEFINE_DEVICE
    
    dvSerial1 = 5001:1:2
    
  • jjamesjjames Posts: 2,908
    If you have master 1 with a module loaded for a device on master 2, that's bad. It's highly recommended to load the module on the master with the device, and write a pipe that goes from one master to another for only when you need to notify the other master of events.
  • DarksideDarkside Posts: 345
    jjames wrote: »
    If you have master 1 with a module loaded for a device on master 2, that's bad. It's highly recommended to load the module on the master with the device, and write a pipe that goes from one master to another for only when you need to notify the other master of events.
    So if I have a 4100 as the master and a dgx 16 simply as a device, it is recommended that I should load my 16x16 module on the dgx and pass commands to the dgx or is this a different context?
  • jjamesjjames Posts: 2,908
    So if I have a 4100 as the master and a dgx 16 simply as a device, it is recommended that I should load my 16x16 module on the dgx and pass commands to the dgx or is this a different context?
    Right - same deal.

    In the case of the DGX, I typically suggest putting all of the main code on another master, such as your 4100. On top of that, since the DGX passes the network activity of each DXLink box, I recommend having the DXLink units point to the main master - if you have it point to the DGX and the main master needs to talk to them, that's just more traffic both masters have to deal with and listen for. Lastly, I suggest that the DGX have the URL listing. The 4100 will be busy handling all the other connections of panels, DXLink boxes, etc., so let's not tax it more by making it look for other masters; not that it couldn't handle it, but maximizing the least amount of work done at any given time is essential in any system.

    The key to a smooth M2M setup is having the masters only listen for what they need and nothing more. Using telnet commands such as show route /v, show remote, show notify, show route and show url will provide useful in formation, such as how many hops it takes to get to another master - try to keep it as low as possible. When you start growing into larger M2M systems, there can be a lot of data going back and forth; compound this with just extra network traffic and things can get a little crazy! Again, not that the masters can't handle it, but as with any network device, it's good to keep traffic low.
  • DarksideDarkside Posts: 345
    Thanks very much for the reply jjames...
Sign In or Register to comment.