Now the next thing we want to know about with Archive Value Queries is--I'll just scroll
over here to the right--what exactly is it returning? So let's take a look at this data
right here. I have a graph of some raw archive values that's made it into the PI System. So
these are the points that are actually recorded in the PI Archive and if we interpolate between
these points we can see what the process was doing at any particular time. If you
have your compression and exception settings set properly then we know that the process
was in this area at the time whenever it was between these two recorded points. So we can
trust that any interpolated point right here is representative of what was going on in our
process at that time. If you want more information on this I encourage you to look up the exception
and compression videos that we have. I'm just going to zoom out a little bit here.
Let's say I make a call for this time which we'll say is about nine o'clock. So about nine
am that's where the process is. What is going to be returned by my archive value query? That
has to do with what retrieval mode I choose. So to give you a point; so we're using a tag name now--a
tag named CDT158 to illustrate this and I'll write in "archive value" and now I'm going to say--what
were you asking for; nine am--so I'll say "nine am" is my timestamp... Timestamp nine am. And
the first value here; now I'm going to ask for this tag name at this timestamp. So I'm asking
for this tag that I'm showing here, I'm asking for that tag at nine am. And as we saw there
is no exact value at nine am; I'm asking for a value that's not precisely...there is not a point
exactly in that spot in the PI Data Archive and so let's see what happens. So if I say "time at
left" and hit "apply" I'll see this; this is what happens when retrieval mode is set to auto. Now if
I copy this down; let's say what happens if I use a different one. So there's a couple of different
options underneath here. There is one that's "previous" and then there is one that's "next".
Now what these do--let me just show you what they do and then I'll explain what's going
on. So this is "previous" and then there is another one... I'll just get a little
bit more space here. Yeah. There is another one which is "next". "Next". Right. So what we've
ask for here is we're asking for I want to know what the timestamp was at nine am. Now when I do
"auto" it's interpolating between this point and this point to return this one right there. Boop;
right there. That's what's being returned right here by "auto". When I ask for "previous" I'm
forcing the archive value query to return me the last previous raw value. So I'm asking
for nine am and the previous raw value is right here. So it's returning me one sixty-six which
is that value right here...right there. As you can imagine "next", "next is asking,
"Okay at nine am if there is no raw archive value find the next raw archive value in time and return
that to me. So "next" is looking at nine am, the next archive value is right there which we
see is one sixty-three. So that's less than the previous value; you can see that this one is less
than that. So that's what "next" is returning; it's returning the next raw archive value.
Now there's a few other options on here and I'm going to refer you more to the manual for
them but I can tell you quickly that "auto"; so what "auto" will do is "auto" will interpolate
between points unless you have a special setting for your tag setup which is Step. So Step is for
tags that you know have a step change all the time. In that case what "auto" does is
it will always return--if you query this point right here--it will return the previous point;
it will always return the previous point rather than interpolating between these
and returning that which is a little inappropriate for a Step function.