Getting data out of PI to a CSV

What is the best way to get data out of PI and into a CSV?

 

I have a new piece of software that wants a CSV updated every minute with PI data. There are about 1800 PI tags that will need to be pulled., and they are on different scan times. Some will update every 3 minutes up to every second. In the past  I have just used Excel to pull in PI tags with Datalink, and save that out to a CSV but we only do that once per day using Windows Task Scheduler. Not on a minute by minute basis. With 1800 tags and the way Excel 365 works with Datalink now this will take longer than 1 minute to extract the data and write the file. Is there a better way to set this up?

 

The application is Braincube. They have an interface they can setup to the plant system, but  with the way our security is setup it'll never get done. Infosec and the admins will never allow it.

 

Anyone else have experience with this?

Parents
  • Joel,

    Whereas using Excel to automate this process is relatively easy, it's really a bit "Rube Goldberg" like.  There are a number of paths that you can go but in my opinion, the most robust and reliable method is via a custom application.  The AF-SDK makes this operation relatively simple and it wouldn't take a very large application.  You could even use the Windows Task Scheduler to run it as a command line application passing it input and output parameters.  The nice thing about the Task Scheduler is: if the program fails and crashes due to some unusual situation (i.e.: lost connectivity to the PI server), it will just try again at the next scheduled time.  When writing custom software, I've found that typically its 20% of the code to actually get the job done and 80% to handle all of the possible error conditions.  Using the Task Scheduler helps here in that you can live with crashes.  You can even have the code write "state" information so when it runs, it will pick up from where it left off, even if the server that it runs on is shut down for some time.

     

    I hope that this helps,

    David

Reply
  • Joel,

    Whereas using Excel to automate this process is relatively easy, it's really a bit "Rube Goldberg" like.  There are a number of paths that you can go but in my opinion, the most robust and reliable method is via a custom application.  The AF-SDK makes this operation relatively simple and it wouldn't take a very large application.  You could even use the Windows Task Scheduler to run it as a command line application passing it input and output parameters.  The nice thing about the Task Scheduler is: if the program fails and crashes due to some unusual situation (i.e.: lost connectivity to the PI server), it will just try again at the next scheduled time.  When writing custom software, I've found that typically its 20% of the code to actually get the job done and 80% to handle all of the possible error conditions.  Using the Task Scheduler helps here in that you can live with crashes.  You can even have the code write "state" information so when it runs, it will pick up from where it left off, even if the server that it runs on is shut down for some time.

     

    I hope that this helps,

    David

Children
No Data