7 Replies Latest reply on Mar 8, 2012 6:12 PM by Asle Frantzen

    Get total time YTD for a tag with a certain value

    Asle Frantzen

      Hi

       

      Not really shure where to post this, but here it goes:

       

      I have 3 different AF attributes I need to present, and each of them needs some manipulation to get the desired output.

      1. Availability this year [%]
      2. Starts this year
      3. Runtime this year

      The tags I have for these are:

      1. String-tag with two possible values (available, not available)
      2. String-tag with two possible values (start, stop)
      3. This is the same tag as in pt. 2

       

       

      As I said this should be in AF, and I'm not really shure what would be the best way to get the wanted numbers.

       

      The first attribute should have a resolution of 1 minute, and I do get the correct answer with an OLEDB query by counting the events where the equipment is available (interpolated, timestep 1m) and dividing it with the total count of events (also interpolated). But it's too expensive, so I probably can't go that way. I was hoping for a way to do this without any coding, but at the moment I only see two options for all of the attributes:

       

      1. Writing a custom data reference

       

      2. Write an ACE calculation (or three of them actually) and store the values to PI tags

       

       

       

      Anyone have any inputs on this? The custom data reference would perhaps also be too expensive, since it's client side. I have 27 pieces of equipment which have these attributes, and they're all going to be shown on a ProcessBook group display (so waiting for 3 x 27 custom DR's to do their thing would most likely be a long wait).