Redundancy configuration for Siemens 400 PLC

I have a 400 PLC, two CP cards, different IP addresses and slot numbers.

I can use the exchange project to change the ip address if one CP is faulty. but I am not able to change the slot number, which is not working for the 400 PLC redundancy.

Then I am thinking about setting up two OPC devices, one for each CP card, then I can dynamically change OPC device in the tag configuration.
Something like:

But I am cannot find a proper way to write the tag script to point to a common string type memory tag "namePLC", that I can write some script to change the string to point to the working PLC device.

Any suggestion is appreicated.

Here's the function request dated back to 2017.

When I've had to do similiar for a DNP3 module we were able to write and change the hostname (i.e. the IP address) using scripting, though we you can't change slot numbers, port numbers etc.

Can you not add all of these tags into UDTs, set the device name as a parameter and write a script to change that parameter in case of comms failure?

At the time, 2017, I had to use the Kepware OPC server, where you can change dynamically the rack in the PLC connection properties.

Using Ignition maybe you could:

  • create two device connections and some tags for both to monitor which PLC is currently master
  • create a single UDT containing all the tags, with a parameter PLCName, using in all tags the OPC Tag Path [{PLCName}]DBxxx,REALyyy
  • change the parameter of the only tag instance via script writing the device name of the PLC that is master

I never tried it and I would use the Kepware driver, but it's the easiest way I see using Ignition.

thank you for the detailed reply. this is exactly what I want to achieve.

But the problem is how to dynamically change the parameter PLCname, I can only assign this with a static value each time I create a UDT instance.

What is the way to dynamically assign value to udt instance parameters?

Thanks

Thanks for the reply.

All my tags are from udt instance, as part of the coding library.

It will be a huge change if I am not going to udts.

To be in details, I dont want to use script to change the instance parameters, otherwise it will thousands of line of script to change each instance of the udt.

I want the Udt to point to common 'PLCname' memory tag, the value of this tag will be the OPC device name of the UDT tags, So I just need to write one script to change the momory tag value, then all of the udt created tags will be pointing to the new PLC.

You cannot. Tag properties cannot be bound to anything outside of UDTs, and only to UDT parameters within UDTs. Changes to tag properties or UDT params/props based on other tags must be written, typically by a change event at the source.

Consider using a UDT parameter that you don't override in the instances. Then you can write to the definition's value to change all of the instances.

1 Like

Hi Paul, thank you for the detailed reply every time.

I tried to understand the following sentence, can you elaborate what means by " write to the definition's value "?

Consider using a UDT parameter that you don't override in the instances. Then you can write to the definition's value to change all of the instances.

for example, I have a UDT created.

and the tag "outValue" is configured to map to the parameter "name_PLC".
image

Then I created an instance tag "test_tag" and I assigned the "name_PLC" parameter to "PLC1".
image

How do I change the value "PLC1" to "PLC2"? Is there any ignition function I can use?

While searching way to change tag parameters, I found the following post.

I am going to have a try and update here.

The following script will change the UDT instance tag parameter from "PLC1" to "PLC2".

system.tag.writeBlocking("[default]test_tag/Parameters.name_PLC", "PLC1")

The following script will change the UDT parameter default value from "PLC1" to "PLC2", hence all instances are changed, as long the instance tag parameter was not overwritten.

system.tag.writeBlocking("[default]_types_/udt_test/Parameters.name_PLC", "PLC2")
1 Like

I am using the same method as you have described where the UDT parameter name is set by using system.tag.writeBlocking script

I want to changeover from PLC1 to PLC2 when PLC1 is no longer connected.

I have Connected status from PLC1 (S7-400H) as integer and im using it in IF ELSE script to changeover to PLC2 (S7-400H) when PLC1 is no longer connected.

This script doesn't work for me, I have also tested creating Memory integer tag instead of connected status tag and simulated 0 and 1 but that doesn't work too (parameter name doesn't shift over to the other PLC), the ELSE statement works but the IF does not !!

Can someone Please help!