Skip to Content
avatar image
Former Member

How to get counter value from Historian

Hi Experts,

We have got a scenario to keep the number (counter) to see how many time a value of tag have been changed.

For Example:


If the values change from 1 to 0 and  0 to 1 for 25 times in a minute. We would like to get this number (25) from Historian (Wonderware).

Currently we are not using any Pco to fetch the value from Hisotrian since we are able to fetch the tag values from Historian database through SQLConnection.

I would like to know if we introduce Pco, will that help us to get this counter value.

We are working on MII 15.0 version.

Any help of this very much appreciated.

Thanks

Shaji

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 26, 2015 at 12:30 PM

    Hi Shaji,

    Are you using the MII InSQLPCo Data Server and a PCoQuery TagAgreggateMode to execute a Count Aggregate against this tag?

    Regards, Steve


    Add comment
    10|10000 characters needed characters exceeded

    • Make a calculated tag in Wonderware to count the occurrences for you, when the value changed over a moving window .. then you read the current tag value via PCo / inSQLPCo.

      You can't rely on the DB only because in the case of implementations transferring lots of data, the runtime table is getting updated with certain delays.

  • avatar image
    Former Member
    Apr 16, 2015 at 11:05 AM

    One of the easy way which i can think is get the values of tags in last 25 min using PCO HDA in and the number of records. I guess for each changes in values database must have different time stamps.

    Otherwise when Pco is used we need to store each update count whenever PCo query is called to modify the data.

    Hope it may help

    Add comment
    10|10000 characters needed characters exceeded