3 Replies Latest reply on Jan 9, 2012 9:14 PM by Ahmad Fattahi

    pipoint.data.snapshot return archived value?

    matthew.rivett

      I recently inserted data into the archive using piconfig using the following...

       

       

       

      @table piarc

       

      @mode create,t

       

      @modify mode=replace

       

      @istru tag,time,value

       

      tag1,08-Nov-2011 09:56,532.9147

       

      tag2_kv,08-Nov-2011 09:56,No Data

       

      tag3,08-Nov-2011 09:56,No Data

       

      Inserting the data into the archive caused a program using pipoint.data.snapshot to see the archived value.  I see in the manual that using eventpipes this could happen but I do not see anything about data.snapshot.  Is this expected?

       

       

       

      Applications which need to monitor each value for a tag as it changes on the server will want to use this EventPipe. However, this eventpipe monitors all new snapshot and archive edit events for the point. Not all the events in this eventpipe show up in the snapshot of the point. Only events with timestamp greater than or equal to the current snapshot value will replace the current snapshot. Hence, if the application is only interested in new events, it needs to always check the timestamp of the events and to trap out of sequence events.

       

      Thanks,

       

       

       

      Matt

       

       

        • Re: pipoint.data.snapshot return archived value?
          Ahmad Fattahi

          The way I read the manual snippet is that what shows up in the EventPipe can be coming from either of the two sources: archive edits or snapshot inserts. If the timestamp of the event is greater than or equal to the current snapshot, it will replace the snashot value.

           

          Now you see the inserted values in the data.snapshot. The question is what was the timestamp of the snapshot event of your tags prior to your piconfig script? If the timestamp of the snapshot was older than your piconfig event, your experience is consistence with the user manual. Is that the case?