Now we have our interface instance is connecting to our data archive grabbing some tags connecting
to our data source our OPC server and getting the data it needs and sending it through
and saving that data in the PI data archive.
On the screen now we've got our two tags so we have our bearing temperature and status,
now we're going to make a whole lot more tags but we're not going to do it one by one with
system management tools we're going to use PI builder to do this. PI builder is a plug-in to
Microsoft Excel. Now usually when you're doing this in real life you will get an export from
the dcs or from the OPC server this will be a big spreadsheet with a huge list of tags.
Now we're going to take a look at what one of those might look like and then
convert that to a format that the PI data archive understands and then we're going to import them.
So let's minimize system management tools here, open up exercise files and tag export from dcs.
Now the export you get might have a whole lot more columns in this but this is a slightly
simplified example. But we see some column headers here all of the tags on the dcs side or item ids
a lot of the OPC servers will call them they have a description, unit of measure etc.
Now let's take a look at what the data archive calls all of these columns.
The easiest way to do that is import the tags that we already know work so let's make a new tab
and then go up here to PI builder. Make sure you've got PISRV01 selected
as your data archive and then click on PI points, find PI points.
We're going to expand out our search terms and then type in OPC as the point source
and search for all points with the point tools of OPC.
We've found two which we expect. Let's go okay.
Now we choose the columns we want to import now the golden rule here is
only import the columns that you need and nothing more. Any extra columns you import just
adds more complexity and there's more chances to make mistakes. So let's clear all and then
only import the columns that we changed when we were creating these tags in the first place.
So when we created these tags we edited the name which is required anyway,
the description, the engineering units, the digital stat for the digital tag,
point type, point source,
instrument tag, all of our location codes
and the data security. We got to add in another couple of columns here,
because I took a little sneak peek and in our OPC sheet we actually have a minimum and a maximum.
The PI data archives version of that is zero and span so we'll import those as well and okay.
So here we see what the PI system calls all of these columns.
So the exercise here is to look at what we've got in the OPC export and then try to massage this
until we get something that looks a little bit like what we need to import back into PI. So we
know these two tags work, we can copy and paste everything we need from one sheet to the other.
So here I’m going to quickly speed up the video
I’ll copy and paste everything that needs to be copied over and then we'll take a look.
Okay so I’ve copied and pasted over the columns where I think they fit. The descriptions
fairly straightforward, engineering units I copied and pasted over as well.
The point types there's something we need to fix in here in that I see the
tags that I have that already exist, I’ve got float32 and digital. The OPC server puts this
as integer we're actually going to change that to digital and we'll fill that down.
We also see we need a digital set. There we go I'll fill that down too.
Alright next up is the span and the zero, note that we had minimum and maximum in the
OPC export that's usually what you'll see in the PI data archive we have a zero and span.
Our zero means the same as minimum would in the OPC server
but span is actually the difference between the maximum and the minimum and everything else
looks pretty good, we just need to copy them down so we can fill in the point source
and we can fill in all of these location codes and data security.
We need our object type fill down and we need a selected fill down. Okay the next thing that I've
noticed is that we've got the bearing temperature of pump one here and we've got it duplicated here.
We've also got the status duplicated because we already have it existing and it existed
in our export so I'm just going to remove the rows that are duplicated
and there we go. The next thing to do is our tag names. So we've got the bearing temperature and
status here we're going to follow the same tag naming convention. When I copied over all of the
names from the other spreadsheet I didn't copy them into the name column I copied them into the
instrument tag column because the instrument tag is the name of the tag on the OPC server.
The name column will correspond to the name of the tag on the PI data archive which might be
different. The easiest way to move these over and change their naming convention is to copy them all
and then CTRL-F and replace sample process slash with nothing
and then slash with dot. Make sure you still have everything selected when you're doing these find
and replaces we don't want to replace the sample process or the slashes in our instrument tags.
Let's click up on the publish button.
So this will export our configuration from the spreadsheet up to the data archive.
We've got a few modes here, there's create and edit mode,
create only and edit only. I urge you to only use the create only and edit only
modes. Create an edit it's a trap, most of the time you don't want to both create new tags
and edit old tags in the same operation you just want to do one or the other.
Here we just want to create new tags we don't want to edit any alt tags
and ok we get an error that's actually expected I selected create only
and it says that pump one.bearingtemp already exists that's because we imported it. That's fine
I'm going to go continue there and our status also already exists, let's continue there as well.
Let's close this, let's open system management tools and see how they look and let's do a tag
search let's search for all tags with a point source of OPC and we see a lot more tags now.
Let's select all and okay all these look fantastic they're all getting data it's all good.
Now there's one thing that's irking me a little bit
we've got our pump one dot bearing tamper status here and the capitalization isn't the same
let's go and fix that. One thing with the PI data archive is you can edit tag names tags
are identified by unique identifier their name is just another attribute. One thing is your users
might be using the tag names explicitly in some of their displays and they may break but there's
nothing wrong with renaming a tag other than that. So we could rename the tag down in point builder
by finding it right clicking on it and renaming it or we can use Excel to do the same.
Let's go back to our tag export from dcs and let's clear the selected column. Deselect all,
now we're only going to perform an operation on the first two so let's put an x in those
then we're going to add a new column. If we just change the name here then the PI if we just change
the name here nothing will happen or the PI data archive will think we're making a new tag we don't
want that we can add in another column here called new name. Then we can capitalize these properly
and then we can publish. This time we don't want create only mode because we're editing tags,
we're not making new tags so we're going to change this to edit only and then okay.