PLC / Network Redundancy in Ignition

I have two Redundant SIEMENS S7-400H PLC. I am connected to both of them via Ignition Gateway and have imported the respective tags in two folders in ignition designer

The way it can be achieved is by modifying the .OPCItemPath with a global python script. This script can be triggered to run when a device communication times out. It searches all the tags using the failed device name and replaces it with the redundant device name.

Can someone please help me with develop the script syntax for one tag. Will be grateful!


An easier way is to use system.device.setDeviceHostname.

Check out this topic, Indirect OpcItemPath - #12 by pturmel

per @jlandwerlen , definitely use system.device.setDeviceHostname

I frequently use 'dev' devices and swap names when I'm ready for deployment. Since you're scripting anyway just script the device name change.

i.e. If your primary PLC name is S7400H and the backup is S7400H_2
have a script to rename S7400H to S7400H_1, S7400H_2 to S7400H, then S7400H_1 to S7400H_2.

Now you don't have to do anything with your existing tag paths. Use IPs of the devices then if you need to detect which device is being used (store the IPs in tags and compare against those).

I can understand this but I am new with ignition, is there any tutorial or example i can follow to achieve this task. I need help in applying this on ignition

The system.device.setDeviceHostname function just changes the IP of a device, so it won't work with the Siemens 400H, where you have different rack between the master and the slave (one is rack 0, the other is rack 1, and there's no function in Ignition to change that property at runtime).

Check this post for a solution:
Redundancy configuration for Siemens 400 PLC

Be careful, if I remember correctly there are cases where both devices (rack 0 and rack 1, independently on who is master) will be connected, but only the master will give you the running values. To handle this cases, you should read a always changing tag (i.e. PLC datetime seconds) on both devices: the master is the one with the tag that changes value.

1 Like

Did you see the link? I described how it would/could look.

The application i have in my project is to only read the values from the PLC and not control. And if the PLC we are connected to is lost (shutdown) our tags should shift over to the Redundant one. This post was very helpful and I think im missing a small trick here, Applying the the udt method where parameter name can be shifted to the other PLC when one PLC which we are connected to is lost ... will solve my problem.. If someone can help .. Thanks