Tag creation methods

Hi there,

I’m just wondering how everyone else creates their tags, especially when they have large numbers? I’m talking about both your standard tags and your tags part of templates. I have just created a new template which is substantially large, at around 200 tags, and most of it I’ve created manually… I now have the task of going through each tag and applying scaling, engineering units, documentation, etc. where required, however such an arduous and boring task lends itself easily to distraction and mistakes which I don’t want to make, especially when I already have a table of these values already.

I wrote a somewhat crude Excel tool to do a basic job, but the setup of it is rather manual and it relies on copying and pasting an existing tag’s XML etc etc… It doesn’t handle multiple data types, it doesn’t import existing tags, and it doesn’t easily let you add properties like engineering units, scaling values, etc… It would need at least a day’s work to get it somewhere more useful. Is there something out already created there that I should be using?

In other SCADA systems I’ve always been able to simply fill out a table in Excel as a csv and then import it. XML, while it provides more structure and coding facilities, it’s quite difficult to use it for auto-generation of code without putting in the effort to code to the specific XML structure you’re working with…

Am I alone in this?

Nick

You can export and import to CSV in Ignition too, just change the file extension to *.csv when exporting the tags.

Then it’s easy enough to study the CSV format and use your regular Excel > CSV > SCADA method to import it.

If you need to alter tags, you can use the system.tag.editTag(s) functionality to loop through certain tags and edit them (it’s easy enough to make a temporary button and script this up, though best create a backup before you start, you never know what tags will be messed up if you make a mistake).

The issue with exporting to csv though is that it doesn’t export alarms, and wipes them away if you import a csv over the top.

I’ve used lots of different SCADA systems that all require different formats for importing tags. What i’ve found quite good as a general method to tag generation is using Excel macros to find and replace.
I’ll have a ‘reference’ XML in one sheet in excel, and code in changeable fields with some identifier, like %TagName%.
Then i’ll have a list of tags in another sheet, and loop through all of them and copy the reference cells somewhere else, do the find and replace, rinse and repeat.
Then i’ll be left with a different sheet with a bunch of tags in XML format that i can just import into Ignition.

1 Like

I use PHP to generate XML tag definitions in bulk. It’s a complete programming language disguised as a markup language template system. (-: PHP is a pain in the ass for general programming, but really good at generating XML.

1 Like

I’ve found that the “Tag Search” interface is quite good for mass editing tags. Search for a common property, select the tags from the table below (tip: use Ctrl+click for selecting non-contiguos tags), then select “Edit Tags” and from there you can modify whatever you want and it will be applied to all the selected tags.