6 Replies Latest reply on Apr 23, 2014 10:32 AM by mhalhead

    DataLink Shift Trending


      I feel that there is a simple explination or way for me to pull the data that I want from PI I am just not currently untilzing the correct function.


      I am pulling calculated data for a PITag. I have a flow meter and I am monitoring what my GPM average and my total for a time period are. I am pulling the tag at 04:00 and 16:00 because those correlate with a shift change. My interval is therefor set to 12h. What I am looking to do is now either build with the tend tab or perferably create side by side tables for each day that have the day shift numbers and night shift number. 


      Perhaps this is a bit confusiong to follow so below is what I am looking for:

      Asset: PI Tag
      Description: PI Tag Attributre
      Start Date: 01/01/2014 04:00
      End Date: 02/01/2014 04:00
      Time Interval: 12h
      Date Total Value Gal AVG Value GPM Total Value Gal AVG Value GPM
      1/1/2014 [16:00] [16:00] [04:00] [04:00]

      I want it like this so I can easily buld bar graphs to show the differences and also pick the data out clearly. My problem is that I can not get my PI tags to only generate every other so that I can make the table like this. It is all in one column alternating day, night, say, then night shift and the same day is two rows instead of being a single row. Please help I have been looking and I think I might be able to try something in the expressions option but I am not sure how. I know this format for questions is not always the best but I have been looking at the manuals and the online training videos but I can not seem to find an answer on my own so some power users and expert help would be much appriciated. 




      If you have any other questions just ask and I will work to answer them. Thanks in advance. 

        • Re: DataLink Shift Trending

          Ben, these are trivially done using AF and EF - just configuration, do you have access to AF/EF?

            • Re: DataLink Shift Trending

              AF and EF I am not sure what those are or if I have access to that?

                • Re: DataLink Shift Trending



                  Although I agree that EF (EventFrames) is the better technical approach there are some small technical issues, like Datalink doesn't support EF yet (the next version will but that hasn't landed yet). This means that you would have to use PI OLE DB Enterprise to get the data, which introduces a few minor problems like writing SQL and getting users to install it. You would also need to generate the EventFrames which isn't completely trivial unless you have AF2012 which was only just released.


                  FYI Ben AF = Asset Frame (if you are using a PI server post 2010 then you have AF; your EF though might not be enabled).


                  There are a couple of easy ways of achieving what you are looking for.

                  Option 1: Get Excel to do the work

                  The time parameter in the DL (DataLink) formulas can be references to the a cell. So as a quick work around I would create a couple of extra columns beside the dates (which you can hide). In there I would put a formula which adds the time offsets to the date. The DL formula simple references those.

                  Option2 (there is always more options in PI - one of the reasons I like it): Use the DataLink functions

                  Use the Advance Calculation. Below is the formula. This will calculate a total (to get the average change "total" to "average")  every 12 hours from the start time (Sheet1!$C$3) for the tag/Asset Attribute (Sheet1!$E$8)






                  The first option gives you the flexibility of irregular time steps. The second is just so easy.

                  • Re: DataLink Shift Trending

                    Hello Ben,


                    Asset Framework (AF) and Event Frames (EF) both is included with your personal development PI System that is part of your vCampus subscription. This said, you have access to install kits, product documentation, training videos, white papers which are included with your subscription. If you are in doubt if your production PI System support AF and EF, please consider checking with OSIsoft Technical Support or your account manager at OSIsoft.