5 Replies Latest reply on Aug 19, 2016 2:42 PM by gregor

    Como criar arquivos texto ciclicamente

    Bolsoni

      como criar arquivos textos ciclicos com tags do PI para serem consumidos por outros sistemas. similar a interface pi ufl. arquivos contendo tag; timestamp, valor.

      ja tentei no ms excel, porem ele para, da erro, falha e nao gera os arquivos.

        • Re: Como criar arquivos texto ciclicamente
          gregor

          Bom dia e boas-vindas Alessandro

           

          Eu tenho usado o Google Tradutor para traduzir a sua pergunta e minha resposta. Por favor, tenha paciência comigo se o Português não é tão bem.

           

           

          Por favor, veja Meir Tseitlin pós Easy to use script to extract time-series tag data into CSV

            • Re: Como criar arquivos texto ciclicamente
              Bolsoni

              Hello Gregor

              Thanks for answer my post.

              I am sorry my english skills are bad.

              You thought about creating a file with multiple tags.

              As a file for PI-UFL interface (old batchfile)

              similar to this:

              FibriaJAC-Aria_Emission-TRS-FC2;16-Aug-2016 12:15:00;6,23

              FibriaJAC-Aria_Emission-TRS-FC3;16-Aug-2016 12:15:00;2,78

              FibriaJAC-Aria_Emission-TRS-CR3;16-Aug-2016 12:15:00;1,49

              FibriaJAC-Aria_Emission-TRS-CR4;16-Aug-2016 12:15:00;0,86

              FibriaJAC-Aria_Emission-TRS-GTV;16-Aug-2016 12:15:00;1,12

              FibriaJAC-Aria_Emission-SO2-FC2;16-Aug-2016 12:15:00;27,56

              FibriaJAC-Aria_Emission-SO2-FC3;16-Aug-2016 12:15:00;0,08

              FibriaJAC-Aria_Emission-SO2-CR3;16-Aug-2016 12:15:00;18,80

              FibriaJAC-Aria_Emission-SO2-CR4;16-Aug-2016 12:15:00;9,88

              FibriaJAC-Aria_Meteo-DirVento;16-Aug-2016 12:00:00;299,00

              FibriaJAC-Aria_Meteo-VelocVento;16-Aug-2016 12:00:00;0,80

              FibriaJAC-Aria_Meteo-TempAmb;16-Aug-2016 12:00:00;25,20

              FibriaJAC-Aria_Meteo-RadSolar;16-Aug-2016 12:00:00;319,00

              FibriaJAC-Aria_Meteo-Precipitacao;16-Aug-2016 12:00:00;0,00

               

              thank you

                • Re: Como criar arquivos texto ciclicamente
                  gregor

                  Hello Alessandro,

                   

                  piconfig.exe is definitely the tool that I would suggest here. So you have multiple Points and values at different timestamps. Do you like to dump current values (snapshots) into a text file?

                    • Re: Como criar arquivos texto ciclicamente
                      Bolsoni

                      Hello   

                      Gregor. Exactly. If you get something like in the previous message, then I could make cyclic with Task Scheduler

                        • Re: Como criar arquivos texto ciclicamente
                          gregor

                          Bom dia Alessandro,

                           

                          The easiest way to do this is on the PI Data Archive node but it's also possible to run piconfig.exe remote. So let's assume we are on the PI Data Archive node at C:\Temp

                          Please create a file snapdump.dif, edit the file and add the following

                           

                          @table pisnap

                          @mode list

                          @ostr tag, time, value

                          @istr tag

                          @echo off

                          @output Like_for_UFL_but_from_PI.txt

                          sinusoid

                          sinusoidu

                          cdt158

                          @bye

                           

                          Save the file and close your editor.

                          Open a command prompt and navigate to C:\Temp

                          Execute the following command:

                           

                          %piserver%\adm\piconfig.exe < snapdump.dif

                           

                          If this works for you, please just change the list of tag names inside snapdump.dif and create a scheduled task.