# Can you control how PLC tag names are converted to Ignition tag names?

**URL:** <https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [May 6, 2022, 1:36pm UTC](https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296 "2022-05-06T13:36:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [May 6, 2022, 1:36pm UTC](https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296/1 "2022-05-06T13:36:01Z")

</div>

Emerson PLCs support tag names that have a period in them as a part off how they support UDTs EG “BaseName.FieldName”. When importing tags like this into Ignition, the period automatically gets converted to an underscore. Thus “BaseName.FieldName” becomes “BaseName\_FieldName” (but the OPC Item path retains the period).

(Note that in [Creating Tags - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Creating+Tags), it mentions that ! @ # $ ^ & \* + [] will be replaced with an underscore when imported from a device, but doesn’t mention periods.)

From [Tag Naming, Characters not allowed](https://forum.inductiveautomation.com/t/tag-naming-characters-not-allowed/53840) there is a vague allusion to tags conforming to the \L regex (I say vague because regex’s are very implementation specific). My takeaway from that question is that Ignition supports more non-alphanumeric characters than just an underscore.

So the conversion of a period to an underscore was one of many possible conversions that Ignition could make. What I want to know is if it is possible to manually control this choice with some sort of table that we can explicitly define how unsupported characters are converted to supported characters in tag names?

My desire for this stems from the PLC code I generally work with, where there can be tags “Name.Field” and “Name\_Field” in the PLC that are both valid and totally independent tags (don’t ask!), so it is currently impossible to import both into Ignition at the same time. But if I could only just control the renaming process …

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 6, 2022, 1:47pm UTC](https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296/2 "2022-05-06T13:47:13Z")

</div>

> [@peter](#):
>
> But if I could only just control the renaming process …

There is no mechanism (that I am aware of) for telling Ignition what character to use when converting tag names.

Periods are not allowed in tag names because the period is used to designate a property call.

```auto
system.tag.readBlocking(['Your_Tag_Path.EngUnit'])

```

I'm not sure what other character you would use, but if you manually create the tag names (or write your own script to do it) then you can control how that happens, but I believe that is the only option you have.

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [May 6, 2022, 1:54pm UTC](https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296/3 "2022-05-06T13:54:04Z")

</div>

I have no problem with periods not being allowed in Ignition tag names. What I don't like is automagic processes that I can't control!

> [@lrose](#):
>
> I'm not sure what other character you would use, but if you manually create the tag names (or write your own script to do it) then you can control how that happens, but I believe that is the only option you have.

Not know what characters are supported in tag names is a part of the problem. But writing a custom import process is total overkill for what I am trying to achieve at the moment.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 6, 2022, 1:55pm UTC](https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296/4 "2022-05-06T13:55:40Z")

</div>

> [@peter](#):
>
> Not know what characters are supported in tag names is a part of the problem.

I understand.

> [@Tag Naming, Characters not allowed](https://forum.inductiveautomation.com/t/tag-naming-characters-not-allowed/53840/12):
>
> The tag naming is ultimately enforced via regular expression that looks for characters in the unicode letter categories (p{\L}), which unfortunately means multi-byte character sequences that contain a letter and then characters in a non-letter unicode category (u0e35 and u0e48 are both “nonspacing mark”) will not match the regex and therefore not be considered a valid tag name.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 6, 2022, 1:56pm UTC](https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296/5 "2022-05-06T13:56:55Z")

</div>

There’s no control over the automatically derived tag names that are used when you drag and drop from the OPC Browser.

As @lrose suggested the only way to do this would be create tags yourself, manually or with a script, but that’s been ruled out as overkill.

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [May 6, 2022, 2:05pm UTC](https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296/6 "2022-05-06T14:05:23Z")

</div>

> [@Kevin.Herron](#):
>
> There's no control over the automatically derived tag names that are used when you drag and drop from the OPC Browser.

Ahh I see, you assigned creating this task to some random person you hauled off the street, and you have no clue how they did it! Would it be reasonable to reign in this process with a table of explicit substitutions (with a fall back to the automagic process)

> [@](#):
>
> As @lrose suggested the only way to do this would be create tags yourself, manually or with a script, but that's been ruled out as overkill.

But even with manually re-naming the tags, how do I know what is valid without doing trial and error?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 6, 2022, 11:42pm UTC](https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296/7 "2022-05-06T23:42:11Z")

</div>

It's pretty buried at [Creating Tags - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Creating+Tags)

> The following characters are invalid and will be replaced by an underscore when dragging and dropping an OPC item into the Tag Browser: `! @ # $ ^ & * + []`
> 
> Parentheses are valid characters but are not valid as a first character in a tag name. If an OPC item name starts with a parenthesis, the tag name will be prefixed with an underscore

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [May 9, 2022, 2:40pm UTC](https://forum.inductiveautomation.com/t/can-you-control-how-plc-tag-names-are-converted-to-ignition-tag-names/59296/8 "2022-05-09T14:40:27Z")

</div>

I mentioned that list of invalid characters from the documentation in my initial post. However that list is not the complete list of invalid tag name characters.

You also mentioned parentheses (and leading underscores) as being valid, but the following chars are also valid: `- : '` Thus there is scope making choices in transliterating chars when importing tags.
