9 Replies Latest reply on Feb 25, 2011 12:46 PM by nfilatov

    Getting value of PI-ping tag

    nfilatov

      Hello!

       

      How I can get values of all PI-ping tags of my server? I can't understand where are its located in MDB.

        • Re: Getting value of PI-ping tag
          hanyong

          The best way that I can think of doing this is to perform a tag search using the PointSource (and location1 if necessary) attribute.

           

          An interface will identify tags that it should be handling by looking for tags with Pointsource and location1 that matches the pointsource (/ps) and id (/id) in its configuration. so by searching for tags on the PI server based on the 2 attributes should help you find the required points.

            • Re: Getting value of PI-ping tag
              nfilatov

              I have only MDB architecture without AF. When I open SMT and in docking window System Management Plug-Ins choose IT Points -> Ping I see all tags that I need.Can I get values fo these tags without search?

                • Re: Getting value of PI-ping tag
                  andreas

                  Nikolay,

                   

                  PI Ping, MDB and AF are unrelated. As Han Yong mentioned, the interface identifies tags based on Location1 and PointSource. For the PI Ping interface this is usually 1 and PING.

                   

                  You need to select Data in SMT and do a tagsearch to see the values of the tags.

                    • Re: Getting value of PI-ping tag
                      nfilatov

                      I need to get values of tags in add-in for ProcessBook, so I need do it through PI object model.

                        • Re: Getting value of PI-ping tag
                          andreas

                          Nikolay,

                           

                          not sure what you mean by "PI object model". If you want to get the values in your PB AddIn, you could go via PI SDK, get the pointlist and read the snapshots. Is that what your are trying to achieve?

                            • Re: Getting value of PI-ping tag

                              @Nikolay: As Han Yong and Andreas hinted, you will need to perform some search in order to get these Ping points. If you happened to organize your points in a Module Database (or AF, for that matter) structure, then maybe there is a specific name (or AF Category?) you can search on.

                               

                              Otherwise, you will need to rely on the configuration of your PI Points (i.e. search based on PI Point attributes, via the PI SDK).

                               

                              As Han Yong pointed out, PI Interfaces (like the Ping Interface) are told which PI Points to send data to, based on specific configuration of the PI Point attributes. This is typically done via the PI Points' PointSource and Location1 attribute. These are defined by the system administrator and depend on how many instances of the Ping Interface you have and their respective configuration. I would suggest you talk to your system administrator about this, or contact our regular Technical Support team if you need assistance finding this information.

                               

                              Once you know what "characterizes" Ping points on your system, you can perform a Tag Search via PI SDK (e.g. using the GetPoints method), which will get you a PointList from which you can request the Snapshot value.

                               

                              Hope this helps!

                              • Re: Getting value of PI-ping tag
                                nfilatov

                                Ok. So, how I can perfofm tag search in ProcessBook add-in?

                                  • Re: Getting value of PI-ping tag
                                    hanyong

                                    As suggested by Steve, with PI SDK you can use the GetPoints call, a simple code snippet would be something like the following (in C#):

                                    // instantiating PISDK object
                                    PISDK.PISDK _sdk = new PISDK.PISDK();
                                    // getting the PI server from known servers table
                                    Server _svr = _sdk.Servers.DefaultServer;
                                    _svr.Open("");
                                    ... 
                                    PointList _ptlt = _svr.GetPoints("pointsource = 'PING' and location1 = 1"); 
                                    ...

                                    As you can see, we passed the search filter into GetPoints call to search for a list of Points that matches the filter. In the above code snippet, it is searching for tags that have pointsource attribute as "PING" and location1 as 1. Again as Steve mentioned, the specific search filter would depend on the specific configuration of the PI Point attributes, so you would want to find that out.

                                     

                                    If you have more questions about how to use PI SDK to get information from the server (like reading data), you can also post these questions on the PI SDK Development Forum.

                                     

                                    Hope this helps