Project Goal
Log the timestamp, tag name and tag value when tag value alternates between 0 and 1 to our SQL database. We are estimating total 40,000 tags (80 machines and each machine has 500 tags). The methods we are aware of for consideration are Alarm Journaling, Transaction Groups, Tag Change Scripts. Any other suggestions and how do they compare with these three methods?
Tags and Structure
In our plant, we have 80 machines, each with 500 tags connected to our server. The above picture shows an example machine called Inline 225. We created 2 folders – Alarm Names (to hold the name of the alarm or tag) and Alarms (to hold the value of the alarm or tag). For example – one of the tags is called Bottom Guide is Missing. The name of this tag is “Bottom Guide is Missing”. The value of this tag is either 0 or 1. We want to log to SQL only when the value changes. Similarly, you can see other tags such as Coin Feed Not in, Coin Feed not out, etc. So we will be having 500 such tags for the machine Inline 225. Most of these tags will have default value 0. At any time, the most tags that will have value 1 will be 5 to 10.
We want the below end result. All the 40,000 tags will go into 1 SQL table with the values as shown.
We did few of the tags manually as detailed below.
We first created tags manually in ignition tag browser. Below is the OPC tag to hold the value
For the same above OPC tag we also created a memory tag to hold the name of the tag.
Then we added both the above 2 tags in 1 transaction group along with Line_name (which is another memory tag to represent the machine name). See below picture
Our question is how to do the above task more efficiently. Based on our research we think we need to follow the below steps, but we want to confirm if this is the best approach.
Creating Tags
- We will create a JSON file with tag structure
- Then import the JSON file into the tag browser.
Creating Transactions Groups
- We will export an example transaction group (that we created manually before) using the Shift key and Legacy Export to provide the structure for the next step
- We will update the exported XML file
- We will then import back into Ignition transaction groups.
So, with the above approach we will end up with 40,000 tags and 40,000 transaction groups. The good thing is all data is logged into 1 SQL table, so it is easier for us to do subsequent data analytics.
Question
Is there anything that hasn’t been mentioned for consideration above, in regards to the best method for this project?