# Recommended approach to importing and mapping PLC UDTs to Ignition (Vision) tags (OPC-UA, S7-1500 PLC)

**URL:** <https://forum.inductiveautomation.com/t/recommended-approach-to-importing-and-mapping-plc-udts-to-ignition-vision-tags-opc-ua-s7-1500-plc/78016>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [August 17, 2023, 5:59pm UTC](https://forum.inductiveautomation.com/t/recommended-approach-to-importing-and-mapping-plc-udts-to-ignition-vision-tags-opc-ua-s7-1500-plc/78016 "2023-08-17T17:59:48Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![kcui](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcui/32/51446_2.png) [@kcui](https://forum.inductiveautomation.com/u/kcui)\
**Post date:** [August 23, 2023, 4:35pm UTC](https://forum.inductiveautomation.com/t/recommended-approach-to-importing-and-mapping-plc-udts-to-ignition-vision-tags-opc-ua-s7-1500-plc/78016/5 "2023-08-23T16:35:16Z")

</div>

@paul-griffith @Kevin.Herron  
As a follow-up to this, assuming I am using Siemens OPC-UA server, it appears the best way to reference complex / structured data types (with lots of members) is to read the PLC UDT in as a Document and then use "jsonGet" in a Derived tag to access the individual members. A great thread was [here](https://forum.inductiveautomation.com/t/opc-ua-struct-data-type/26905).

Is there any official training or reference material in the online manual that shows more examples, or are most examples going to be from the forums?

So in my case:

1. I'd set up an OPC tag to, let's say, "CM\_Pressure[1]" via the OPC-UA server on the PLC, Let's call the Ignition Tag "Pressure1"
2. Create a Derived tag to access a particular member. Let's say I am accessing Pressure[1].HMI.bAlarmEnable and this would be set up as a Boolean type.
3. Point the Source Tag Path to the source Ignition Tag "Pressure1"
4. Set the Read expression with a jsonGet:
  - jsonGet({source},"HMI.bAlarmEnable")

5. Set the Write expression with a jsonSet:
  - jsonSet({source},"HMI.bAlarmEnable", ?????)

More questions:

- I'm not sure where I go with the "value" parameter ????. Is this another tag that holds the value to be written (in this case, true or false / 1 or 0)
- What prevent this derived tag from constantly writing? If this was bound to a pushbutton object in the HMI, I only want the write to occur when the button is pressed.
- Is this method of using the JSON object unique to OPC UA, or just a quirk with Siemens? I intentionally chose OPC UA as opposed the Siemens TCP driver since I cannot access symbolic tags that way.
- If I was using a Rockwell / AB CLX PLC over the native Ignition OPC drivers, I assume this support accessing UDTs directly this way or would there be a similar approach to accessing PLC UDTs (I'm sure this is a while different topic.).

Thanks again.

---

_[View the full topic](https://forum.inductiveautomation.com/t/recommended-approach-to-importing-and-mapping-plc-udts-to-ignition-vision-tags-opc-ua-s7-1500-plc/78016)._
