In this video I
will be explaining the different types of PI points that you can create for the PI
Interface for OPC DA. Depending on the type of
PI point you create, your PI Interface
for OPC DA is going to interact differently with the OPC
server. So it's important to know the different options you have for
PI points and how these different PI points work.
Just as a quick side note, you might've heard
the term PI tag used instead of PI point.
These mean exactly the same thing in the
PI System. So throughout this video,
I'll be using the term PI point.
So there are two main types of PI points that you can
create, that's input points and output
points. And if you are creating an input point,
there are three different types of input points that you can create --
advise, polled, or event
PI points. So first I'm going to explain the
difference between input and output points.
So here we have an OPC server and a
PI Data Archive. Our OPC server has various
OPC items and our PI Data Archive
has an input point and an output point.
So input points are basically what you would expect for the PI
Interface for OPC DA. You've got a data source
that's feeding a value into your OPC item and your
PI Interface for OPC DA is responsible for
sending that value into the data for your input
point. However, you can also have an output
point where your output point is
getting a value from another different data
source on your PI Data Archive. And then
the value is then sent to the OPC
item by the PI Interface for OPC
DA. So you wouldn't really typically
expect output points, mainly we use the PI
Interface for OPC DA to collect data from the
OPC server. But it does happen that you might want
to send data to the OPC server. So you can use the PI
Interface for OPC DA for that as well. OK, so
now that we know the different between input and output
points, we can explain the different types of input points
that you can create.
So here we have a
PI Data Archive, a PI Interface for
OPC DA, an OPC server
and a data source. So by now you are pretty
familiar with these concepts. One thing I want to
explain is the OPC server cache.
Basically what that is, is a
table that the OPC server keeps the most
recent values that it has obtained from the
data source.
OK, so we know that when the PI
Interface for OPC DA starts, it scans the PI Data
Archive for PI points belonging to its different
scan classes. And those scan classes are basically
turned into OPC groups and the PI
Interface for OPC DA makes requests to the
OPC server for those different groups.
So let's say for the first
scan class, the PI Interface for OPC DA finds an
advise point. So for this OPC group,
it's going to make a request to the
OPC server to send it the cache value whenever the
cache value changes. This is kind of like signing up for
updates on the cache value. So this first
value of 50 gets sent to the advise
point. And then after an arbitrary
amount of time, the data source value might be
updated and that will update the cache value. So when this new cache
value comes in, this will get sent to the PI
Interface for OPC DA which will then send it
to the advise
point. After another arbitrary amount of
time, if the data source updates, then the cache value will
update and once again our advise point will get a new
value. So you can see that this is a really efficient
way of getting data from the OPC
server because our PI Interface for PI OPC
DA made a single request to the OPC server.
And it's obtaining all the values that are coming into the
cache that are new. You might be wondering at this point
what's the point of the five
seconds for the scan class? So this is just a way
for the PI Interface for OPC DA to
limit itself for how many values it's
sending to the PI Data Archive. It basically means that the PI
Interface won't send more than one value every five seconds.
OK, so let's say for
this second scan class that the PI Interface for
OPC DA finds a polled point. So for
this OPC group, it's going to make a
request every 10 seconds for the cache
value on the OPC server. So the first
cache value here is .73 and that's going to get
sent to the polled point. So let's
say 10 seconds later, the PI Interface for OPC DA
makes an new request. But the cache value
hasn't changed. So this
0.73 is again going to get sent to the polled point.
10 seconds later, there is
still no change so those .73 is going to
get sent to the polled point.
Finally within the next 10 seconds, let's say there is an
update on the date source and this updates the
cache. So the next time that the PI Interface for
OPC DA sends a request to the
OPC server, it's going to get sent this new
value.
So you can see here there is a lot of
traffic between the PI Interface for OPC DA and the OPC
DA server because the PI Interface for OPC DA
needs to keep making these requests every 10
seconds. And you can also see that there are a lot of
repetitive
values in the PI Data Archive.
In most scenarios, advise points
are much better to use than polled points. You only
ever want to use polled points if you absolutely need a
value at every scanned frequency, so in
this case, every 10 seconds. Alright,
so let's say for the last scan class, the PI Interface
for OPC DA finds an event point.
And so the pioneer phase isn't going to do anything yet,
because for every event point, there is a trigger point that
gets defined. And so it's only when this trigger point gets a
new value, that the PI Interface for OPC
DA is going to make a request to the OPC server.
And it's going to ask for it to scan the device
directly for a new value. So it's
going to bypass the cache and actually make a
scan directly on the data source. And this value is going to be sent to the event
point. So this is really for special
cases when you really want a PI point that's only
getting values when another PI point on your
PI Data Archive is getting a new value.
OK, so now that
we know the difference between the three types of
input points, let's look at some rules.
So the first rule is that the location
3 parameter of your PI point is going to
determine the PI point type. A value of
0 means a polled or event point.
A value of 1 means an advise point. And a
value of 2 is an output point.
The second rule is that location 4 determines
the scan class of your PI point.
The third rule is
that only advise points can go into scan class 1
because it's reserved for advise points.
Finally, a really important
rule to follow is to never mix different types of PI points in
the same scan class. For example, don't mix polled
and advise points in the same scan class. Because
remember, these scan classes are OPC
server groups. So if your pioneer
phase is requesting data for different types of PI points,
it doesn't know what kind of request to make if there are different types of
PI points in the same scan
class. OK, I hope that explanation
was clear. And in the next video, I'll show you how to
create these PI points on the PI data archive.