Home AMX User Forum AMX General Discussion

M2M First Time - Need some Pointers

This is the first time I have to program a Master-2-Master. I was wondering if there are any guides on some basic netlinx code.

The questions I have:

1. How do I define the two masters
2. I am only using the second master to control a TV via IR in a remote room. Do i need to create a second project.
3. Does anyone have a workspace with some basic M2M that they could share.

Comments

  • ericmedleyericmedley Posts: 4,177
    Make sure your system numbers are set differently. (First master :system 1. Second master: system 2 for example)

    Put the URL (IP address of the main master ) into the URL list of the subordinate master. Do not put the sub master IP in the main masters URL list. The communication is already bi-directional with the one link.

    That will start the m2m communication

    In code: to address and use the devices on the sub master just declare a device with the sub master system number.
    DEFINE_DEVICE
    
    dvSerial_Master_1 = 5001: 01: 01
    
    dvSerial_Master_2 = 5001: 01: 02
    

    Sending a string from code in master one to dvSerial_Master_2 will send it out port 1 on master 2
  • DHawthorneDHawthorne Posts: 4,584
    Be careful not to create a connection loop. If master 1 connects to 2, and 2 connects to 3, DO NOT connect 3 to 1, or the whole thing will crash and burn. Be very careful none of your routes have any chance of looping like that. I typically pick one master to be the "central," then have everything connect to that master in their individual URL lists. If the network is really big, you can spread it out by having half (or whatever) connect to one, and the rest to the other, then have ONE of those connect to the other as well.
  • Spire_JeffSpire_Jeff Posts: 1,917
    I am not sure if it is still needed, but I seem to recall needing a program with at least one non-volatile variable declared in the subordinate master. This is important if you don't plan on adding any code to the secondary master. Altho, if that is the case, you might want to consider an ICSLan device for the remote location.
  • a_riot42a_riot42 Posts: 1,624
    There are no pointers in Netlinx, just references.
    Paul
Sign In or Register to comment.