# Ignition OPC UA Server Redundancy (Modbus TCP)

**URL:** <https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123>\
**Category:** Ignition\
**Tags:** redundancy\
**Created:** [December 1, 2022, 7:49am UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123 "2022-12-01T07:49:00Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiyoung\_hwang](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jiyoung\_hwang](https://forum.inductiveautomation.com/u/jiyoung_hwang)\
**Post date:** [December 1, 2022, 7:49am UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/1 "2022-12-01T07:49:00Z")

</div>

![modbus](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/7/27b637c82b73b9721babcfabf5b5de08ff07478f.gif)

Like the attached file, I want to redundancy

If possible, please tell me how to do it.

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [December 1, 2022, 7:55am UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/2 "2022-12-01T07:55:05Z")

</div>

As far as I know, Device has no redundancy.  
But you can create duplicate tags and choose which set of values to use ,based on the connection state.

---

<div class="post-metadata">

**Author:** ![jiyoung\_hwang](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jiyoung\_hwang](https://forum.inductiveautomation.com/u/jiyoung_hwang)\
**Post date:** [December 1, 2022, 7:56am UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/3 "2022-12-01T07:56:31Z")

</div>

How should I do that?

can you tell me?

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [December 1, 2022, 8:11am UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/4 "2022-12-01T08:11:53Z")

</div>

Here is a rough example. Get the device state and use it to build the real tag's path.  
Using UDT will help a lot.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/597e955791f26e51b2142bc51c5f968753cd9f7b.png)  
New Tag expression

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/a/eaab382cacc940fbb3ba348b9bec42ed4ee88a1d.png)  
State tag  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/a/3a25ee9f7f88eacb40b9b3b2f7c71ec2c9cace3e.png)

---

<div class="post-metadata">

