# Changing OPC tag to memory tag and vice versa dynamically in run-time

**URL:** <https://forum.inductiveautomation.com/t/changing-opc-tag-to-memory-tag-and-vice-versa-dynamically-in-run-time/20745>\
**Category:** Ignition\
**Created:** [November 11, 2018, 12:38pm UTC](https://forum.inductiveautomation.com/t/changing-opc-tag-to-memory-tag-and-vice-versa-dynamically-in-run-time/20745 "2018-11-11T12:38:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [November 11, 2018, 12:38pm UTC](https://forum.inductiveautomation.com/t/changing-opc-tag-to-memory-tag-and-vice-versa-dynamically-in-run-time/20745/1 "2018-11-11T12:38:48Z")

</div>

Hello  
How I can change OPC tag to memory tag dynamically in run-time?  
I need this because I want to define a simulation mode in project so by changing this mode to all tag update by a script that simulate process behavior and write simulate value to tags. this needs disabling tag update data from OPC UA server and after switch back from memory to OPC tag the OPC item data data remain the same.  
Making OPC tag Item path empty and write value to to it is NOT working and value is always null.  
Using sim driver also not a good idea because I have around 1500 tags.  
I want a method to disable temporally read from OPC and write value by script.

Thanks.  
Nader

---

<div class="post-metadata">

**Author:** ![jeff.m.miller](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jeff.m.miller](https://forum.inductiveautomation.com/u/jeff.m.miller)\
**Post date:** [May 17, 2022, 9:08pm UTC](https://forum.inductiveautomation.com/t/changing-opc-tag-to-memory-tag-and-vice-versa-dynamically-in-run-time/20745/2 "2022-05-17T21:08:00Z")

</div>

Guessing never got an answer for this. My use case is about the same, but more around testing Alarms and HMI screens manually for things that do not happen normally in the device.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [May 17, 2022, 9:20pm UTC](https://forum.inductiveautomation.com/t/changing-opc-tag-to-memory-tag-and-vice-versa-dynamically-in-run-time/20745/3 "2022-05-17T21:20:23Z")

</div>

Have you tried this (Ignition 8+)?

> [@Reading PLC tags offline](https://forum.inductiveautomation.com/t/reading-plc-tags-offline/40596/3):
>
> If I don’t have a PLC but I have the project, most of our tags are within UDTs which are already developed, so these are fairly easy to create manually or using a tool that takes in a list of instance names and parameters and creates the udt instances for me. Without a PLC, in v8, you can convert tags between opc and memory without any information being removed (this wasn’t in the case in v7). I use this script, just copied into the script console, to convert tag json copied into the clipboard…
