# Mass creation of Tags and Alarms in xml

**URL:** <https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310>\
**Category:** General Discussion\
**Tags:** ignition79, database\
**Created:** [March 10, 2018, 6:18am UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310 "2018-03-10T06:18:28Z")\
**Posts on this page:** 20\
**Page:** 1

<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 10, 2018, 6:18am UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/1 "2018-03-10T06:18:28Z")

</div>

Is there any easy way to create and import a large number of tags and alarms, say 100.000, into Ignition?.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [March 10, 2018, 8:02am UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/2 "2018-03-10T08:02:47Z")

</div>

It’s more efficient if your tags are well structured with UDT. You import first UDT definitions with an XML file and then tags definitions with another XML file.

---

<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 10, 2018, 10:26am UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/3 "2018-03-10T10:26:05Z")

</div>

I can create UDTs, different types of tags, Alarms and export it as template.xml file. I have a list of 100,000+ UDT instances, tags and Alarms to be created in an Excel file tags\_alarms.xlsx. I would like to use the tags\_alarms.xlsx file to auto generate a final.xml file based upon the template.xml file, which can be directly imported into Ignition. Is it possible or should i have to edit the xml file manually?.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [March 10, 2018, 11:01am UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/4 "2018-03-10T11:01:17Z")

</div>

You can store your instance tags data definition in an SQL database (mysql or another one) and generate xml file with an Ignition script which read the data from the database and print in a text file the xml instance definition.

You can export tag example to file to learn about tag xml format and this is described in ignition online help.

If you don’t want a database, export excel to csv and write a script in Ignition to read csv and generate an xml file.  
Another way is not generating an xml file to import but using ignition edit tag function to create the tag.

Ignition xml format for tag, udt and intance will enable to configure all what you need.

---

<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 10, 2018, 12:25pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/5 "2018-03-10T12:25:43Z")

</div>

