I have an application where I need to duplicate a project and it will reside on the same gateway. Both projects will be identical except for where the tags are coming from. Is there an easy way to do a search and replace of the path or device where the OPC tags reside? Currently, we have to manually replace each one and that’s hours of work. To explain further, the situation is this we have Project A with OPC tags pointed at Device A. We duplicate the project to Project B and want the OPC tags pointed at Device B. We cannot easily change to path. Help is appreciated.
I am working with Adonis on this project. The issue is all of the components point to tags in one folder. we want to duplicate the project and then update all the components to point to the same tags but in a different folder. Is there a way to export and search/replace this like we can with tags? We could use Dynamic Properties but I believe those would have to be on a per Window basis. We would also have to modify each component to use Indirect Binding one by one.
In his description, he said you really wanted to point it to device b. If it were possible, could you leave the folder structure the same and just change the tags to point to a different device in OPC? This could be changed by simply exporting the SQLTags to CSV and search/replacing on that with a text editor.
The problem is that SQLTags are global. However, you can create multiple providers (including internal providers), and the default provider is set on the project level.
I would suggest creating a new provider for your second project and setting it to the default for that project. From project A, export the SQLTags to CSV. Search and replace on the opc paths to change from device a to b, and then import them into the second tag provider. This assumes that all of your SQLTag reference don’t specify the provider by name, which is a safe assumption, since projects almost always leave it off and use the default.
Hope this helps,
I think that approach would work perfectly. I assume there is not any performance trade-off having multiple providers. Some of our systems could have 7 or 8 similar projects pointing to different PLCs on different providers using this approach.
No, I don’t think there would be any performance hit. You’d have multiple instances of the scan classes running, but that’s really pretty minimal in terms of impact.