AnsweredAssumed Answered

PIPoint.UpdateValues compression

Question asked by ee.ashley on Jun 12, 2015
Latest reply on Jun 12, 2015 by ee.ashley

I'm experiencing some seemingly unexpected compression behaviour with the PIPoint.UpdateValues in AF SDK 2.6. (Or lack there of to be precise!)

 

I have some test code that looks like this:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OSIsoft.AF;
using OSIsoft.AF.Asset;
using OSIsoft.AF.Data;
using OSIsoft.AF.Time;
using OSIsoft.AF.PI;

namespace CompressionWriteTestr
{
    class Program
    {
        static void Main(string[] args)
        {

            AFAttribute a = AFAttribute.FindAttribute(@"\\aepi\CompressTest", null);

            AFValues vs = new AFValues();

            DateTime t = DateTime.Now;
                        
            vs.Add(new AFValue("?2", new AFTime(t.Subtract(new TimeSpan(0, 0, 8)))));
            vs.Add(new AFValue("?2", new AFTime(t.Subtract(new TimeSpan(0, 0, 7)))));
            vs.Add(new AFValue("?2", new AFTime(t.Subtract(new TimeSpan(0, 0, 6)))));
            vs.Add(new AFValue("?2", new AFTime(t.Subtract(new TimeSpan(0, 0, 5)))));
            vs.Add(new AFValue("?2", new AFTime(t.Subtract(new TimeSpan(0, 0, 4)))));
            vs.Add(new AFValue("?2", new AFTime(t.Subtract(new TimeSpan(0, 0, 3)))));
            vs.Add(new AFValue("?2", new AFTime(t.Subtract(new TimeSpan(0, 0, 2)))));
            vs.Add(new AFValue("?2", new AFTime(t.Subtract(new TimeSpan(0, 0, 1)))));
            
            a.PIPoint.UpdateValues(vs, AFUpdateOption.Replace);

        }
    }
}

 

The tag "CompressTest" is a digital state, set to the SYSTEM set. It is configured with Compressing on, compmin of 0 and compmax of 8 hours. excmin is 0 and excmax is 10 min (essentially the defaults).

 

When running this code, I would expect that the repeated values get compressed (not added to the archive), since I am adding the values to the AFValues collection in order. In my vCampus system, this works - the values are compressed. In our test/production servers, however, these values do not get compressed - all values are added to the archive.

 

We started noticing this behaviour after upgrading to AF SDK 2.6 from 2.5. So at first I thought it was related to that, but given that the UpdateValues call works as expected on my vCampus server, using the exact same versions of the AF SDK, I'm wondering if there is something else I could be overlooking. Is there a tuning parameter or some other setting somewhere that affects compression?

 

Any thoughts?

Outcomes