M2m
Thomas Hayes
Posts: 1,164
Hi all
I was wondering if AMX has any sample programs about setting up a M2M system and how to go about doing it? I've never done this before and am not sure where to get the info from. Any help would be appreciated.
I was wondering if AMX has any sample programs about setting up a M2M system and how to go about doing it? I've never done this before and am not sure where to get the info from. Any help would be appreciated.
0
Comments
Try Tech Notes 532 (A Practical Explanation of Master-to-Master) and 401 (What is a URL List and what can it do for me)
Depending on your application it may be much easier than you think. To control a device on another master you don't really need to add a lot of code.
1. Make sure the masters have different System numbers (eg 111,112)
2. Make sure they are on the same network and have IPs that can access eachother, this can be through a gateway or on the same subnet (eg 192.168.1.111,192.168.1.112)
3. Add the IP address of one of the masters to the other's URL list (eg Add 192.168.1.112 to system 111's URL list
4. Define a device using the System number from the other master (eg 5001:3:112)
5. Program it as you would any other device
Of course there can be conflicts when having two programs trying to control a single device, so be careful how you write it. If one master is telling a relay to keep turning on each time through mainline and the other is telling it to turn off you will have problems. (I hope you do not have statements like that in your DEFINE_PROGRAM, but I wanted to use a simple example)
If you really only have one running "System" and the second master is really for adding ports you do not even have to write a program for the second master. Define the system number and devices as I said above then program it the same way as you would a slaved Axcent 3 or a card frame.
I believe there was another thread that discussed passing information back and forth between masters, I will find it and link it here.
[thread=3419]Found it[/thread]
I'm assuming you'd do your page flip somewhere that makes more sense than define_program, but this was the easy and quick
Thats really all you should have to do to control that touchpanel. If that doesn't work, the problem isn't your code. Does the second room's touchpanel work in the second room?
J
Basically, just track the room status in nRoomCombined, and then send commands to the device array to control both if you want, or send them to part of the array when you dont. I'm using get_last here to determine which panel the command came from and only control the screen in the room that was doing that.
J
Setup you system numbers and URL list as usual.
I think there?s 2 ways to code a combinable 2 processor system.
Option 1: Create one program that uses the secondary master just for it?s ports.
Option 2: Create 2 smaller programs that work in unison. Using channel events on a virtual device to talk between systems. This way if one processor goes down your other room will still work.
I've done it both ways and it just boils down to the complexity of the rooms. If you have a combinable room where each room is identical in control, the 2 program approach may be an option. This method also comes in handy where you have a massive network of Masters that all talk to each other. You wouldn?t want 1 master to control 75 master with on huge program.
MAIN Room Code:
SECONDARY Room Code: