7 Replies Latest reply on Sep 4, 2012 10:58 AM by Gregor

    Tag names from point IDs (PIConfig)?

    AlistairFrith

      Hi all,

       

      I have a peculiar -10005 error occurring on multiple tags. After discussions with OSI support and trying out a few things, it seems that loading those tags into Tag configurator and then exporting them again fixes the problem.

       

      So I have a list of a few hundred point IDs and I need to get their associated tag names. I do not have Datalink available to me, only Tag Configurator and PIConfig on the PI Server. Any suggestions how to do this? I have tried a couple of PIConfig scripts but they all fail and I am at a loss.

       

      <update>I have now found messages giving the names of the tags so this is not so urgent but I am still interested how I would go about it if all I had was the point IDs</update>

       

      Thanks in advance,

       

      --- Alistair.

       

       

        • Re: Tag names from point IDs (PIConfig)?

          How big is the system?  What if you dumped all tags and just had a lookup in Excel?

           

           

           

          @table pipoint


           

          @ostr pointid,tag

           

          @select tag=*


           

          @output output.txt

           

          @ends


           

          @exit 

           

           

           

           

            • Re: Tag names from point IDs (PIConfig)?
              AlistairFrith

              I can narrow it down to about 40k points so it is do-able and I may have to do it like that in the end anyway.

               

              I am interested at the moment more as an academic exercise.

               

              --- Alistair

                • Re: Tag names from point IDs (PIConfig)?
                  andreas

                  For a singel tag you can use apisnap.exe - simply enter \1 for pointid 1 as tagname.

                    • Re: Tag names from point IDs (PIConfig)?
                      andreas

                      My aproach to the academic exercise: Given I have a way to create a text file of the following format:

                       

                      @table pipoint
                      @mode list
                      @ostr tag,pointid
                      @output e:\Pointid.txt
                      @sele tag=*,pointid=1
                      @ends
                      @sele tag=*,pointid=2
                      @ends
                      @bye

                       

                      and I run this as input file in piconfig, it will generate a list <tagname>,<pointid> for the two tag with the pointid 1 and 2.

                        • Re: Tag names from point IDs (PIConfig)?

                          Hello Alistair,

                           

                          What do you need the Tag name for?

                           

                          If it's just for the tag search, please have a look on the following screenshot from Tag search dialog on how to find tags by pointID.

                           

                          4186.TagSearch.jpg 

                           

                          To get this view, click on the arrow beside "Value", select "Point Attribute..." and pick pointid from the attribute list. Enter the pointid into the belonging TextBox. Please note that you can also use wildcards here.

                           

                          Error [-10005] translates "Value too small or Subscript Under Range" and indicates a point type mismatch but that wouldn't resolve by just loading tags into the tag configurator and exporting them. Is this possibly an issue with records of the primary archive being initialized with the wrong point type? If so forcing an archive shift should reduce [-10005] occurrences in the PI Servers log dramatically - except event times are before the shift. For sure reprocessing at least the previous primary archive would be strongly recommended.

                           

                          Gregor

                            • Re: Tag names from point IDs (PIConfig)?
                              AlistairFrith

                              Thanks Gregor,

                               

                              In my conversations with OSI, this import and export process was suggested and it seemed to work for one tag, so we have now done it with all the tags (Unfortunately it now seems you may be right as we still see tens (possibly hundreds) of these messages per second.

                               

                              I have now done an archive shift and am reprocessing the old primary. However, archive shifts have happened previously without noticeably reducing the rate of these messages.

                               

                              --- Alistair.