In this video, I'll be showing you
how to create PI points for the PI Interface
for OPC DA. So just a quick side note before we
begin, you might've heard the term PI tag instead of PI point.
These mean exactly the same thing in the PI System.
I'll be using the term PI point throughout the video.
So right now we are at the point
where we have created our new PI Interface
instance and this instance is now running. Here we now have our
PI message log open and we can see from this PI message
log that no PI points have been created
for our PI Interface yet. So I'm
going to show you two ways to do this. The
first will be how to create a single PI point using PI System Management
Tools. But before I begin,
of course I need to bring up security again. We need to make sure
that the user that will be creating the PI points
has write access to the PIPOINT table.
So to start, first we need to choose
which data we'll be collecting. So we need
to go back to our PI OPC Client Tool.
So I need to
connect to my OPC server
and create a group. And these are
all the same methods that I showed you in the previous
video on how to check your OPC server using the
PI OPC Client Tool. So now I'll browse
my OPC server and find
the item that I want to collect data for.
I'll add this to my group and hit OK.
And here is what I need to create
my PI point. I need to know the type
and the item ID of my OPC item.
So make sure to take a screen shot here
or to write this down. So now I can close
this. And I also need to remember
what my point source and my interface ID
were for my new PI Interface
instance. OK, so now we are ready to go to
PI System Management Tools.
You need to go into points and point
builder in order to create a new
PI point. The first thing to choose is the
name. Most PI System administrators
have a naming convention that they follow when they create PI points.
So for example the name of a plant. The name of the
unit. And the name of the
attribute.
Next, I need to change the point source to
the correct source. So
if you remember, my point source is
GBX.
Finally, I need to make sure that this point type is
compatible with the data type that's on the
OPC server. The PI Interface for
PI OPC DA user guide has a section that
explains specifically which data types on the OPC
server will be compatible with which
data types on the PI Data Archive. So if you'll remember,
my data type is VT_IF4.
Which means a 4 byte integer.
This corresponds to
int32 on the PI Data Archive.
OK, so these are all of the things that I
need on the general tab. But I might want to fill in
a couple more things just as best practice.
The first is the descriptor. So I want to give
my users a bit more context when
they are reading this PI point.
I also want to put in my engineering
units. So this again will
give my users context, they'll know what my value
means.
Finally, I can
also change the display digits.
This is the parameter that controls how numerical
values are displayed in our PI clients.
A negative number means that's the number of the significant
digits that will be displayed. Whereas a positive
number means this is the number of digits that will be
shown after a decimal. So in my
case, I'm going to change this to three significant
digits which is minus three.
OK, so now I'm ready to go to
the Archive tab.
So this is where all of the
parameters that are important for archiving are
set. The most important here are exception and compression
parameters. You won't want to
leave this as default. So if you need information
on how to choose these, please check out
the OSIsoft Exception and Compression Full Details
video on the OSIsoft channel. You can
also find more information on all of these parameters,
in the PI Data Archive System Management
Guide. OK, so now we are ready to go to the
Classic tab.
So these are all of the most important
parameters for when we are configuring a PI point for the
PI Interface for OPC DA. So let me
open up the user guide.
So you'll find details on all of these
parameters in the "Configure PI points
for the PI OPC DA Interface" section right here.
So make sure to refer to this guide
if you have any questions.
OK, so the
first thing I'll want to put in is the instrument
tag. This needs to correspond
to the OPC item ID that I told you about
earlier. So this is how my PI Interface for
PI OPC DA is going to be able to find my item on the OPC
server. So if you'll
remember, ours was
numeric, random and 32.
OK, the next thing
I need to put in is location 1. This
needs to correspond to the interface ID of my
PI Interface instance. So if you'll remember,
this was 1.
Next, I need to choose location 2.
Location 2 is reserved for
special data handling between the OPC
server and the PI Data Archive. If some transformation needs to be
done, it needs to be specified here. So
again, please check out the PI Interface
for OPC DA User Guide for more information.
I'm not going to use any special data handling,
so I'll leave it at 0. Next, I need
to choose location 3. This is really important because
this specifies whether I'm creating an
input point, so data collected from the OPC
server going to the PI Data Archive. Or an
output point. An output point means
having data from the PI Data Archive that I'm
sending to my OPC server. So clearly I
want to collect data from my OPC server, so
I'm creating an input point. There are three
types of input points that you can create for the PI
Interface for OPC DA. You can create an advise
point, a polled point and an
event point. If you need more information on
what the differences between those three, please check out the video on
advise, polled and event points.
I know that advise points are the most
common and are the best choice for most
scenarios. So I'm going to choose the location 3
of 1 to create an advise point. If you wanted to
create a polled or event point, you would choose location
3, 0. For an event point, you'd also have to go
to the general tab and change the extended
descriptor to identify what your
trigger tag would be.
So again, if you need more information,
check out the PI Interface for OPC DA User Guide.
OK, so location 4
is where I'm going to specify which
scan class my PI point belongs to.
Again, remember the rules which are only
advise points can go into scan class 1. And
also, never mix endput points
of different types in the same scan class. For example, you
can never put hold and advise points in the same scan
class. So since my input point is
advise, I can choose location
4 of 1.
So now location 5. This is to specify
an OPC deadband for advise points.
So this is to make sure, let's say that I don't want to
collect very small changes on the data
source. So in my case, I'm
not going to set that. So I'm going to leave it
at 0. OK, so that's everything
on the classic tab. Now I can
change it to the security tab.
So here is where I choose
for point security, who has access to
see my PI point on the PI Data Archive.
And for data security, who has access to the data in the
PI point. So we need to make sure here that
my PIInterface's identity
has read access to the PI point so that it can find it
when it's in the PI Data Archive. So it does have read access,
so we are good.
For data security, we need to make sure that the PI
Interface's identify has write access,
so that it will be able to write to my data.
So this I'm going to have to change it from read to
write. And another important point here
is that this is.. I'm
at the point here where I haven't
configured buffering. Once you configure
buffering, it'll be your PI Buffer Subsystem that will
be writing to your data in the PI point.
So I have to change this from the PI
Interface, to the PI Buffering identity.
OK, so
that's everything. So now I can go ahead and
click save.
Now I want to make sure that my
PI point is properly picked up by
my PI Interface instance. So I need to go back to my PI
Interface node and I'm going to be watching my
PI SDK log. Please
note that it might take up to two minutes for your
PI Interface to pick up the new PI point from the PI Data
Archive.
Alright, so it looks like it picked up my
PI point.
So let's go back to
PI System Management Tools to see if we are getting
current data. So for that, we want to go under
data and current values and we want to
search for our PI point.
Perfect.
So we actually see here that we are getting
current data for our PI point. OK, so I'm now
going to quickly show you the second way that
you can create PI points. We are going to be creating them
in bulk, using the PI OPC
Client Tool. So let's go back to our PI Interface node
and start up the PI OPC client
Tool. We'll connect to our
OPC server.
Create a group. And
browse our OPC server.
Now this time we are going to select as many
items as we want to create on our
PI Data Archive. So here I'm just going to be
selecting a few items but you can
actually select up to 500 items
per group and up to 20 groups.
So once you've created your groups and added your items,
you want to go to file, and
save as. This will bring up this window.
And here when we save, we are going to be creating a
.bat file and a .csv file. We are interested
in the .csv file since this will contain all the information that
we need to create the PI points. But we
need to select a location for both of these.
So we need to his the ellipses
button.
Once we do this,
we should also change the point source to match the
point source of our PI Interface
instance.
OK, and when we are
ready, we'll go ahead and hit save.
Now I'm going to open up this .csv
file in Excel where PI Builder has been enabled.
So we
see here that my PI OPC Client Tool
has generated a .csv file that contains
all the items that I selected with all the appropriate
parameters that I need to be able to export this in
bulk. So I'm going to be using PI Builder
to create my PI points in bulk.
We can see that a lot of the
parameters were filled in automatically and they were
filled in correctly. So for example, all the point types
were filled in correctly and the data handling that those
need. We also have the
correct point source and we have the current
instrument tags. But
there are some things that we might need to change here.
So for example, your tag names might be correct on your OPC
server, but you also need to modify them. So
that's what I'm going to do since my tag names don't represent
what I want to collect.
OK,
next I also need to change location 3
and 4. As you'll remember, location 3 is for the type of input
point. And location 4 is the scan
class. So I want advise points in scan class 1, so
I'll change everything in this column
to 1 and everything in this column to 1.
Perfect.
And so for all the parameters that
aren't listed here, the default will be
selected. So if you'll remember, we had to
change the default data security on the tag that we created in PI SMT.
So let me import that one in a
separate sheet.
So what I
can do is copy over the data
security from this sheet
into my tag list.
And then apply this to
every single item in my column.
Perfect.
So now I'm ready to export this list and this should
create the PI points on the PI Data Archive.
So I'll go ahead and hit publish
and select create.
Alright
perfect. So now we can go back once again to our
PI Interface to see if the PI points have been picked up.
OK, the PI points have been picked up.
So I can go to PI System Management Tools.
And search
for my PI
points.
So now I can see that I'm getting current data for all of the
PI points that I created.