# Best way to create UDT's with Siemens tags

**URL:** <https://forum.inductiveautomation.com/t/best-way-to-create-udts-with-siemens-tags/89612>\
**Category:** Ignition\
**Created:** [April 29, 2024, 8:21am UTC](https://forum.inductiveautomation.com/t/best-way-to-create-udts-with-siemens-tags/89612 "2024-04-29T08:21:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robbe\_Meyvis](https://avatars.discourse-cdn.com/v4/letter/r/e68b1a/32.png) [@Robbe\_Meyvis](https://forum.inductiveautomation.com/u/Robbe_Meyvis)\
**Post date:** [April 29, 2024, 8:21am UTC](https://forum.inductiveautomation.com/t/best-way-to-create-udts-with-siemens-tags/89612/1 "2024-04-29T08:21:49Z")

</div>

I'm trying to get a recipe structure from a Siemens PLC into Ignition by using an UDT.  
It looks like this in the Siemens DB:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5d2cb676ecbb3be52fb3713e499c9b2469fab7a8.png)

In Inductive University, I noticed there is a way to make the UDT tags variable with a parameter like this:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/2/62c8ad341458a8ef32f8aedbd951f77bdd0167a0.jpeg)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac7b97775e9da58c8ce5fb58688e8c791e8ac25d.jpeg)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c42b3583c94c40c2f0ca0b5a21a710337a6c240a.png)

But since i have to use the Ignition Siemens driver, I don't have such a neat path where I could just adjust the number...  
My addresses look like this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/1/317c13d9d37939dd5b178e43de312756f4ba5745.png)

I'm wondering what would be the best way to set this up in the most convenient way so I could easily work with about 20 different recipes?

---

<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:** [April 29, 2024, 11:41am UTC](https://forum.inductiveautomation.com/t/best-way-to-create-udts-with-siemens-tags/89612/2 "2024-04-29T11:41:10Z")

</div>

For integer parameters, you can do arithmetic within the braces. So if you have a starting byte offset in your DB, you can do

```python
[TestPLC]DB{dbParam}STRING{dbOffset+22}.15

```

Assuming the string starts 22 bytes into your PLC's structure in the DB.

---

<div class="post-metadata">

**Author:** ![Robbe\_Meyvis](https://avatars.discourse-cdn.com/v4/letter/r/e68b1a/32.png) [@Robbe\_Meyvis](https://forum.inductiveautomation.com/u/Robbe_Meyvis)\
**Post date:** [April 29, 2024, 2:09pm UTC](https://forum.inductiveautomation.com/t/best-way-to-create-udts-with-siemens-tags/89612/3 "2024-04-29T14:09:38Z")

</div>

Yes I think that's the best solution.  
I was already adding seperate tags like this:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/0/80372220ede39e5e7650fff10bd9ceea054e773f.png)

And trying to reference those numbers in the tagname in the UDT....  
But it doesn't make sense to have those tags twice.
