When you install PI BatchView
one of the things you get in the installation
is an add-in to Microsoft Excel, and
when you install it, it appears in a menu
that's labeled PI. If you happen to have PI
DataLink also installed, the
Batch Search functionality will be incorporated within
that same menu. So, it, it sort of looks like
they belong together. And they do actually belong together but they do not
have any dependency on one another. You can
have PI BatchView installed without having PI DataLink
installed.
There's no reason to go over the BatchView for
Excel Search functionality. It's the same,
it's the same Search functionality that's found
in the BatchView Quick Search and the add-in to
ProcessBook, and so, if you need some
instruction on how to use that, please see the earlier sections
on how to Search for Batches.
There are some settings that are unique
to the BatchView for Excel Option, and
some of them are very similar to the
Results Panel in ProcessBook in the
add-in where you can see the available columns
and you can add them to the selected columns.
These are the columns that are going to appear in your spreadsheet
when you perform a Query.
The BatchView for Excel, just like
the other BatchView products that we have, uses Custom Name Sets,
and the one thing that is unique
to the BatchView for Excel add-in,
is the hierarchy in the Levels shown. And, you can choose
what Level to show, and you can choose
whether to differentiate, or delineate,
those Levels either using an indentation --
using separate columns or formatting -- or you can
shoo -- choose to delineate these columns by using
Excel Groupings. And, they are not mutually exclusive.
Here's an example of some
column configurations. We have got Batch ID, Start Time, End Time,
Duration, Product, Procedure, and PI Server.
And those are shown in that order on the
spreadsheet when the results are returned. Here's an
example of a hierarchy where, in Section 1,
or in Screenshot 1, we simply shown an
example of data returned that
was just Single Level, just
getting the UnitBatch Level. And then we have
the second spreadsheet here -- second shot --
where we are showing things based on Indentation.
And the third thing we are showing is based on
separate columns and Excel Groupings.
So, you have got a lot of visual choices,
a lot of visual options, to
display your data.
Let's take a quick look at some of the visualization options
that we have in PI BatchView
for the Excel add-in.
I have opened up an Excel spreadsheet, and I am going to select add-ins
and PI Batch Search.
And, I am going to use
my Digesters
that we had earlier --
Digester1. And
let's go back, let's go back four hours.
And if we perform that kind of Query,
we get the results that we expect to get in the
Preview Window at the bottom of the Search Panel. And, when I click
OK, those results are simply
exported out to the spreadsheet. So you can see
I have got a very basic report with a count
of five, five line items, five UnitBatches.
Well, if I want to add some detail to that,
I can right-click and then select Batch Search.
That will bring up the Dialog Box
as it appeared originally. I can go into Settings,
and let's say I want to show down to two Sub-batch
Levels. I click OK.
And what you will see is that, instead of just a
UnitBatch Lever -- Layer, I have all of my Layers.
However, this gets
a little bit difficult because, you see, we have got one
line item here for our UnitBatch and then we
scroll down and we can see our next UnitBatch starts here,
but that does not really give us a good, a
good feeling for what's sort of under what
in terms of hierarchy. So,
I am going to right click on the Data Array and select
Batch Search again.
And I have the choice of either
showing Levels using indentation
by either separate columns or formatting cells.
Separate columns is a nice way to do it because
what you get is a separate column
for each Level. So, you can see here that I have got Batch
ID, Sub --PISubBatch, and
PISubBatch. So, every level of SubBatch gets
its own column. I can very easily see
the delineation between the layers and
hierarchical in this column. And, finally,
I want to show you just about adding Excel
Groupings. This is a, a feature of Excel. it's not necessarily
our product. We are just using an Excel product.
And this allows us to put
the traditional Expand and
Collapse Layers into
the, into the margins. So, this
allows us to use the Excel Grouping Function
in order to see the data that we wanted to see.
BatchView becomes especially powerful
when you connect or link it
to -- link its usage to PIDataLink.
Here's an example where I have got
all of my purple columns -- that's all
BatchView Query Data -- and my PI DataLink --
that's all PI DataLink Query Data -- and you can see that
I am using my Start Time and End Time of
each UnitBatch run as a
basis to do a calculation. In this case, I am looking
at the Average and Maximum Values for
a specific, specific variable.
In this case, it looks like it's the Temperature
Tag. So, I am combining a BatchView
Query with a DataLink calculation
and returning results that, that have a,
a symbiotic relationship with one
another. Most often, you are
going to want to use the Calculated Data Function in DataLink and the
Calculated Data Function retrieves things like Minimums,
Maximums, Averages, Totalizations, things
like that. And the Calculated Data Function
becomes very powerful when it's used with Batch
Data. And most of the time with Batch Data, it's used to retrieve the
Start Time and the End Time.
You will see something called a Conversion Factor. And, a Conversion
Factor is only used when you are dealing with
Totals, and it's because the PI Server does not keep
Unit of Measure. So, we have to
use the Conversion Factor when the Unit that you are
measuring is anything other than Units Per Day.
Because we do not keep Unit of Measure in the PI System, we assume Units
Per Day. So, if you are doing a Totalization -- and
remember this is only for Totalization -- when you are doing a
Totalization and your device is
measuring, say, Gallons Per Minute or
Cubic Meters Per Minute, you will need to
use a Conversion Factor of 1440 because your
Units are Units Per Minute. Of course,
if you are -- are measuring in Units Per Day, then your Conversion
Factor remains one.
Also, you can use Aliases to
get data. We can use Aliases to resolve the Tag Names
through the PI DataLink Alias Function
as well. So, you can combine Module
Relative Displays and Reports with
BatchView to come up with some very powerful
visualizations.
Let's use a quick example of combining a
BatchView Query with a PI DataLink Query.
I am going to go into my Add-ins, PI Batch
Search, and I am going to use my
traditional Digester 1.
And I am going to go back --
let's go back eight hours.
Err, maybe four hours.
But I want to, I want to narrow this
down. I want to, I want to only get a
certain value. I want to find out what the
Maximum Temperature of
my Temperature Tag was -- my Temperature Alias was --
for the sulfate cooking phase. So, to do that,
I am going to go to my Advanced Search, and I have my
PIUnitBatch criteria correct, but I want to
add to the SubBatch criteria
the sulfate cooking
attribute, and
once I do that, then, I have my criteria
correct. But, I want to change my settings. I do not want
all of these columns. In fact,
I do not need PI Server. I do not need Procedure. I do not need
Unit Name or Product. All I want is the ID,
Start Time and End Time. And, I will need to go to
one SubBatch Level and I do want to show my
Levels of Indentation. So,
what I end of with is a --
is results that look like this where I have my sulfate cooking phases
shown. And I want to find out what the Maximum Value
for the Temperature Tag was there. So,
the first thing I need to do is I need to
figure out what the Tag Name is because, to
get the Max Value, I am going to need a Tag Name.
So, the Alias I want to use
is Temperature, and so, I will put Temperature up
there. And, what I am going to do is resolve
that in the field below it
using the DataLink Function Alias. So, I will select
the Alias Function. And what I
want to pick is the Alias and the Module
Path. I do not have it displayed on the, on the spreadsheet.
So, I am going to simply Search for it.
And, if you remember, this was my
Digester 1. So, I can just come down
here until I find Digester 1.
Oops. Click OK, and then OK.
And I can see that I have resolved to my Tag
PP.Digest1.Temp. And so,
if I want to find out what the Maximum Value was
for that, I can do
Max Temp. And for my Sulfate
Cooking Phase, I can use my PI
DataLink Calculated Data Function.
My Tag Name is going to be my
Digest1.Temp Tag. My Start Time is going
to be my Start Time of the Sulfate Cooking Phase, and my End
Time is going to be the End Time of that Phase. And the
Calc Mode that I want is
Maximum. And I do want to, I do want to show
the Max Time for that. So, you can see
that if I
just highlight these particular fields here,
you can see that between
the 12:46 and about
one o'clock -- about a minute after one o'clock -- the Maximum
Temperature reached was 163.915.
And, that was reached at 12:49.
So, not very long
into the start of that Phase, that Maximum Temperature was
reached. So you can see that I have got
one area of my spreadsheet
using PI BatchView Query,
and another area of my spreadsheet using PI DataLink Query.
And so, I have combined them to create a report
of my Batches over the last four hours, and the
Max Temperature. And, I could simply repeat this
down through the other Sulfate Cooking Boxes.