N
Automation Direct have these cool panels that can locally cache data then upload them to an FTP source (http://c-more.automationdirect.com/). This is cool, but my customer wants to make the data accessible in an SQL database. My idea was to run a PHP script (must use Windows in this application) with the Windows scheduler that:
1. Polls for the file
2. If it exists, parse it out, write the values to the DB, then delete the file.
I would normally use FactorySQL http://www.inductiveautomation.com/products/factorysql
but in this case the hardware device can handle the data logging and it has the added feature of caching the data before it sends it to the FTP server.
My main questions are these:
1. Is there some way to trigger a program/script/etc to run on an FTP upload (to get away from the polling)? Would this be easier in Linux? It certainly would be easier if those c-mores could POST to a web site.
2. I know how to write this script in PHP, but I was wondering if you guys can think of a cleaner, easier, or more straightforward way of accomplishing the task.
After investing the product info more closely, it looks like it has a built in FTP server and has the ability to email the data out periodically. Does this make getting it into an SQL database any easier? Thanks for your help in advance.
1. Polls for the file
2. If it exists, parse it out, write the values to the DB, then delete the file.
I would normally use FactorySQL http://www.inductiveautomation.com/products/factorysql
but in this case the hardware device can handle the data logging and it has the added feature of caching the data before it sends it to the FTP server.
My main questions are these:
1. Is there some way to trigger a program/script/etc to run on an FTP upload (to get away from the polling)? Would this be easier in Linux? It certainly would be easier if those c-mores could POST to a web site.
2. I know how to write this script in PHP, but I was wondering if you guys can think of a cleaner, easier, or more straightforward way of accomplishing the task.
After investing the product info more closely, it looks like it has a built in FTP server and has the ability to email the data out periodically. Does this make getting it into an SQL database any easier? Thanks for your help in advance.