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!
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).
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.
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