Is it possible to indirect tag my OPC Server and so that I can change (via a Gateway Event Script) which OPC server I am polling

Hello All,

I currently have 2 connection paths to develop my ignition project:

  1. I originally used the Ignition OPC-UA Server and connected to my PLC
  2. I later used the FactoryTalk Linx Gateway to connect to an Emulated PLC (Studio 5000 Logix Emulate)

I have the connection to both up and running fine. and they both contain exactly the same tags. My reason for doing this is because sometimes I work in the office with a PLC on hand and sometimes I work remotely without a PLC available.

QUESTION:
Basically I would like to switch all of my ignition project tags from using the Ignition OPC-UA Server to using the FactoryTalk Linx Gateway OPC-UA Server at will.

What is currently working:
I figured I could do this by specifying 2 Data Type Parameters for each of my UDTs: 1 called “ServerName” and 1 called “ns_number”.

I would then pass in the strings “Ignition OPC-UA Server” and “1” for my respective parameters if I wanted to use the Ignition OPC-UA server OR I would pass in “FactoryTalkLinxServer” and “3” for my respective parameters if using the FactoryTalk Linx Gateway.

This also works fine.

image

ISSUE:
My issue is that in the Data Type Parameters section, I would like to add a Memory tag into the value section. This way I can write to the memory tag via a Gateway Event Script and change all my tags from 1 OPC Server to another. However, the Data Type Parameter values section does not accept my memory tag.

SOLUTION?
Is there a better way to go about this switch?

Odd workaround:
I could also export the Tag xml file, find and replace all the OPC server and ns_number instances but this seems hokey.

Thanks!!

With ignition 8 you can use some parameter for opcserver and item ans it is possible to write those parameters with a script to change the values

Project Spec requires v7.9.xx in my case. Do you know if this is possible in v7.9.xx?

Consider just renaming the devices manually.

1 Like

As in on the Gateway side for the Server names? wouldnt the ns=# still be different? When looking it up, ns stands for name space ID/Index, but Im not sure what the implications are of changing it. Ive always simply copied this portion over when dealing with OPC-UA without much thought.

I’ve yet to see a namespace index other than “1” for the drivers I use.