PLC Redundancy and Ignition Clustering

Hi Gents/Ladies,

We are installing Ignition with Clustering on-top of an existing Redundant PLC System.
PLC 1 and PLC 2 functionality.
Both PLC’s are evaluating each other and decide based on numerous aspects which one will be the MASTER.
The Master PLC is the one with the up to date DATA, the Slave’s Data gets updated from the Master periodically and on Changeover. As a result Data on both PLC’s is not always the same, therefore the Masters Data has to be used.

We can detect in the Code which one is Active.

The OPC Server is tagged up for both PLC1 and PLC2.

Now my questions:
Question 1:
In order to Use the Correct data The Tags of the Master get Copied into Internal Tags. These are then used in Ignition.
Please note that there is more then 3000 tags per PLC involved.
Is there an easy way of doing this? Or any other ideas would be great.
Alarm Messages created in the PLC are particularly annoying me here.

Question 2:
Is there a way to swap the Master and Member in Ignition?
PC1 = Master & PC2 = Member.
Command to change over
PC1 = Member & PC2 = Master.

Some ideas for discussion,

Taking these one at a time:

[quote]In order to Use the Correct data The Tags of the Master get Copied into Internal Tags. These are then used in Ignition.
Please note that there is more then 3000 tags per PLC involved.
Is there an easy way of doing this? Or any other ideas would be great.[/quote]
If you can export the tags into a csv/excel format you can easily modify them to match the Ignition import format. This format can be found by creating a few sample tags and exporting them and then examining the resulting file.
This will create db or SQLtags when you import them into Ignition. I noted that you mentioned Internal tags. If you really need internal tags, this won’t work. (unless Colby et al have given us the ability to import/export internal tags)

There was a post from somebody with this problem. They solved it by storing the PLC alarm messages in a series of chars and reading the string as a bunch of tags. In code he rebuilt the string.

Not that I know of. However, if you import the tags into SQLTags, you could then add logic to check which is the master and use the masters tags.

:bulb: :scratch: maybe create one set of SQLTags, two sets of internal tags (one for each PLC) and then create a transaction group that updates the SQLTags from the internal tags based on which PLC is master.

You can import/export internal tags using CSV in the designer, just as you could with external tags. Although, I suspect with external tags you’re probably used to going directly to the DB.

Now, about redundancy. Unfortunately, I don’t think I have too many great answers. It sounds like you want to define the tags so that they point to the “master”, instead of a particular PLC address. This would probably be best done with a new type of “redundant device” in Ignition, where you define two PLCs, and then a new virtual device with conditions that determine which is master, which is what you address your tags to. This hasn’t yet come up, but it seems like a great idea to me, and we’re starting to get much more into building up our redundant capabilities.

That thought leads to question #2. With current Ignition, there’s no way to specify who should be master. In 7.2, we’ve re-written clustering/redundancy to make it predictable. One machine is master, one is backup- and one of the two is currently “active”. We’ve added several new features to help with some of the issues people were running into (eg, “do they both connect to my PLC? What if they just can’t see each other, do they both log?”), but for the first release you won’t be able to directly control this. The master will run while it’s up- the backup will take over when the master can’t be reached.

We’ve had some idea of adding this in, but the thing is- with the fully replicated configuration, I’m not sure how beneficial it would be. Something like a “failover device” setting on the device akin to the “failover database” on a datasource connection would probably handle most cases.

Hope this answers your questions,

Thanks Colby, I wasn’t sure about the internal tags.

What we do when we provide redundant front ends is we give the master/slave pair a single floating ip address. The SCADA host polls this address and we move it between the front ends as required.

Do the PLC’s provide this capability? If not, does anybody know of a router that can provide it? Assuming the router has a way of knowing which PLC is master.

(Sorry, our product does not talk to OPC servers)

Hi Gents,

For the Redundand Tags i did the following:
In Kepware i enabled the Setting to allow to write to the System Tags.
I have now one set of Tags for PLCx (All Tags of the System)
I have one Tag for PLC1 (Is Master)
I have one Tag for PLC2 (Is Master).

Dependand on which one is the the Master The TAG “/PLCx/_System/_DeviceID” Changes the IP Address. e.g.
If PLC 1 Is Master, tag /PLCx/_System/_DeviceID" =
If PLC 2 Is Master, tag /PLCx/_System/_DeviceID" =
This is done in the Gateware script on a timed interval.

