cancel
Showing results for 
Search instead for 
Did you mean: 

PI - tag query

Former Member
0 Kudos

Hello all -

We have an interesting problem. We are historizing a tag EVERY minute from PI from start of the shift (at 7:00 AM) till. current time in the shift

To explain -

at 7:01 we run a history query from 7:00 till 7:01 , store the value

at 7:02 we run a history query from 7:01 till 7:02, store the value

at 7:03 we run a history query from 7:02 till 7:03, store the value

and so forth....

To cross-verify, these values, I ran a SINGLE history query from 7:00 to 7:03 at a later time (say at 8:00).

I found that sometimes the values from both the queries do not correspond for the same date/time stamp?? This was especially true if a downtime occured at say in the middle say 7:02.

Have anyone else observed similar results when querying a tag from PI.

Any idea why this is happening? Thanks for any help. I could provide more details if needed.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

What type of query are you doing? History or <i>HistoryEvent</i>.

<b>History</b> queries are interpolated thus the data could be slightly off from what is in on the archive.

<b>HistoryEvent</b> will show the actual values in the archive.

Martin

Former Member
0 Kudos

Martin,

Thanks for your reply.

I am using a history query every minute from 7:00 to 7:01, 7:01 to 7:02, 7:02 to 7:03 and so forth to historize data.

When I verified the historized data by running a single history query from 7:00 to 7:03, the values did not match the historized values using the previous method when there was a downtime (say at 7:01)

My guess is (may not be correct) that PI might be taking sometime to update proper values into its database when there was a downtime. So if xMII was reading data at that instant when there is a downtime, may be the correct values may not be available in PI yet.

Is this possible or am I making some mistake?

Former Member
0 Kudos

Like I said,

you don't want to use a "History" query if you want the real stored data. The Hisotry query will interpolate the data thus changing the returned values from the original. Use <b><i><u>HistoryEvent</u></i></b> to get the real non-interpolated data from PI.

Martin