Redundant GW and redundant PLC with kepserver - failover opc

I have a redundant gateway with kepserver for redundant PLC communication.
My GW are in Master-Warm Backup mode, so both kepserver are pooling PLC for data acquisition.

Is there a way to have GW in Master-Warm Backup mode, but with backup node allways taking data from master if available ?
To achieve that, I think that we can put the backup node OPC connection seeting to the kepserver of the master node.
The drawback is that we can’t force the failover mode of the opc connection to go to the master node if it is avaliable…

:scratch: Any idea of experience with that : redundant GW and redundant PLC ? (with kep server opc server)


Kepware have a redundancy product that you may want to look at.

Alternatively you could turn of the enabled flag on each device on the secondary OPC when it’s not needed using a bit of scripting. This would be useful for me, I’m just doing a redundant system with kepware and so I’ll spend a couple of hours on Monday and try it out.

If the OPC servers are on the local machines then switching OPC servers on the backup will be the fun part.

Hi Chris,
Thanks for your reply.
Kepserver redundancy opc server is only DA :cry:, I need opc-ua server for Ignition.

I use driven scan class on backup node to decrease scan rate for the non active server, but it’s generate a communication load in the PLC.
I’m looking for a solution with igntion warm backup, but with the less possible load of communication with the PLC…

Hi mazeyrat

Oh, only DA, thats not too useful.

as I said, I’ll play in the morning and see if I can find somthing useful.

OK, so I have a fall over working well, but I’m stumped on one thing.

How I’ve done it so far

  1. Nothing is my fault
  2. Backup the gateway some where safe.
  3. Assumptions:
    a. Redundant Ignition Machines
    b. Each machine has a local Kepware server.
  4. In the Ignition gateway OPC Server connection settings, use the IP address of the machine not “localhost” or
  5. In the same settings, enable “show advance properties” and select “Failover Enabled”
  6. In the “Failover Connection Settings” host is the IP address of the other gateway. Set up the rest of the settings.
  7. Now make a new OPC connection, I called mine Primary_Control, set it up exactly the same as the main connection but without any failover selected.
    8) Now make a third OPC connection, I called mine Backup_Control, set it up exactly the same as the Primary_Control but use the Failover IP address.
  8. In Kepware on both machines, using the OPC UA Configuration Manager, delete the existing Server endpoints and make new ones that use the network adaptor.
  9. In Kepware on both machines, using the OPC UA Configuration Manager, look at the trusted clients, trust anything that has the IP address of the two machines, delete anything with localhost or
  10. If that’s gone well than the primary OPC server should have four clients connected and the backup two.
  11. Look at the OPC Browser in Ignition’s tags in the designer for the Kepware device system enable, for me I found “Primary_Control.Channel.Device._System._Enabled”. Make a tag from this, make tags for all devices. I used a “primary control” folder
  12. Do the above again but for the Backup_Control, I used a “backup control” folder
  13. Try and disable one of the new tags
  14. Now put the designer into full read and write and try again :smiley:
  15. This might pop up an error. This is because Kepware is rejecting the write to a system tag, you must change the permissions in Kepware for anonymous Clients, For now I’ve allowed everything, but I’ll narrow it down later, do this for both machines.
  16. Try and disable one of the new tags, it should operate OK and if you are receiving data it should stop and start as you disable and enable.
  17. So now we can control whether the OPC collects data.
  18. I created a Project script but it could be a Global. This needs to look at the primary server to see if its connected, if it is then set all the primary control to 1 and the backup to 0 and if it’s not then set all the primary control to 0 and the backup to 1

[code]def OPC():

#check opc status
Primary = system.opc.getServerState("Primary_Control")
#set values
if Primary=="CONNECTED" :
# write primary tags
tags = ["Comms/Control/Primary/PLC/_Enabled","Comms/Control/Primary/Metering/_Enabled","Comms/Control/Primary/LV_11to14/_Enabled","Comms/Control/Primary/LV_1to4/_Enabled","Comms/Control/Primary/LV_5to10/_Enabled"]
values = [primary,primary,primary,primary,primary]
values = system.tag.writeAll(tags,values)
# write backup atgs
tags = ["Comms/Control/Backup/PLC/_Enabled","Comms/Control/Backup/Metering/_Enabled","Comms/Control/Backup/LV_11to14/_Enabled","Comms/Control/Backup/LV_1to4/_Enabled","Comms/Control/Backup/LV_5to10/_Enabled"]
values = [backup,backup,backup,backup,backup]
values = system.tag.writeAll(tags,values)	[/code]
  1. This script is called by a 5 second timer.
    That’s it! Simples… Except, if the Primary OPC fails but not the PC, for example if the OPC runtime is stopped, it failsover, when the runtime is restarted, the system sees the good connection and switches back to the Primary, however Ignition keeps the main Kepware connection with the failover. AT present I can’t find a way to force this back, perhaps a setting is required.
1 Like

you can setup a secondary opc-ua connection to the backup kepware that looks at your device enabled tags. then you can have a script that verifies that you are running on the primary + the primary kepware is connected. if it is then make sure that your devices on the secondary kepware are disabled. if they arent disabled, then disable.

I use kepserver media level redundancy feature to manage connection to redundant PLC
From Ignition point of view, only one device with no script.
Main problem is to force master and backup gw to use the kepserver of the master to avoid 2 connection to the same redundant PLC, ie one from the master kepserver and one frsecond.backup kepserver
So I posted a Feature Request, you can vote for it. … connection