Home AMX User Forum NetLinx Studio

UR Listing

when setting up an installation with multiple processors, with one master processor (system 1) running code and all other processors (system x) with no code and acting as just extra ports (slave processors), how should the URL listing table be setup?

1. Master processor has IP addresses of all slave processors, and all slave processors have an empty URL table

2. Master processor has empty URL table, and all slave processors have only the IP address of the master processor

3. Is there another way?

ps. I've been using method 1 for a couple of years, but noticed people recommending method 2 on this forum which has worried me.....

Comments

  • ericmedleyericmedley Posts: 4,177
    markbsure wrote: »
    when setting up an installation with multiple processors, with one master processor (system 1) running code and all other processors (system x) with no code and acting as just extra ports (slave processors), how should the URL listing table be setup?

    1. Master processor has IP addresses of all slave processors, and all slave processors have an empty URL table

    2. Master processor has empty URL table, and all slave processors have only the IP address of the master processor

    3. Is there another way?

    ps. I've been using method 1 for a couple of years, but noticed people recommending method 2 on this forum which has worried me.....

    There have been many long and heated discussions on this subject on the forum over the years. The two basic camps are 1) keep all code on one master and use the sub-masters as port expanders and 2) split up the code so to split up the processing jobs amongst the various masters.

    I tend to do both but mostly scenario 1. The bottom line is either method works just fine. The latter makes sense when you design your system as a large group of local systems that only talk to each other occasionally. (whole house functions vs. local functions)

    As to your second question (assuming I'm understanding it correctly) Yes, you will usually see a system designed with one main master that has no other URLs in it. and the sub-masters have only the main URL in them. The communication between masters is implicitly 2-way. So, by making a connection from one master to another, you are marrying both masters together and what happens on one can be seen on the other.

    A common mistake is to think that you need to put the opposite master's URL on all the connected masters. however, you only need to connect all the sub-masters to the main and they can all talk to each other.

    In fact, making a circular URL relationship causes problems of echoed commands jumping all over the system.
  • DHawthorneDHawthorne Posts: 4,584
    I prefer to put the URL of the "main" in each of the slaves. If there is a network issue, I would rather the main unit wasn't bogging itself down trying to connect to a bunch of slaves it can't reach at the moment. The slaves only attempting a single connection each would be less affected, and probably inoperative anyway if the network is down.

    But I do split the code when I can: local devices and their code on the local master. Again, if there is a network failure, I would like the local system to not be completely nonfunctional ... if at all possible.
  • So either method works.

    Method 2 has advantages for the master processor if the network goes down between processors.

    But make sure not to create an IP loop between processors by having the master's IP address in the slave's URL table, and the slave's IP address in the master's table.

    thanks
  • jjamesjjames Posts: 2,908
    Well, I just finished (well, it'll be ALWAYS going on) a job that has 8 masters. I did program it to have all code reside in master 1, except for the lighting control - which I have doing on another master. Other than that, they just acted as slaves. I used a cascading style URL listing. I had at one point all of the entries listed in the main master. The thing that bothered me was that the main master was connecting to the others. So now the main master is trying to create and maintain a connection to 7 other masters, on top of doing its start-up code, and maintaining connections with ISCNet devices, touch panels, R4s / Gateways, etc. A "system ready" time from reboot would be about 6-7 minutes. I could go out for a smoke, and come back and it was JUST saying it was ready.

    I reversed the cascade (8 has 7,6,5,4,3,2,1 in its list; 7 had 6,5,4,3,2,1 in its list, etc. etc.) I know it's still maintaining connections, but the other way around (at least that's the way I saw it.) I also removed any modules running on the main master and put them on the local masters. After all was said and done - I cut down the boot-up time to about 2-3 minutes. I could probably cut this down even more because I do have a delay as to when the system is truly ready (I check to see if the master is connected to all other masters, and all COM2, IRS4, Remotes & Panels are online - I eventually do a forced ready event even if something like a panel is offline after x number of seconds.)

    After defining the modules on the local masters, I did notice a CPU Usage decrease (only to realize now that it's not a proper way to measure things.) Regardless, I feel I've streamlined things by reversing the cascade, and offloading the modules.

    Do NOT forget about the importance and use of the route mode of M2M. With a cascading URL list, you'll want to use Direct instead of Normal (default.)
  • What happens IF the "main" doesn't have anything in the URL list, AND the slaves have just the "main's" IP address in their table, AND the slaves need to talk to each other (or at least one or two do).

    And yes, my code is as convoluted as that question, although with fewer conditionals.
  • jjamesjjames Posts: 2,908
    It depends how you set up your topology. I'd go with the cascade. Let's just show 4 masters

    Master 1 (Main) - 192.168.1.91
    -- NO URLs --

    Master 2 (Slave) - 192.168.1.92
    -- 192.168.1.91

    Master 3 (Slave) - 192.168.1.93
    -- 192.168.1.92
    -- 192.168.1.91

    Master 4 (Slave) - 192.168.1.94
    -- 192.168.1.93
    -- 192.168.1.92
    -- 192.168.1.91

    Above, all masters should communicate to each other in route mode "Direct". (See command "route mode" with options "direct" and "normal" (default.) You're not relying upon other masters for a message to get from Point A to Point B; so if one master goes down, messages are still passed. If Masters 2 and 4 do not need to talk to Master 1, remove 192.168.1.91 on the respective masters.

    Refer to technote 919. IMHO, it's a great explanation of M2M.
  • Awesome, thank you. Funny enough I was troubleshooting some M2M communication just last week, and tech support had me juggle the URL listings. Historically I've just been putting all the slave URLs into the main and leave the slaves empty, but I think I'll be reevaluating that now.
  • jjamesjjames Posts: 2,908
    Well, if you put all the listing in the main, when master 2 needs to talk to master 4, it needs to go through master 1.

    Like I posted earlier, in system with more than 2 masters, I'd go with the cascading topology, leaving the "Main" master with no entries to streamline the startup process. When you have multiple masters, I for now on will be trying to distribute the load of the code equally (at least having masters handle local devices.

    The next question would be - where do you define your UI code and what happens when that master goes down? Oh the many things to think of. :)
  • That's exactly how I've been working Jeff.

    I've been experiencing some problems on my current project, where RS232 received strings on a slave processor aren't getting back to my master processor. If I connect directly to the Slave processor I can see the strings coming in, when connected to the Master I cannot. My modules linked to these slave RS232 ports all run on the Master processor and so don't work correctly when they don't see the received strings.
    All other control over the slave processor was fine though.....

    A quick fix was to reboot the power on the slave processor.

    I've changed the URL listings on all processors and will see if this fixes it. Will have to wait a day or two to see if the problem arises again..
  • markbsure wrote: »
    I've changed the URL listings on all processors and will see if this fixes it. Will have to wait a day or two to see if the problem arises again..

    I'm doing the same thing. No calls so far, bit of course now I'm wondering how lucky I've been getting until now, and that maybe random power failures have been preventing issues on all my multi-master jobs....

    As for my UI code, I always split it up so that local masters are running the code specific to that room. We do mostly resi, so the theatre NI will have the theatre programming in it, etc.
Sign In or Register to comment.