3 Replies Latest reply on Apr 2, 2013 9:12 AM by Gregor

    DigitalState object returned instead of float

    Pawel

      Hi,

       

       

       

      I'm using the PI HDA OPC Server and there is a tag of float32 type. Most of values returned by ReadProcessed are correct float values. But some of values are null value or DigitalState object. I assume that these values are returned when OPC Server could not determine value for certain interval. So my question is: why sometimes it is null value and sometimes it is DigitalState object?

       

       

       

      Thanks in advance

        • Re: DigitalState object returned instead of float

          Hello Pawel,

           

          Can you please check what you get with PI SMT -> Archive Editor plug-in or PI DataLink -> Compressed Data for that tag?

           

          Possibly it's a good idea to open a ticket at OSIsoft Technical Support and to have the Technical Support Engineer look into this in a remote session.

            • Re: DigitalState object returned instead of float
              Pawel

              Thanks Gregor for your reply,

               

              I've checked it with Archive Editor and it shows a Digital value (Arc Off-line). Actually there is an Archive Gap and the Event Time of the Arc Off-line points to the beginning of this gap, so it is OK. But I just wonder about the values returned from the PI OPC HDA Server.

               

              Let me explain it with an example.

               

              There is a tag of float32. There are a lot of values for this tag. 1999/02/22 3:49:56 PM - this is the timestamp of the first value for this tag, 2010/10/13 10:59:47 PM and this is the timestamp for the last one.

               

              There is also an Archive Gap (2002/01/01 12:00:00 AM - 2004/01/01 12:00:00 AM)

               

              For periods outside the ArchiveGap, the ReadProcessed method returns correct float values. For periods from the ArchiveGap, in most cases the ReadProcesed method returns null values.

               

              But there is one case when the ReadProcesed method returns DigitalState objects instead of null values - when we use the ReadProcessed method with start time exactly the same as the timestamp of the first value (in our case 1999/02/22 3:49:56 PM).

               

              If we change the start time, even if we add or sub one second, the ReadProcessed method returns null values.

               

              I observed this behavior only for the OPCHDA_INTERPOLATIVE aggregate. Other aggregates also return null values for ArchiveGap periods.

               

              So I just wonder, is this a proper behavior or maybe there is a bug in the implementation of the OPCHDA_INTERPOLATIVE aggregate?