Today I'll be using the Excel
add-in PI Builder to create, edit and delete PI Points
in bulk. Let's say
as a PI Admin I get an email like this that says,
Dear PI Admin, retire the PI Points from OPC interface 9
by appending their names with -retired
turning their scan flags off. And moving
them to point source old.
If I was using System Management Tools to do
that, I would come in and search using point source
OPC 9 and
I would click one and change each one individually
so let's retire
and change the point source to old. And the
archive tab turn scan off for saving.
If I have a lot of PI points to change
and a lot of changes to make for them, this can take a lot of time. But there is a better way.
Here in Excel, I'll use PI Builder
and after making sure
my data archive is in this data server field,
I can import my PI Points using this
retrieve button. And then expanding
this search window, I can search
for all the points that have a point source of
OPC 9.
Once I choose which
points I want to import, I can choose which attributes
of those points to import.
I want to import the point source attribute so I can change it to old.
I need a new name column so I can rename these points.
And I'll also need the scan attribute
so I can turn it to 0.
Any column that isn't imported will remain
unchanged.
So here now that I've imported my points, let's turn their scans to
0. And the point sources
to old.
Now here in this new
name column I can use an Excel function called
concatenate to concatenate
my name column
with -retired
And now once I'm satisfied with all of my changes, I'll click publish
using the edit mode. If my Windows account
wasn't a PI admin I'd get an error
here but I am. Let's go see the changes in System Management
Tools.
Now here after refreshing
we can see that the point source is now old.
All of my tag names are different and the scan flags are
turned off.
Now if I was tasked with deleting the retired
points instead of just renaming them, changing the point source
and turning the scan off, I could use System Management Tools
but we can also do that all at once in PI Builder.
So let's go down and search for our points again.
This time
I have to use the point source old
and I can see that there is a couple more
retired points here. So I'll hit OK.
And this time it doesn't matter what I import
because I'm just going to delete the points.
What I want to do is hit this delete
button. But since you can't get any of the time series data
back once you've deleted a point, we've disabled the button by default.
To enable it we'll click on
settings and then this allow delete flag.
At this point much like publish I'll click delete.
And because deleting a PI Point is
permanent it warns me again so I'll hit yes.
Now trying to
search for Point Source old again
I can zero hits.
So it's a successful delete.
Let's go back and turn the delete button off again.
Now that we've changed and
deleted points, let's say we get an email like this that's
asking us to create points. Please create tags for the
following instrument tags using Point Source OPC 10.
And then it has a list of instrument tags.
Let's go ahead and copy this.
And make a new sheet. Because I'm
creating PI Points from scratch, let's go choose some headers.
I'll still need Point Source,
I won't need new name anymore.
I won't need scan anymore.
Under classic I will need instrument
tag. And I'll hit OK.
When I create these points, anything that I don't
specify will set to the default.
So I'll paste my instrument
tags in the instrument tag column
but I'll also paste them in the name column. And this is because
I can use Excel's function find replace by hitting
control H and here I'll make my PI Point names a
little more human friendly by replacing the
aa with airy
alps. And
replacing any slashes with spaces.
These are going to be
PI Points. And they are
going to be using Point Source OPC 10.
The last thing to do is select all my rows by making sure
there is an X in every row.
And once I'm happy with my
points, I'll publish them using the create only mode.
Now that I've created my points,
let's go look
for anything with Point Source
OPC 10.
Here we are with all
default attributes except for my instrument
tag which I specified.
In the next video instead of PI Points, I'll create,
edit and delete AF objects.