1 Reply Latest reply on Feb 21, 2012 11:01 AM by andreas

    What is the fastest way to write values in archive?

    bergeron_iti

      I'm trying to write a large amount of values in the archive. Basically I have to write 1 point for each 10 minutes for a specific day for 6 tags and about 350 equipments. If we add up every thing, it means about 864 points ( 6 x 144) per equipment times 350 so about 325 000 values.

       

      So I wrote a procedure with sql server that use the PIconfig interface to write them, to do so, I create one file per equipment and I process them in a loop.  

       

      Then I have 2 issues:

       

           When I try to write in the archive I receive an error that says that mode edit is not valid. 

       

           When I try to write in pisnap, it works but it takes about 1 minutes per equipment, which is really too long. 

       

       

       

      Someone has an idea?

       

       

        • Re: What is the fastest way to write values in archive?
          andreas

          Patrick, while this is not really suitable for vCampus, I am sure many people here will have some experience to share.

           

          PIConfig should be able to do several values per second - but you are talking here about equipments. If I understand that correct - 864 events (time/value/tag linest) per equipment per day.

           

          From my memory I recall that PIConfig should be able to do 50-500 lines per second - what would be 2-20s in your case. I would assume that the culprit here is the output to the screen.

           

          Can you post your PIConfig script?

           

          BTW, I just tested and piarc *might* be faster than pisnap, but this was just a single test.

           

          Here is the start of my script (redirecting the output to speed up things):

           

          @table piarc

           

          @output MyLog.txt

           

          @mode create,t

           

          @istr tag,time,value

           

          the "@mode create,t" means "create or edit".