Datasets generally follow the rule
that you create the Dataset, and then you use it in
an Element. So, let's look at the first step in this
and let's create a Dataset. Select
Tools and Datasets, and you can see
that I have no Datasets to find. This is my
CBT Workbook, so I do not have anything in here.
I will select New and PI
Calculation. And the PI Calculation
Data Dialog Box will allow me to
configure a PI Calculation
Dataset. We are going to start with a very simple one.
I am going to call this CDT_
CALCS.
Description is optional. You may or may not
use it. It, it's up to you. And then,
what I need to do down at the bottom is to enter
a tag. I am going to use the Tag Search Dialog Box
and select my CDT158 Tag.
Now, you will notice that it does put
the single quotation
mark before and after the Tag
Name. If you were to simply type a Tag Name in here,
you would have to make sure that you had those
tic marks, or single quotes,
in there, or the Expression or Tag Name will
not be picked up correctly. If you select a
Stepped Plot, that will force ProcessBook
to show you the results in a stair-step manner.
If you select, if you uncheck this, we will
interpolate between the Values, the Calculation
Results. People usually, with Calculations,
like to retain a stepped plot. And the Refresh General
Rule is primarily used if you have non-PI
data that you are using exclusively. Because
we have a PI Tag in here, ProcessBook will know to
update, update that as often
as it would a regular Tag Value.
Now, we come down to Interval and Sync Time.
For, for right now I am just going to use a single Tag Name in the [inaudible]
Expression. And the Interval is used
to tell the system how often
to do the calculation. And the default
is ten minutes but you could use one hour, you could use
two hours, you could use two minutes, you could use two days --
whatever interval suits your needs. And,
combine that with the Sync Time if you have a specific time
in which you want to do the calculation. One
of the reasons you might use Sync Time is that
you are basing this calculation on
another calculation that runs, maybe, every hour,
and so, in this case -- in that case, you would alter the
sync time for this calculation by maybe
one minute to make sure the other calculation has
had time to complete. Or, maybe your interval
is one day, and you want the calculation
to run at the end of each shift. And so, you might
set the sync, sync time to something like
7:00 a.m -- or seven hours,
and the Interval would be in eight hours.
So, we would run the calculation every eight hours
with the Synchronization Time of seven
hours after midnight. So, we would get the calc -- first
calculation at 7:00 A.M and hours after that
and so -- or eight hours -- and so forth. Or you might
have an interval of one day, and you want to do the calculation
every day at midnight, so you'd leave the Sync Time of zero.
And that's all you need to do
to create the basic PI Calculation Dataset. At
a very minimum you need a tag,
an interval, and a sync time,
and the system will perform
the standard calculations for you. So I will click OK
for this, and close, and
in the next segment we will learn how to use this
Dataset in a Dynamic Element.
To use the Dataset, we simply
invoke one of the Dynamic Elements
on the screen and use the Calculation Result
in that Element. I am going to use
the Trend Object, so I will select Draw
and Trend, and I will draw a Trend on the screen,
not only of my Dataset, but I am also going to use the
Raw Tag Value. To bring the
Dataset to the Dynamic Element, you
go next to the Tag Search Button and you select
the dropdown arrow and then PI Calculation.
This will display to you the available Datasets
that you have on your system. I have one Dataset
on my system, and when I select that, I can see
all the various columns of information
that I can select. Now, I
only have a tag as my
Source Data. I do not have an Expression. So,
if I selected Value, it would simply give me that Tag's Value
every ten minutes. It's
another way of doing sort of a sampling of the data.
If -- but I want to use the Average,
and I am going to get a ten-minute Average of this data.
And I will click OK. And you will notice that in my
Tags in Plot, instead of having the Tag Name, it has
the Dataset Name.Average.
So that will be what I will Trend in this --
what I, what I will look at in this Trend.
I will select the dropdown arrow and go back to Tag Search.
My previous search was cached,
so I will select my Tag. So I now have
my Average and my Raw Value.
I think I will change my Interval
to one hour to make it a little clearer on the Trend.
And I will bring -- click OK to bring the Trend
back. And you can see the Raw
Data Values are being displayed
as well as a running 10-minute
Average. Every ten minutes, I am calculating
a New Average for that Tag. So you can see
at 12:37 I
calculated 152. At the
next Interval, if I mouse over this,
at 12:48
I got a Value of 159.
Actually, that's the, the Value where I moused over.
You'd have to -- it, it, it, it will remain constant
over that 10-minute period until the data changes, so
you can see that -- the result of those
calculations. Now, you can use the,
you can use the Trend
or you can use the Bar Graph or you can use the Dynamic
Value. Any of the, the Standard
Elements in ProcessBook will display the results
of Calculation Datasets.