# Simulate an instance of UDT without PLC connection

**URL:** <https://forum.inductiveautomation.com/t/simulate-an-instance-of-udt-without-plc-connection/92575>\
**Category:** Ignition\
**Created:** [June 30, 2024, 4:53am UTC](https://forum.inductiveautomation.com/t/simulate-an-instance-of-udt-without-plc-connection/92575 "2024-06-30T04:53:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [June 30, 2024, 4:53am UTC](https://forum.inductiveautomation.com/t/simulate-an-instance-of-udt-without-plc-connection/92575/1 "2024-06-30T04:53:47Z")

</div>

I created a udt, the tags are mapped to a PLC, for example, siemens PLC by DB addresses.

Then I created a instance of that UDT. With PLC connected, all values are connected nicely.

If it's not connected to the PLC, but I want to simulate all of the values and use these values as input to some calculation in ignition, what could be the easiest way to achieve it?

What I did is to create a same UDT, but all tags are memory tags, instead of OPC tags. It works, but not ideal. Anytime, I want to update the UDT, I need to update both UDTs.

Appreciate if anyone can advise an easier or simpler way.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 30, 2024, 10:26am UTC](https://forum.inductiveautomation.com/t/simulate-an-instance-of-udt-without-plc-connection/92575/2 "2024-06-30T10:26:12Z")

</div>

I normally use a script to convert tags from non-memory to memory. All of the other config will still be retained and you can use these to know which tags to convert back from memory tags when you go back to non-memory tags.

---

<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:** [June 30, 2024, 1:58pm UTC](https://forum.inductiveautomation.com/t/simulate-an-instance-of-udt-without-plc-connection/92575/3 "2024-06-30T13:58:51Z")

</div>

For Siemens, no, sorry.

For Rockwell and Modbus, I recommend using my 3rd party modules to swap out your real device connection for an emulation that uses the same OPC Item syntax. Same device name.

When ready to deploy, just rename the emulation and recreate the original device.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [June 30, 2024, 2:07pm UTC](https://forum.inductiveautomation.com/t/simulate-an-instance-of-udt-without-plc-connection/92575/4 "2024-06-30T14:07:42Z")

</div>

If I don't have a PLC and can't use a module as Phil suggested, I use Nicks script to convert to memory. He shared his script, see below.

> [@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…

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 1, 2024, 12:41am UTC](https://forum.inductiveautomation.com/t/simulate-an-instance-of-udt-without-plc-connection/92575/5 "2024-07-01T00:41:00Z")

</div>

Hmm, I've changed it since then haha, i'll post in a sec.

I edited my other post.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [July 1, 2024, 11:51am UTC](https://forum.inductiveautomation.com/t/simulate-an-instance-of-udt-without-plc-connection/92575/6 "2024-07-01T11:51:39Z")

</div>

Right, I had updated mine as well so you get values when you switch to memory. I had forgotten about that.
