Simulate an instance of UDT without PLC connection

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.

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.

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.

2 Likes

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.

1 Like

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

I edited my other post.

1 Like

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