6 Replies Latest reply on May 22, 2015 3:24 PM by aseck

    Comparing Primary and secondary data


      Hi All,


      Is there a better way to compare data between my primary and secondary of a collective and see if they are really in sync when it comes to data. I have had some instances where the data do not match between them. ..

        • Re: Comparing Primary and secondary data
          Kenji Hashimoto

          Primary and Secondary PI Server don't have sync data function. These are independent and PI Interaces send data to both Primary and Secondary PI Server by PI Buffer Subsystem.

          If you do reinitialization, Primary data will be coppied to Secondary PI Server. Also the other way is copy the archive files. But you need to check start time and end time.

          There is a possibility that Primary and Secondary have different Start time and End time.

          Also you can use PI to PI Interface to copy the data.

          Unfortunately, there is no comparison tool that would allow you to compare every archive value in one server to archive values in another.

          The possible way I can imagine is that you can connect Primary or Secondary PI Server independently and compare values manually.

          But it will be huge application if there are a lot of tags.

          • Re: Comparing Primary and secondary data

            Hello Ravi,


            You can also consider using the PISDK for this task. Please see Writing to Secondary Members using the PI-SDK. The post covers how to connect to a specific member of a collective. You can then grab an event list from each member to perform a comparison.

            • Re: Comparing Primary and secondary data

              Hello Ravi,


              This method was suggested to do the check after merging PI Servers, but you can use this to do some random checks.


              The best way would be comparing event count for all points (or just some of them) for whatever time range you like (I'd recommend going for a few short time-ranges rather than one long time-range).

              You can use the power of Excel + PI DataLink to do it.


              1. Load a list of PI Points into column A


              2. Prepare 4 more "parameter cells" somewhere in E column

              a. start time

              b. end time

              c. PI server A name

              d. PI Server B name


              3. In column B, use Calculated Function > point data item/tag to column A, and start/end time, PI Server to appropriate cells in the E column.

              Make sure the parameter cells are absolute references ($E$1), whereas data item/tag is a relative reference (A1).

              Use Event-Weighted calc mode and Count calc mode.


              4. Drag and drop the to get event count for all the points in column A.

              5. Repeat the same call against the other PI Server (column C).


              Compare results using (=IF(B2=C2,"Good", "MISMATCH") formula in column D, drag and drop, and you're done.

              • Re: Comparing Primary and secondary data

                Hello Ravi,


                Were you able to reach a resolution regarding your question above? If so, please let us know by marking one of the answers as "Correct Answer"? If not, please give us some more information on the current status of the project so we can further assist you