> [@mazeyrat](#):
>
> If you don't want a database, export excel to csv and write a script in Ignition to read csv and generate an xml file.

I searched the Ignition document which may explain in detail with some example about converting a csv file of tags and Alarms into an xml file, which can be directly imported into Ignition. This is the one i found but not very helpful for the above requirement. I could not find in IA university either.

Editing xml tags manually is time consuming, error prone and not the best way to engineer a SCADA project.

[https://docs.inductiveautomation.com/display/DOC79/Importing+and+Exporting+Tags](https://docs.inductiveautomation.com/display/DOC79/Importing+and+Exporting+Tags)

> [@mazeyrat](#):
>
> Another way is not generating an xml file to import but using ignition edit tag function to create the tag.

I thought, with edit tag we can only edit an existing tag. I am NOT sure how to create a tag with edit tag function. If you mean, copy, paste and edit, this is very laborious for 100,000+ tags.

---

<div class="post-metadata">

**Author:** ![David.Reed.Schmidt](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@David.Reed.Schmidt](https://forum.inductiveautomation.com/u/David.Reed.Schmidt)\
**Post date:** [March 10, 2018, 2:51pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/6 "2018-03-10T14:51:43Z")

</div>

But where are the 100k tags coming from? A previous ignition export? An export from another SCADA system? This will help understand the context of the original question.

---

<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 10, 2018, 2:59pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/7 "2018-03-10T14:59:25Z")

</div>

> [@David.Reed.Schmidt](#):
>
> But where are the 100k tags coming from? A previous ignition export? An export from another SCADA system?

An export from another SCADA system. I am trying to migrate from another SCADA to Ignition. This is a new project starting from scratch.

---

<div class="post-metadata">

**Author:** ![David.Reed.Schmidt](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@David.Reed.Schmidt](https://forum.inductiveautomation.com/u/David.Reed.Schmidt)\
**Post date:** [March 10, 2018, 3:20pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/8 "2018-03-10T15:20:02Z")

</div>

what I have done successfully in the past is this: Create a global script in Ignition, import the csv with Python, iterate through the file and use the ‘add tag’ script system function to create new Ignition tags. I suggest editing the raw csv file before to make the Ignition script easier to use. For example, I’ll create a new column with a 1 or 0 and filter the tag creation for those csv rows. This will allow me to dial in the code befor running it for all rows. Expect to create and destroy all tags multiple times until you are satisfied and expect the code to run for 10 to 30 min because creating the tags is process intensive. I like using the same tag structure as the original system because it makes finding tags easier, also use the ignition tags ‘documentation’ attribute to store important important information about the tag such as the original systems tag name and folder location.

---

<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 10, 2018, 3:50pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/9 "2018-03-10T15:50:02Z")

</div>

Doesn’t sound like an easy way to accomplish. This is not so complicated in other SCADA systems. Even WW Archestra which is using an object database has explained the procedure very clearly with csv file and it works perfectly. May be internally it converts into an xml file. Configuring tags, Alarms, history and importing into the SCADA db is the first step in creating a SCADA project. Almost every SCADA system explains the procedure to mass import tags and Alarms very clearly. I wonder, why Ignition document ignored this very important point !!.

A person coming from FTView, wincc, WW, Wizcon etc will be very badly put off by this need to learn Jython scripting to import tags and Alarms.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [March 10, 2018, 4:18pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/10 "2018-03-10T16:18:57Z")

</div>

The XML format for importing tags in Ignition is very simple.  
With either a CSV or an Excel file, you can just loop down the rows creating the required XML.  
We import entire wonderware tag databases to Ignition in under 10 seconds using this method.

1. Create some example tags in Ignition, export them to XML.
2. Model your Excel/CSV file to the fields you want in the tags.
3. Code a simple file writing loop to create the tags.xml file
4. Go into Designer, Right Click, Import tags.xml

---

<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 10, 2018, 4:33pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/11 "2018-03-10T16:33:44Z")

</div>

> [@MMaynard](#):
>
> 3.Code a simple file writing loop to create the tags.xml file

I have to figure out step 3. Otherwise, step 1,2, 4 sounds logical and humane. This is what i expected.

Scripting is normally used for some special customization in any SCADA. Over scripting may kill the project. Expecting a beginner to write Jython scripts to import tags and alarms even before creating a basic project, sounds cruel and inhumane to say the least. This will create a very bad allergy in the minds of many SI's towards 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 10, 2018, 5:43pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/12 "2018-03-10T17:43:52Z")

</div>

> [@R.Alamsha](#):
>
> Scripting is normally used for some special customization in any SCADA. Over scripting may kill the project. Expecting a beginner to write Jython scripts to import tags and alarms even before creating a basic project, sounds cruel and inhumane to say the least. This will create a very bad allergy in the minds of many SI's towards Ignition

This is ridiculous. Ignition provides GUI tools to perform all of the configuration tasks one needs to make use of the platform. But building big, complex projects with just a GUI takes much time, regardless of which platform is involved. That Ignition's development can be scripted at all to automate many of the tasks is a big win. Since a system integrator that can't write code for integration itself is unworthy of the name, writing code to automate development tasks is not a big ask.

---

<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 10, 2018, 6:17pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/13 "2018-03-10T18:17:53Z")

</div>

> [@pturmel](#):
>
> Since a system integrator that can't write code for integration itself is unworthy of the name, writing code to automate development tasks is not a big ask.

Why the documentation is not explaining the procedure (converting csv to xml) to mass import tags and alarms?.

The first source of information for any SI is the user manual. May be in the next version, IA can update this procedure.

---

<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 10, 2018, 7:41pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/14 "2018-03-10T19:41:13Z")

</div>

> [@R.Alamsha](#):
>
> Why the documentation is not explaining the procedure (converting csv to xml) to mass import tags and alarms?

Because there's no procedure. It's just something that coders who understand both CSV and XML will be able to do.

---

<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 10, 2018, 8:24pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/15 "2018-03-10T20:24:09Z")

</div>

> [@pturmel](#):
>
> Because there's no procedure. It's just something that coders who understand both CSV and XML will be able to do.

There may be several workarounds and tricks. But tags and alarms db is the heart of a project. The official procedure will eliminate any inconsistencies, malfunctioning and surprises which may pop up at a later stage.

Most of the functionalities, every SCADA programmer knows. But still, the document and IA university takes efforts to explain them in detail. This is because of the responsibility of a product manufacturer. Importing a flawless Tags and Alarm database is the first step in creating any SCADA project. I wonder, how it was overlooked in the user manual.

Do you think, an SI who doesn't even know how to write some simple Jython scripts and automate tasks is NOT eligible to use Ignition?.

---

<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 10, 2018, 9:41pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/16 "2018-03-10T21:41:39Z")

</div>

> [@pturmel](#):
>
> Because there's no procedure. It's just something that coders who understand both CSV and XML will be able to do.

To be fair, i will take your point in the right spirit. I agree that, it's not possible to engineer a decent Ignition project without Jython scripting skills. But writing Jython script to import 100,000+ tags and alarms is NOT acceptable for me. This will be a disaster. I will never do that. There must be better ways to convert a csv file into Ignition compatible xml file.

---

<div class="post-metadata">

**Author:** ![David.Reed.Schmidt](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@David.Reed.Schmidt](https://forum.inductiveautomation.com/u/David.Reed.Schmidt)\
**Post date:** [March 10, 2018, 10:09pm UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/17 "2018-03-10T22:09:19Z")

</div>

Its impossible if you dont try. The existing Ignition documentation provides everything an SI needs to accomplish the conversion. Once you dive into and succeed then this becomes an imporant part of your toolbag. A toolbag that gives you an advantage amongst your peers.

---

<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 11, 2018, 2:21am UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/18 "2018-03-11T02:21:14Z")

</div>

ok. I wil try and let you know. Thanks 🙂

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [March 11, 2018, 8:39am UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/19 "2018-03-11T08:39:16Z")

</div>

> [@R.Alamsha](#):
>
> But writing Jython script to import 100,000+ tags and alarms is NOT acceptable for me.

Script for importing 100 000 tags or script for importing 10 tags will be almost, if not the same...

---

<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 11, 2018, 11:11am UTC](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310/20 "2018-03-11T11:11:00Z")

</div>

> [@David.Reed.Schmidt](#):
>
> Once you dive into and succeed then this becomes an imporant part of your toolbag.

Compared to the top 3 SCADA vendors, one key thing missing in Ignition camp is, the support base has not spread beyond the primary IA domain. It's easy to find tools, tips and tricks for WW, FTV, WinCC in the internet. We can find a lot of tutorials, code snippets and project ideas from their user base and freelancers in social media. I am sure, some of them are hired by the respective vendor's marketing division.

There are excellent freelance tutors and programmers with a huge number of followers in Youtube, Udemy and social media. IA can hire few of them to spread the Ignition ecosystem.

[Next page](https://forum.inductiveautomation.com/t/mass-creation-of-tags-and-alarms-in-xml/17310.md?page=2)
