Here we will see how to use PI
DataLink to build reports based off of event
frames with the events
explore function that was added to PI
DataLink starting with PI DataLink 2014.
Event frames which are also
known as events allow you to mark and track important
time periods that represent something
happening and impacting your business
operations. For example, downtimes,
startups, shutdowns, different stages of a
process, environmental excursions,
these are all events. With the PI system,
you can track them so they have a name, a
start time, end time, and capture any
related information that is useful for analysis.
Event frames are not setup in
PI DataLink but PI DataLink can be used
as a visualization tool. Here I am looking
at a spreadsheet in
Excel that is used to look at
downtime events for a packaging company.
And this uses the
explore option in PI DataLink and makes it
really easy to see
for the specified time period, what were
some of the main reasons for the downtimes? Which
pieces of equipment were more likely to be
affected? And I get a list
which is populating these charts, of all the different
downtime events that were experienced and
it makes it really easy to see how individual downtime
events really impacted the overall
line average production.
Let us take a look at how we
can build such a report.
As you build a report
based off of event frames in Excel using PI
DataLink, the first question that you are going to need
to ask is which time period
should we search for events? In this
case, I am going to be using cell references
to keep my spreadsheet as robust as
possible so I can make changes
really easily. And I am going to be using this
search criteria going from a
start time of an hour ago to an end
time of now using these PI time references.
The other thing I will need to do is
I will just go ahead and decide where I am going to output my
event list to and I will select B5
before I go ahead and
hit explore.
This brings up
the menu on the right and
for the search start, I could
specify that here. But if I want to use the
cell references, I will clear this out and make
sure my cursor is selected and then pick the
specific cell that matches the start time that I am
interested in. So this one, C2.
And you can see that this is just
adding C2 to the search
start in an Excel format. I will do the same thing
for the search end, clear this out, have my cursor
here and then select the end time that I am interested in.
I will leave everything else
as is and you will notice that
that first cell I selected, B5, automatically
gets added as the output cell. So
wherever you click before you click the explore function,
the same with all of the other PI DataLink
functions, that is going to by default be the output
cell. Though if you need to change it, just change it right here.
I am good with this output so I will go ahead and
hit OK.
And as you can see, this
has brought in a list of events that fit that
time criteria. And as I look at these
events, you can see some of these do not have an
end time and duration reported back.
And this depends on whether
the event frame ever ended. In this case,
these events are still active. You can see that they started a long
time ago, this equipment has clearly been down for a long time.
So if you want to
filter how the
events are reported for that time period,
we can do the search mode. For instance, if I only want to look at
events that entirely were in the last
hour, that is a choice that I can make.
To bring up the options again, I am
just going to click on the array with a left click. And
if you have got the popup enabled, you will see that here.
And under more search options,
right here, I
will expand this and you can see
that the particular way I would modify this is
using the search mode. And I can indeed
do a cell reference for that. Right now I am just
going to do entirely in range and hit OK.
So you can see that has now reduced our
event list and now I will have an
end time and duration as expected.
So this is returning all of the
events that occurred during the time period.
The next question that you need to start asking yourself is
what type of events should we return?
I want to stay focused on the
equipment downtime events and I can do
additional filtering off of the event name and
event template. So let me go ahead and
build some cell references for that.
So for the event name, I know that there is
equipment in the name for the equipment downtimes
so I will use *equipment*
some wild cards to get that.
And then for the event template,
that is my downtime for the event
template. And let me go
ahead and once again filter down further.
So for the event name,
add that cell reference and I will click on this
option, this icon right
here for event template. And then I am going
to select event template.
So these are the events
that I am focusing on. You may want to restrict your
event list even further, say by
specific types of assets. Or
even an attribute that you are particularly
interested in looking at.
So for an example,
let me go ahead and concentrate on a
specific piece of equipment
that is having a downtime due to a very specific fault code.
And you can see that the
fault codes for the different downtime
events, some examples of what could be causing it are listed here
in the previous event list that we returned.
So I am going to focus
on the box packer.
And bring up the options again.
So the element name
but actually I have that built off of a template.
So I will
select that. And
then the really exciting thing is I can do even
more filtering off of the attributes using these
attribute value filters. I am going to
look at all of the ones where the fault
code equals..
let's do... product
misfeeds.
And I will need to select an operator as
well. And that is equals.
And I will go ahead and hit OK.
And you can
see that I have only returned one
event and this is because there has only been one
downtime event for our box packer due to
a product misfeed.
Now all of this time we have been focusing on
determining which events we are going to bring in.
We have looked at for what time period,
what type of event, which assets, even for
which assets that have a particular attribute
value. The final consideration is
really what do we want to show
in the event list that gets reported here
and how do we want that information to be presented?
Let me switch back to
looking at all of the different pieces of
equipment rather than just the box packer which is
an easy switch with my cell reference here. And if you
see this "resize to show all
values," you will just need to do a
right click and do recalculate (resize) function.
And I have
the explore
events options back up here.
And this very last section
and these are the columns
that are selecting which information about the event that we want to present.
By default,
this list is going to include the virtual
attributes that are generated for all events- things like the
start time and end time as well as
all of the event frame
template attributes.
So let me make some selections here.
The event name is not something that I am
particularly interested in showing
because I am going to be including the
primary element, that is the element that is affected,
so I will move that up. I will have the start time and
duration and the event template.
So that will represent that it is a downtime for me.
And I am going to look to
see if there is anything else that I want to show.
I am going
to not want to show the
status either. And these are all just
selections that you can make for which columns to display.
And if you want the columns to be sorted in a
particular way, that is something that you can
choose. For more search
options, there is this start order. In this
case, mine are being ordered with
start time as ending. Again, this is another
option that can be changed.
So I will go ahead and hit OK and
look at how the columns now
represent my choices.
As you can see, there is a lot of great
functionality for building these specific reports that
help you track or report
off of your events using the PI DataLink
explore function. And you may be wondering to
yourself, we have been spending all of this time focusing
on explore, when would it
make sense to use compare. And the
difference between explore and compare really comes
down to if you have child event frames.
If you do not have child event frames,
just use explore. And in the next video, we are going to be
looking at use cases where there are child
events and the differences between using
explore and compare.