if you want to see values for your data item over time you are going to be using the multiple value
functions in pi datalink as you can see there are three multiple value functions available
the first one is the compressed data function it gives you the raw data stored in the pi system
so these are the ones that have been recorded and passed the exception and compression when you look
at the graph you can see that the values are not evenly spaced the sample data function returns
evenly spaced interpolated values for a pi point or pi af attribute over a regular interval
when you sample the values you need to be careful and think about how you are going to sample
in order to not skip any important events or peaks in your data stream looking at the graph with the
sample data function you will have no idea what was happening in your process for example between
9 am and 10 am here the time data function returns actual or interpolated sample values
for a pi point or af attribute at a specified timestamps all right it's time to practice and
see how to use those functions so in this hands-on we would like to analyze the archived values of
the external temperature of mixing tank 1 in our daily report for the first two hours
of every day so we know by now that we will use the compressed value function for that we would
also like to see this temperature value every 10 minutes during this two hours so which function
will be used for that the sample data function we are also interested in doing a comparison
between mixing tank 1 and mixing tank 2 at the timestamps where there is a value archived for
external temperature of mixing tank 1. so we are going to achieve that with the time data function
ok let's first build a template for our report type data item in cell a1
start time in cell a3
and time in cell a4
and time interval in cell a5
now click on cell b1 and go to search make sure you are connected to the osisoft database
and type in external temperature in the search box
select the external temperature of mixing tank 1 and mixing tank 2 and click ok
now type the start time of t in cell b3 which refers to today at midnight and time of t plus 2h
in cell b4 which refers to today at midnight plus two hours so today at two am and time interval of
ten minutes so type in 10m when your template is ready we are ready to query for the pi
data so we will start by obtaining the compressed data for mixing tank 1 external temperature so
let's click on cell c3 and select the compressed data function refer to cell b1 as our data item
select the start and end times select hide count and show timestamps and click ok
now let's do the same for mixing tank 2 in cell g3 so click on cell g3
and select the compressed data function refer to cell b2 as our data item
select the start and end times select hide count and show timestamps and click ok
now we will obtain the sample data for mixing tank 1 external temperature so let's select cell e3
and go to the sample data function refer to mixing tank 1 external temperature as our data
item select the start and end times here we see an additional field for the time interval
let's refer to cell b5 select show timestamps and click ok
when we try comparing the timestamps of the compressed data for the two mixing tanks we can
notice they are not the same so the comparison cannot be accurately done to have a better
comparison we will use the time data function and get the external temperature of mixing tank 2
at the timestamps in column c so let's select cell i3 and click on timed data function
select the external temperature of mixing tank 2 as our data item for the timestamp select
the timestamps in column c so the time stamps from the external temperature of mixing tank 1
and now click on apply
now our report is ready to go thanks for watching