4 Replies Latest reply on Aug 28, 2018 2:28 PM by william.flannelly

    Tag Comparison Between Servers


      So I am at a monitoring center with it's own PI server which is sent data from another PI server.  What i plan on doing is having a visual where i can compare values at the same time stamp between each server. The plan is to view issues that may come in from something between servers.  I'm unsure if using trends "Buffers" the data, but the values that appear in a trend is different than a value that would come in a value box. Even if i use "GetTraceValue" to pull data into a list box, the values dont match the trend.  Is trend data buffered or smoothed in any way?  Also, is there a logical way to be able to compare data between servers which should always be exact, but to fill into a list box if they are not?



        • Re: Tag Comparison Between Servers

          Hi William


          I would suggest event count and tagavg should help you understanding in case of any data issues between two servers. You can use Visualisation (trends) to monitor realtime e.g. PI Vision .




            • Re: Tag Comparison Between Servers

              Thanks Lal, I'll see what i can do with that.  Is there a reason why values in a Trend visualisation and a value in a simple Value visualization would be different for the same time stamp?

                • Re: Tag Comparison Between Servers

                  Hi William,


                  Can you share a screenshot? Also, can you share product name and version?


                  I would have suggested maybe the reason is one value is being interpolated while the other is the compressed value in the data archive. However, if the timestamp is the same on both objects, that is rather suspicious.




                    • Re: Tag Comparison Between Servers

                      Thanks Seb,


                      So i ended up doing what i believe works. I'll attach the script below.  And im using PI ProcessBook 2015 Version  What my script does is a timer calls functions like the one below and the snapshot data on both servers is shown side by side in a listbox


                      Sub DataGrab()


                          Dim TimeStamp As String

                          TimeStamp = Format(Now(), "MM/dd/yyyy h:mm:ss")


                          'Declare Central Variables

                          Dim srvCent As Server

                          Dim TagNameCent As String

                          Dim TagCent As PIPoint

                          Dim TagValueCent As Single


                          'Declare Station Variables

                          Dim srvStat As Server

                          Dim TagNameStat As String

                          Dim TagStat As PIPoint

                          Dim TagValueStat As Single


                          'Grab Central PI Data

                          Set srvCent = Servers("SERVER 1 NAME")

                          TagNameCent = "TAG 1 NAME"

                          Set TagCent = srvCent.PIPoints(TagNameCent)

                          TagValueCent = TagCent.Data.Snapshot


                          'Grab Station PI Data

                          Set srvStat = Servers("SERVER 2 NAME")

                          TagNameStat = "TAG 2 NAME"

                          Set TagStat = srvStat.PIPoints(TagNameStat)

                          TagValueStat = TagStat.Data.Snapshot


                          'List Box

                          'Will only show values that DONT MATCH between Central PI and Station PI

                          If TagValueCent <> TagValueStat Then

                              ListBox1.AddItem TimeStamp & "   " & TagValueCent & " / " & TagValueStat, 0

                              ListBox1.ListIndex = 0

                          End If


                      End Sub