**Author:** ![jiyoung\_hwang](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jiyoung\_hwang](https://forum.inductiveautomation.com/u/jiyoung_hwang)\
**Post date:** [December 1, 2022, 8:16am UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/5 "2022-12-01T08:16:54Z")

</div>

Thanks for letting me know

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [December 1, 2022, 4:09pm UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/6 "2022-12-01T16:09:54Z")

</div>

Another solution is to use 2 opc tag and a **reference tag** with the sourceTagPath according to the device connected.

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [December 2, 2022, 12:40am UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/7 "2022-12-02T00:40:03Z")

</div>

Yes, that's better.

---

<div class="post-metadata">

**Author:** ![woodsb02](https://avatars.discourse-cdn.com/v4/letter/w/6a8cbe/32.png) [@woodsb02](https://forum.inductiveautomation.com/u/woodsb02)\
**Post date:** [July 12, 2023, 12:11pm UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/8 "2023-07-12T12:11:17Z")

</div>

I’ve submitted an idea to add support for redundant slaves to the Modbus TCP driver. If you’d like to see this supported added to Ignition, it would help if you up-voted the idea at the link below.  
[https://inductiveautomation.canny.io/ignition-features-and-ideas/p/modbus-tcp-driver-redundancy](https://inductiveautomation.canny.io/ignition-features-and-ideas/p/modbus-tcp-driver-redundancy)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 12, 2023, 12:18pm UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/9 "2023-07-12T12:18:16Z")

</div>

I may just add this to my alternate modbus driver. I recently made it accept a separate hostname for Ignition redundancy. This would be similar.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 12, 2023, 4:23pm UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/10 "2023-07-12T16:23:12Z")

</div>

It wasn't quite as easy as the last change, but relatively easy. _ **Utterly untested** _, feedback welcome:

**BETA** for Ignition 8.1: ~~v1.1.4.231931604~~

Some notes:

- When active, the driver alternates between the live connections on a per-batch basis. For this driver, a "batch" is a memory area subset of a single `system.opc.readValues()` request, `system.opc.writeValues()` request, or subscription poll. (Coils with coils, discrete inputs with discretes, et cetera.) This is effectively load-balancing between the connections, though not deliberately so. (Batch sizes vary and are not considered in the toggling.)

- When a single connection breakage occurs, the batches that were queued to the now-broken connection will fail. For subscriptions, bad quality will appear for one subscription cycle. Non-subscription reads and any writes should be monitored for error results and retried.

- Only available for Modbus TCP, not any form of RTU.

- Device status will include "Degraded" or "Recovering" if the two connection states differ.

I probably won't have a chance to properly test this until next week. I thought y'all might like this preview.

---

<div class="post-metadata">

**Author:** ![woodsb02](https://avatars.discourse-cdn.com/v4/letter/w/6a8cbe/32.png) [@woodsb02](https://forum.inductiveautomation.com/u/woodsb02)\
**Post date:** [July 12, 2023, 9:55pm UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/11 "2023-07-12T21:55:42Z")

</div>

Thanks very much - I’ll give it a test in the next day or so and let you know how I go

---

<div class="post-metadata">

**Author:** ![woodsb02](https://avatars.discourse-cdn.com/v4/letter/w/6a8cbe/32.png) [@woodsb02](https://forum.inductiveautomation.com/u/woodsb02)\
**Post date:** [July 17, 2023, 1:52pm UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/12 "2023-07-17T13:52:14Z")

</div>

I just wanted to say that this works really well - thanks for making that a reality!

There was probably only 1 additional feature I found myself wanting whilst using this - and that was gateway device tags that showed the individual status of the 2 connections. This would allow people to diagnose which device was down during troubleshooting - and could even be shown on a diagnostic perspective page to help the operator when raising a support request.

To complete the complement sandwich 😁 - it was great that the main device "status" tag still included the work Connected before the rest of the status, since that is often used to test the health of the connection within scripts.

---

<div class="post-metadata">

**Author:** ![woodsb02](https://avatars.discourse-cdn.com/v4/letter/w/6a8cbe/32.png) [@woodsb02](https://forum.inductiveautomation.com/u/woodsb02)\
**Post date:** [July 17, 2023, 2:27pm UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/13 "2023-07-17T14:27:49Z")

</div>

Actually, I think I may have found a bug when used with [bit-level addressing and Modbus mask-write](https://docs.inductiveautomation.com/display/DOC81/Modbus+Addressing#ModbusAddressing-Bit-LevelAddressing). Not sure if its new with this redundant BETA version or pre-existing.

My test setup (both the modbus server and client are using your advanced modbus driver):

- Modbus Server listening on 0.0.0.0
- Modbus Advanced Client connecting to 127.0.0.1 and 127.0.0.2

Setup a boolean OPC tag which uses the Modbus advanced client device.

Using this address works: `ns=1;s=[client]1.C1`  
Using this address works intermittently: `ns=1;s=[client]1.HR1.0`

The failure mode is that the first time the tag is set to true, it seems to work. But then when trying to set it back to false, and on subsequent writes, it seems to fail for about 10 seconds or so before then working. Watching the loopback interface traffic in Wireshark, it looks like the modbus mask write commands are not being sent at all to any address until the 10 seconds has passed.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 17, 2023, 3:42pm UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/14 "2023-07-17T15:42:16Z")

</div>

Hmm. Will investigate.

---

<div class="post-metadata">

**Author:** ![woodsb02](https://avatars.discourse-cdn.com/v4/letter/w/6a8cbe/32.png) [@woodsb02](https://forum.inductiveautomation.com/u/woodsb02)\
**Post date:** [May 24, 2024, 8:50am UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/15 "2024-05-24T08:50:57Z")

</div>

Hi @pturmel,

Not sure if you ever found/fixed the issue that was causing bit-level addressing to intermittently fault when I tested in July... but I tested it again today with the Advanced Client v1.1.6.241441839 and it seemed to be working fine.

That said, I was testing against a different modbus server this time (not the server in your module).

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 24, 2024, 12:17pm UTC](https://forum.inductiveautomation.com/t/ignition-opc-ua-server-redundancy-modbus-tcp/67123/16 "2024-05-24T12:17:02Z")

</div>

I did not.