It now allows me to have one set of tags for everything and dynamically change them over to the master if required.

Wow, that’s cool- I didn’t even know you could switch the IP address of the device on the fly in Kepware. Good to know!


Hi Gents,

new problem with the opc clustered connection in Ignition.
What we have is 2 servers.
1 Being Master the other being a member.
Both Servers have kepware on it.
The Clustered OPC Server is configured to be localhost. the idea being that it swaps to the localhost of the member if the master shuts down.
It seems that the Tags all become stale on swapover. I need to reinitialize Kepware to get the whole thing to work again.

Any Ideas anyone?

Is it even right to use the OPC Clustered UA connection to localhost?

Hi Gents,

Solved another one…
In Kepware under OPC UA Configuration in the TAB Server Endpoints I removed the Endpoint that used the Name of the PC. It seems that on Member to Master Swap over the PC Name is incorrect. The Fix is to use the IP Address of the PC as a Server Endpoint instead.[quote][/quote]

Hope this helps you gus some day.

HI Gents,

more updates/questions.

I have an internal tag to which i write the PLC Date and time using the following.
I have created a function in the ScriptModules called app.focus.plcDT(Year,Month,Day,Hour,Min,Sec).
The above scipt gets called in the Gateways Even Script Time section, in which it Writes the PLC Date and Time to an Internal Tag.

The problem is that when the client is connected to the member gateway the Tag doesn’t get updated.
However when the Client is connected to the Master Gatewat the tag does get updated.

Any Ideas on that one.

That’s interesting… it seems like something we’ll probably have to look into. The gateway script may not be running on the backup, though it probably should, and beyond that- a write to a DB tag should be a clustered operation.

Could you perhaps implement it with an expression based DB tag that formed its value off the PLC values instead?


Hi Colby,

I forgot to mention that the script returns the Date and Time, which then used in the Timer:

Code of the app.focus.plcDT(Year,Month,Day,Hour,Min,Sec) Script:

[def plcDT(Year, Month, Day, Hour, Min, Sec):
 import system
 from java.util import Calendar
 caldt = Calendar.getInstance()
 Y2K = 2000 + Year
 Monthminus1 = Month - 1
 caldt.set(Y2K, Monthminus1, Day, Hour, Min, Sec)
 DateTime = caldt.getTime()
 return DateTime

The Timer Script that calls app.focus.plcDT(Year,Month,Day,Hour,Min,Sec):

#Define Variables From PLC Tags
Year = system.tag.getTagValue("[]PLCx/DB1/Year")
Month = system.tag.getTagValue("[]PLCx/DB1/Month")
Day = system.tag.getTagValue("[]PLCx/DB1/Day")
Hour = system.tag.getTagValue("[]PLCx/DB1/Hour")
Min = system.tag.getTagValue("[]PLCx/DB1/Min")
Sec = system.tag.getTagValue("[]PLCx/DB1/Sec")
#Write PLC Date and Time to internal Tag
system.tag.writeToTag("[]System/PLCDateTime", app.focus.plcDT(Year, Month, Day, Hour, Min, Sec))

I tried you solution were the date is converted in an expression. however the value went stale, can’t remember why, the expression was:

2000+{PLCx/DB_1/Year} + "-" +
{PLCx/DB_1/Month} + "-" +
{PLCx/DB_1/Day}+ " " +
{PLCx/DB_1/Hour} + ":" +
{PLCx/DB_1/Minute} + ":" +

Again thanks for all your time and help, it is appreciated.

Hi Gents,

Still have a problem where the clients wont read the tags.
What i have is two ignition gateways setup for clustering.
both have 2 network cards
the plc network is for server 1
the other network is for server 1
the plc network is for server 2
the other network is for server 2

i have set the the ignition gateway peers to use the 140.88.0.xx address range.
The addresses for the Clients to use were setup up as follows.
Server 1: And
Server 2: And

Now what seems to happen is: if two clients are open one is connected to the Master and the other to the member.
The Client that is connected to the member displays all tag items in red. (IO Fields reading from Kepware OPC ).
The Client that is connected to the MASTER displays everything as it should.

There is a Kepware OPC server installed on both Servers. connection with localhost and all Certs are o.k.

Ant help on this one gents would be great.