# Modbus TCP tags import

**URL:** <https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317>\
**Category:** General Discussion\
**Created:** [March 11, 2018, 4:44am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317 "2018-03-11T04:44:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlocIoT](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@BlocIoT](https://forum.inductiveautomation.com/u/BlocIoT)\
**Post date:** [March 11, 2018, 4:44am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/1 "2018-03-11T04:44:02Z")

</div>

Is there any solution to import Modbus TCP tags as a csv file?  
I know Ignition does not support OPC tag browsing for Siemens and Modbus, but I’m looking for a way to import my tags as a file into the Ignition.  
I’m using Schneider PLCs and have hundreds of tags, so using modbus mapping tool is not useful for me.  
Any idea or suggestion?  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [March 11, 2018, 9:29am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/2 "2018-03-11T09:29:40Z")

</div>

Write a script and call system.tag.addTag to add the tags, using logic to convert from your csv file to the required tag config.

---

<div class="post-metadata">

**Author:** ![BlocIoT](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@BlocIoT](https://forum.inductiveautomation.com/u/BlocIoT)\
**Post date:** [March 11, 2018, 2:24pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/3 "2018-03-11T14:24:00Z")

</div>

That might be last option because it takes a lot of time to do that in my case.I want to have meaningful names for my tags in Ignition such as Tank\_west, Tank\_East, etc. not merely Tagg-1, Tag-2, Tag-3, etc.  
I know there is an import/export feature in the designer. But I’m not sure can we create one tag manually, export it to a file, add other tags as we need into the file, and export it back into the Ignition?

---

<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:** [March 11, 2018, 2:26pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/4 "2018-03-11T14:26:41Z")

</div>

> [@BlocIoT](#):
>
> But I'm not sure can we create one tag manually, export it to a file, add other tags as we need into the file, and export it back into the Ignition?

Yes, you can.  
I generally use the XML format and make a PHP file out of it. Then I can loop and use expressions to create many tags programmatically. The output of that is XML, which can be imported back into Ignition.

---

<div class="post-metadata">

**Author:** ![BlocIoT](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@BlocIoT](https://forum.inductiveautomation.com/u/BlocIoT)\
**Post date:** [March 11, 2018, 2:38pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/5 "2018-03-11T14:38:10Z")

</div>

So the format of the exported/imported tag file should be XML? Any chance to use csv instead?  
I can write a script for this. But many others might not. I’m trying to find a the easiest way to show other designers how to use Ignition instead of their legacy system. Tag import/export using a CSV file is the most basic feature in a SCADA system.  
Thanks

---

<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:** [March 11, 2018, 2:40pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/6 "2018-03-11T14:40:24Z")

</div>

You absolutely can use CSV, but there are attributes that cannot be represented, like multiple alarms on a single tag. XML can reconstruct all aspects of a tag.

---

<div class="post-metadata">

**Author:** ![BlocIoT](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@BlocIoT](https://forum.inductiveautomation.com/u/BlocIoT)\
**Post date:** [March 11, 2018, 3:15pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/7 "2018-03-11T15:15:13Z")

</div>

How we can define the file format?  
I believe there should be a solution when we don’t have any alarm or … for tags. All I need is correlating some addresses to some tag names.

---

<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:** [March 11, 2018, 3:19pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/8 "2018-03-11T15:19:37Z")

</div>

Get a tag working manually, possibly with dummy values in various attributes. Or one working sample tag for each combination of attributes you wish to be able to generate externally. Export as CSV and as XML. Examine the files to determine how to substitute programmatically. If something you need doesn’t appear in the CSV, you will need to use XML.  
(I never use the CSV format myself, sorry.)

---

<div class="post-metadata">

**Author:** ![BlocIoT](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@BlocIoT](https://forum.inductiveautomation.com/u/BlocIoT)\
**Post date:** [March 11, 2018, 3:24pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/9 "2018-03-11T15:24:12Z")

</div>

I’ll give it a try.  
Thanks

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [March 12, 2018, 12:21pm UTC](https://forum.inductiveautomation.com/t/modbus-tcp-tags-import/17317/10 "2018-03-12T12:21:41Z")

</div>

> [@Mass creation of Tags and Alarms in xml](http://forum.inductiveautomation.com/t/mass-import-of-tags-and-alarms/17310/21):
>
> I found this technique very interesting for converting large amount of Tags and Alarms into Ignition compatible xml file. I found this idea in youtube just few hours back and still experimenting. I thought, i will post it here immediately so that you can also try and share your experience. Cheers slight_smile First, we have to create an XML schema xsd file. Schema is our template. In Ignition, basically we can create UDTs and 5 different types of tags. Create some sample tags (or UDTs) unde…
