5 Replies Latest reply on Dec 7, 2010 6:03 PM by spilon

    Status Field in the GetPIArchieveDataResponse.

    farooquf

      Hi Guys,

       

      What is the exact use of status field in the response message of GetPIArchieveData?

       

      As per PI webservice documentation, the definition of status field is

      (Optional) If a Value is non-zero, this property contains a Status string indicating what is wrong with the value.

      Note: When entering data through InsertPIData, Status should be populated with the digital state value being inserted. If status is populated, the value will be ignored.

      Is there any use of status in GetPIArchieveData. If yes what it can be? 

       

      Regards,

       

      Farooq

       

       

        • Re: Status Field in the GetPIArchieveDataResponse.
          Ahmad Fattahi

          I can imagine if something is wrong with the query this property will contain a string explaining what is wrong. Some examples could be the time range not being covered by any archive files, or there is something wrong with the PIArcDataRequest (path or otherwise).

            • Re: Status Field in the GetPIArchieveDataResponse.
              hanyong

              You get a value in the Status field when the value of the tag in PI Archive is a bad value like "Bad", "Pt Created", "IO Timeout" or "Shutdown". 

               

              In some of the cases that Ahmad mentioned, when there is something wrong with the request definition (like the error in path or time definition), you will get an error, indicated by a non-zero value in the Error field of the returned TimedValues, and you can get the error description from the ErrDesc field.

               

              Hope this helps

                • Re: Status Field in the GetPIArchieveDataResponse.
                  farooquf

                  Thank you for your replies.

                   

                  Today I tested few cases and noticed values such as Pt created and No data.There can be many uncertain values also, but I cannot see them in manual.

                   

                  Is there any documentation available on Errors and ErrorCodes of the service?

                   

                  During my test I noticed following errors. But I am interested to see a document that describes all possible error codes.

                   

                  2147220472    The requested server was not found in the known servers table. Unable to resolve name to IP address. Nwv1235abc
                  2147220019    PIPoint not found. \\servername\tagname
                  2147180288    The time is invalid.
                  2147220478    Unable to open a session on a server. [-2146893020] Unknown Warning:
                  Nwv1235abc
                  2147219925    Too soon to attempt reconnection

                   

                  2147220432    Invalid tag name.(I haven't seen this error so far...)

                   

                   

                   

                  Regards,

                   

                  Farooq

                    • Re: Status Field in the GetPIArchieveDataResponse.
                      Ahmad Fattahi

                      These look like general PI SDK errors. For example, open up "About PI SDK" and look up error number -2147180288. It shows you the description you provided above. So, PI SDK documentation should be the right place to look.

                        • Re: Status Field in the GetPIArchieveDataResponse.

                          As suggested by the remarks in the InsertPIData method documentation (Han Yong's answer started pointing in that direction too), non-null values for the status field correspond to digital states in the SYSTEM digital state set. This is a generic digital state set that can be used with any PI Point regardless of its type (whether it's Digital or not) - you can look this state set up in the PI System Management Tools > Points > Digital States. It comes pre-populated with a good number of generic states (e.g. Pt Created, Bad, Shutdown, Scan Off) and you can add your own states if you need.

                           

                          We had a rather lenghty discussion on the topic in this discussion thread (nevermind the PI API part of the story, the underlying concepts of data quality and system state sets are the same).

                           

                          Just to close the loop on the questions you had on the error numbers in your original post, I answered this in the other thread you started.

                           

                          Hope this helps!