11 Replies Latest reply on Jul 21, 2015 10:12 AM by gregor

    The issue of PI SDK Buffering

    Endrew

      Hello

       

      We have:

      1. the lost connection to the server Pi

      2. List the names of Pi Point

      3. A program that writes the values in the pi point

      How to write to the buffer after the loss of the connection when the program is started before the connection loss?

      How to save objects of type PI Point, to be used when the connection is lost?

      Is there a way to initiate buffering without being connected to a server with the PI SDK?

       

      Sorry for my English.

      Thanks!

        • Re: The issue of PI SDK Buffering
          Eugene Lee

          Hi Andrey,

           

          You will need to use the PI Buffer Subsystem to be able to buffer PI SDK Clients.

           

          Please refer to this link for more information.

           

          KB00572 - PI SDK Buffering: Benefits, installation, configuration and other FAQs

            • Re: The issue of PI SDK Buffering
              Endrew

              Buffer works if the object type pi point obtained with an open connection to the server PI.

              If no connection is pipoint can not be obtained. Write nowhere.

              How to implement something like a cache pipoint?

                • Re: The issue of PI SDK Buffering
                  Eugene Lee

                  Hi there, may I know what is preventing the initial connection? Are you trying to write manual data?

                    • Re: The issue of PI SDK Buffering
                      Endrew

                      Yes there is manual recording. During a loss of connection, users can restart the program.

                        • Re: The issue of PI SDK Buffering
                          dng

                          Hi Andrey,

                           

                          Just to confirm, is your custom application that writes to PI using PI SDK?

                           

                          What you are asking for (to be able to cache the PIPoint objects on the client machine) sounds very similar to the "disconnected startup" capability we offer in our UniInt interface. Disconnected startup allows the interface to start from a local cache file with or without a valid connection to the host PI Server. The first time the interface is started with the disconnected startup parameter, a connection to the PI Server will be required to populate the cache files with the necessary data to support the disconnected startup feature on subsequent interface restarts.

                           

                          With that said, I don't see a built-in mechanism to achieve similar things in PI SDK.

                           

                          One thing that I do want to note is that if your PI SDK program is long-running (e.g. a Windows Service), the PIPoint objects should already be cached in your application. Subsequent writes to the PI Data Archive should be able to utilize these cached PIPoint objects to write even if you lose connection to PI (the data will be buffered in this case). I haven't tested this out yet, but I wanted to first find out whether your application will be started/restarted without a valid connection to PI. Let me know!

                           

                          EDIT: My bad, I just fully read your last comment about users being able to restart the program. As far as I know, there is no simple way to create a PIPoint cache file on client machines. Perhaps other community members can chime in. How often does the loss of connection happen? Can you have a long-running application that allows user input manually at arbitrary times, instead of allowing users to restart the program when they need to manually input data?

                          • Re: The issue of PI SDK Buffering
                            gregor

                            Hello Andrey,

                             

                            It looks to me as if your question is not yet fully answered. Please allow me pointing you to Raymond Verhoeff post about deprecation of PI SDK. Please consider using AF SDK instead with recent application development. Please also see the other question about Writing to PI Buffer using AF SDK.

                             

                            Please let us know if you have additional questions or if you consider your question answered.

                              • Re: The issue of PI SDK Buffering
                                gregor

                                Hello Andrey,

                                 

                                Please let us know if you consider your question answered. In case you have additional questions or you feel the answers are not sufficient, please let us know.

                                  • Re: The issue of PI SDK Buffering
                                    gregor

                                    Hello Andrey,

                                     

                                    Please allow me marking your question as "assumed answered" but feel free to reopen your question at any time convenient for you.

                                      • Re: The issue of PI SDK Buffering
                                        RenataP

                                        Hi.

                                        I think I have the same question but I didn't find the answer in this post.

                                         

                                         

                                        I'm trying to implement a disconnected startup in a custom PI Interface.  I'm using AF SDK 2014 (v2.6.xx).

                                        In order to use the UpdatePIValue method,  I have to have a PIPoint instance, which cannot be created because I'm not able

                                        to  have a valid PI connection.

                                         

                                        Under these conditions, is there anyway to update the PI Buffer? 

                                        If so, can you explain how can I do that?

                                         

                                        Thank you

                                         

                                        Renata

                                          • Re: The issue of PI SDK Buffering
                                            dng

                                            Hi Renata,

                                             

                                            As being handled in Tech Support Case # 643365, you will need a valid PI connection to get PI Point information before updating tag values using the current release of AF SDK. If you can give us more information about your use case, we might be able to suggest some alternatives.

                                             

                                            EDIT: We are currently having some internal discussions about this capability. We will give you an update as soon as we have more information.

                                             

                                            EDIT 2: Thanks Renata and Audrey for your feedback and comments! The PI AF SDK development team has created a work item to allow an AF SDK application to create a PIPoint given the server and point ID, and start writing data for this PIPoint to PIBufss without a valid connection to the PI server.