Home AMX User Forum AMX Control Products
Options

One touchpanel, two masters....how to dynamically connect to the touchpanel

Hello,

I have a question. I hope someone can help me on this.
A client wants a fail save system.
His idea is to have 2 NI netlinx masters with several devices connected to them using ethernet.
When one of the masters would fail, the other should take over.
I know i can use master2master communications to determine if a master is online or not.
But how can i dynamically take over communication with a touchpanel if one of the masters would fail?

In other words, how can i dynamically, at will, connect a master to a touchpanel, providing all are on the same ethernet network?

Comments

  • Options
    jjamesjjames Posts: 2,908
    If the panel is left to "Auto" (I believe that's the setting?) in the settings for how / where / which master to connect to, shouldn't it just connect to the next master available? I would imagine you'd just need to keep track of which master the panel has selected.

    I don't believe it's possible for a master to select a panel; it's the other way around.
  • Options
    jjames wrote: »
    If the panel is left to "Auto" (I believe that's the setting?) in the settings for how / where / which master to connect to, shouldn't it just connect to the next master available? I would imagine you'd just need to keep track of which master the panel has selected.

    I don't believe it's possible for a master to select a panel; it's the other way around.

    Yes, auto mode with a system number of 0 will make the panel use the first master it finds. If the connection is lost, the panel will return to searching for a new master.

    The downside of this is that you can't control which master the panel will connect to if both masters are up and running. It will connect to the first one it finds.
  • Options
    jjamesjjames Posts: 2,908
    rhargrave wrote: »
    The downside of this is that you can't control which master the panel will connect to if both masters are up and running. It will connect to the first one it finds.
    Generally a downside - unless you program it so the system operates only (if that's the only panel) when it sees that panel, or of course you can make everything dynamic, a bit more involved but very doable.

    If the code is identical, I don't see a problem anyway. It's not like the BUTTON_EVENTs will fire if the panel is not connected.
  • Options
    ColzieColzie Posts: 470
    You could monitor the TP's online/offline events. When one master sees the panel, turn on an I/O port or a Relay as a visual indicator of which Master is currently being used. Turn it off when the panel goes offline.
  • Options
    PhreaKPhreaK Posts: 966
    To take it a step further you could combine the panel connectivity status with a negotiation over m2m if neither master can find the panel. That way if the panel is down or removed etc the systems can negotiate which should be in control and allow any background guff to keep functioning.
  • Options
    freijnenfreijnen Posts: 18
    Thanx for all your answers.

    But i have already found a solution.

    I set the touchpanel to mode listen.
    Then, i set on the master the ip of the touchpanel inside the URL list.
    Futher, i'll use M2M communication to implement a watchdog function for the backup to see if the master is online.
    At the moment the watchdog goes down (and the master is dead) the backup will load the ip of the touchpanel in its URL list so the touchpanel will automatically connects to the backup.
    As soon as the master is online again the URL can be deleted out of the URL list on the backup.
    Therefor losing connection with the touchpanel so it can connect to the master again.

    I have done some testing with connecting a touchpanel in mode listen to a master and this seems to work ok. Now i have to wait for the hardware to arrive to do a full blown test.
  • Options
    Jimweir192Jimweir192 Posts: 502
    The URL list is only for M2M, so should only contain the IP address of another Master, if you put a TP address in there you will get constant connection errors I suspect.

    Listen mode on the TP only allows a single IP address.

    If you wanted to follow this route, you'd need to set both masters to the same IP address and trigger a system to detect when to power up master #2 when master #1 fails. you can get power adapters that can ping to detect connectivity of a device.

    Another way of looking at this would be to use a dns name with the TP in Listen mode and then modify the dns lookup table to switch between masters IP's.
  • Options
    freijnenfreijnen Posts: 18
    Hello Jim

    I did the following test.
    I only have one NI controller at my disposal at the moment so beare with me.

    I set a touchpanel to mode listen. Both the touchpanel and the controller have a unique fixed ip address.
    In the startup section of the code for the controller a added the ip of the touchpanel to the URL list.
    The controller starts up and i have connection with the touchpanel.

    Next: i use netlinx studio to change the IP of the controller and i change the system number.
    Then i do a reboot of the controller. I didn't change the code, so at startup the IP of the touchpanel is added to the URL list.
    I see on the touchpanel that the connection is lost when i do the reboot (ofcourse) but the connection is restored when the controller is back online, despite the different IP and system number.

    It appears that indeed only one ip address is possible at a time for a touchpanel in listen mode. But when that connection is lost the touchpanel can accept another ip from another master for a new connection.

    I think this proves this setup most work for the situation i describe. But unfortunelaty i don't have the hardware yet to do a full blown test.
  • Options
    Not to interfere... Any argument against using a telnet session from the "one master taking over" to the panel and using the "set connection" command to change the URL to the new one?

    Of course, this, once established that the other master has gone down.
  • Options
    Jimweir192Jimweir192 Posts: 502
    Sorry you are correct. I'd forgotten the listen feature with TP's uses the URL list, but having looked at some documentation on this you are correct.

    Running a quick test with 2 masters this does appear to work as you intended switching between the masters - at least the TP indicates this. Remember that the URL list is persistent and once added you need to specifically remove the address otherwise both masters will be sending the connection message at similar intervals.... and that might lead to unexpected results.

    Let us know how you get on once you test this fully.
  • Options
    freijnenfreijnen Posts: 18
    Hello,

    Finally i have the hardware to do a test.
    And it seems to work just fine!

    I use M2M communication for a watchdog connection from the master to the backup system.
    If the backup doesn't receive the watchdog message for a specified time
    it fills it's URL list with all the connected devices.
    Then it automatically connects to all those devices.
    As soon as the master is online again and sends a watchdog message, the backup system deletes it's URL list.
    Then the master is free to connect again to all online devices.
    This seems to work nicely with touchpanels.
    It works so well that the backup system takes over when i reboot the master (for reprogramming) . And the master takes back control once it's online again. It takes less then one minute for all devices to come online on the backup system when the master shuts down.

    Allthough i still have a problem. I also have a UDM-0808 in the system, and this device doesn't seem to connect using the listen mode
Sign In or Register to comment.