Ignition OPC UA - Backup and Restore Tag Values

theColonel26

Lifetime Supporting Member
Join Date
Feb 2014
Location
West Michigan
Posts
785
I would like to be able to backup and restore the values of my opc tags. Ideally I'd like to store them as XML or JSON. I have tried the tag browser export feature, but it doesn't even export the OPCItemPath let alone the value. Not really sure what the point of that garbage is.


Any Idea?



My last resort is writing a python script but I am not a python guy, I'm a .Net guy, so umm, that is gonna take a while to get going, and I don't really have that kind of time.
 
..Not really sure what the point of that garbage is.

Any Idea?

You don't understand it, thus its garbage...nice.

If you want to save tag values, you'll have to to script it and build the file you want using functions like:

- system.tag.browse (to filter the tags you're interested in)
- system.tag.read (to read the values)

Alternatively, direct OPC
- system.opc.browse
- system.opc.read

Just write to a csv file, doesn't make sense do it in xml or json when a list of tag paths and values is all you are looking for, plus it would just be easier to quickly do what you want.

CSV file:
tagpath, tag value
tagfolder/Tag1, value1
tagFolder/Tag2, value2
...

The tag export/import features are for design/development and hold the tag configuration. Depending on the tag, attributes may or may not be included in a tag export. For instance udts, the udt definition many hold critical attribute information like the opc item path, the instance of the udt wouldn't need to contain it.

IMHO, including tag values in the tag export wouldn't be very wise.
 
Honestly, why is it the HMI/SCADA that should do the OPC value backup? As soon as you connect the OPC device they will be overwritten, no?

If you are a .NET guy then you should easily figure out Python. There's also the Internet! :)
 
You don't understand it, thus its garbage...nice.
The tag export/import features are for design/development and hold the tag configuration. Depending on the tag, attributes may or may not be included in a tag export. For instance udts, the udt definition many hold critical attribute information like the opc item path, the instance of the udt wouldn't need to contain it.

IMHO, including tag values in the tag export wouldn't be very wise.
No, I could understand this if I exported the Data Type definition, but I exported a tag instance. So I am not sure how it would even be useful with out the OPCItemPath. the OPCItemPath should be stored in the instance. Yes you can create a default one in the definition but that is only helpful for your fire instance.



And yes I do agree that exporting the values wouldn't be very wise if you only wanted Structure, but I would think this would be a common thing people would want to do for Setpoint etc so not having anyway to easily do it just seems odd.



If you want to save tag values, you'll have to to script it and build the file you want using functions like:

- system.tag.browse (to filter the tags you're interested in)
- system.tag.read (to read the values)

Alternatively, direct OPC
- system.opc.browse
- system.opc.read

Just write to a csv file, doesn't make sense do it in xml or json when a list of tag paths and values is all you are looking for, plus it would just be easier to quickly do what you want.

CSV file:
tagpath, tag value
tagfolder/Tag1, value1
tagFolder/Tag2, value2
...
Thank you I will give it a go. I'm brand new to Ignition. Should I assume the script editor has no Intelisense like feature at all, and it is basically like a textbox?

Honestly, why is it the HMI/SCADA that should do the OPC value backup? As soon as you connect the OPC device they will be overwritten, no?
Only if you don't do a write after you import them. OPC is not just for reading data. You can write as well.


Also I can't get ABs Tag Upload/Download tool to connect and Ignition is much nicer anyways.



I might try AB's again but I'm gonna try a script as Paullys50 suggested first.



If you are a .NET guy then you should easily figure out Python. There's also the Internet! :)
Oh I used write python scripts like 6 or 8 years ago. My point doing something like this is .net might take me an hour or two. In python it might take a couple days depending on how easy info is to find.



Time is money, if so I am about broke everyday.
 
I would post your request at https://ideas.inductiveautomation.com/. If enough people agree with you then they might act on it.

Also, if you haven't already, post on the Ignition forum. Perhaps someone already has something working.

If you don't like the RA upload/download utility then what about using Excel or create your own in .NET using Archie's driver? I have something I stole from RA that I could give you if interested. PM me if you want.
 

Similar Topics

Hardware: 5069-L320ERMS2 Software: Logix Designer 35.11 / Ignition 8.1 Issue: When attempting to write to the tag "HMI_DRV200_DynamicTrim" in...
Replies
5
Views
763
Can Ignition be used to serve historical data to a third-party historian client? The documentation says that Ignition can be used as an OPC UA...
Replies
3
Views
4,464
Hi I'm very new into this, but also very keen to learn new stuff. I'm currently practicing on a test setup with a few DI and DO's. I would like...
Replies
5
Views
3,698
Hi, I have questions. I have Analog Input that need to put into Ignition Designer. But I don't know how to put?
Replies
1
Views
119
Hey guys. We've been learning Ignition and going through all the courses on Inductive University. I really like the software and the things you...
Replies
20
Views
1,145
Back
Top Bottom