8 Replies Latest reply on Apr 26, 2018 10:56 AM by gregor

    Read a piarch-file

    SimonRHJensen

      Hi

       

      I can read a piarch-file, e.g. piarch.001, where I can see "Record Number" (RecNo), "PointID" (id) and some more with command prompt.

      Are there a similar way of which I can read/extract the tags stored in the piarch-file?

       

      What i really want to see is what pointID that is connected to what tag.

       

      Thanks in advance,

      Simon

        • Re: Read a piarch-file
          Eugene Lee

          Hi Simon,

           

          This info is not stored in the archives. It is in the pipoint table. You can use piconfig to get that info. Open up a command prompt. Navigate to %piserver%\adm directory. Then enter the commands below.

           

          piconfig
          @tabl pipoint
          @ostr tag,pointid
          @ends
          
          1 of 1 people found this helpful
            • Re: Read a piarch-file
              SimonRHJensen

              Thank you. This seems to extract what is in the PI database and not in the piarch file. How do i read that with cmd?

                • Re: Read a piarch-file
                  Eugene Lee

                  pidiag -archk <path to archive file>

                   

                  shows you the records and point ids that are available in the archive. An example is shown below:

                   

                  -------------------------------------------------------------------------------

                  recno:      1 id:       1 indices:  3 records:  413 events:     81521 fr: 99.3%

                  recno:      2 id:       2 indices:  0 records:    1 events:       145 fr: 96.3%

                  recno:      3 id:       3 indices:  3 records:  412 events:     81557 fr: 99.6%

                  recno:      4 id:       4 indices:  1 records:  111 events:     54434 fr: 98.8%

                  recno:      5 id:       5 indices:  1 records:    3 events:       427 fr: 97.6%

                  recno:      6 id:       6 indices:  1 records:   47 events:      9216 fr: 99.1%

                  recno:      7 id:       7 indices:  1 records:   48 events:      9374 fr: 98.7%

                  recno:      8 id:       8 indices:  1 records:   46 events:      8886 fr: 97.7%

                  recno:      9 id:       9 indices:  0 records:    1 events:       205 fr: 78.2%

                  recno:     10 id:      10 indices:  1 records:    3 events:       610 fr: 81.5%

                  recno:     11 id:      11 indices:  0 records:    1 events:         1 fr:  0.8%

                  recno:     12 id:      12 indices:  0 records:    1 events:         1 fr:  0.8%

                  recno:     13 id:      13 indices:  0 records:    1 events:         1 fr:  0.8%

                  recno:     14 id:      14 indices:  0 records:    1 events:         1 fr:  0.8%

                  -------------------------------------------------------------------------------

                           0 errors detected

                           0 warnings detected

                          12 total index records

                        1089 total data records

                      246379 total events

                       226.2 events per record

                           0 total annotations

                   

                  This example shows that the archive has events from point ids from 1 to 14.

                  2 of 2 people found this helpful
              • Re: Read a piarch-file
                afink

                Hi Simon,

                 

                What end goal are you trying to accomplish here?  As Eugene Lee mentioned, the RecNo and PointID attributes associated with each PI Point can be extracted from the pipoint table either from piconfig, or using PI SMT- > Operation -> Point Builder -> System Tab.

                 

                If you are trying to extract actual data from the PI Archives, you should use an appropriate client tool such as PI Vision, PI ProcessBook, PI DataLink.  If you are trying to export flat files of data from the PI Archives, then you can use PI Config, PowerShell, or DataLink to do so.  In piconfig, you would target the @piarc table.  For example, the following would get archive values of sinusoid for the last 2 hours:

                 

                piconfig
                @table piarc
                @ostr tag,value,timestamp
                @ostr ...
                @istr tag,starttime,endtime
                sinusoid,*-2h,*
                
                

                 

                - Adam

                1 of 1 people found this helpful
                • Re: Read a piarch-file
                  SimonRHJensen

                  Thank you for your answers.

                   

                  We have received a piarch file from a customer and we have to look into the stored data and analyze it.

                  As far as we know the piarch file have been extracted in a proper way so it should not be corrupted yet we are unable to combine tags with the stored data.

                   

                  We load the PI with tags from Excel.

                  I have now tried many different things without success. I have even got a taglist containing PointID, RecNo and Tag numbers from the customer.

                  We believe if there is inconsistency between RecNo, PointID and Tag number the Pipoint list and the Piarch file cannot be linked together.

                   

                  We thought it would be like these four steps but we are stuck at step 3.

                  1. Register piarch file into PI

                  2. Load taglist into PI with Excel

                  3. Check if data are linked with Data > Archive Editor

                  4. Link archive with FT Historian

                   

                  Should we approach this in another way?

                    • Re: Read a piarch-file
                      gregor

                      Hello Simon,

                       

                      Yes, you should definitely approach this differently. What you are trying is not supported and I believe it is not even permitted as the PI Data Archive file base is considered OSIsoft's intellectual property.

                       

                      Valid options could be

                      • Install a PI System and clone the customers installation by restoring a PI Backup. You can than chose from many different options to access the data e.g. by using a Developer Technology, OSIsoft.PowerShell module, PI DataLink etc. For this approach you will need a PI System license with the size of the customers tag count. Our joined customer may want to talk to their account manager about available options.
                      • Ask the customer to export the time series data. There are again many different options including the before mentioned ones.