N
I am looking for a solution for this case, I have been searching but maybe the keywords used are not the best.
Basically, there will be a few RTU's with backup battery and logging capacity, that will be monitoring temperature and/or digital inputs mostly. A gateway will poll the data from the RTU's and a HMI should display that data and store it to a database. The RTU's and gateway device are proprietary, but if needed, it can be re-programmed. Right now it offers Modbus TCP connectivity. The main issue is that when the network is down, the RTU's will continue log their data locally, and when the network is back up, that data should be stored in the database too. One of the specific needs is to know how the temperature behaves during a power outage. Is there a standard approach on how to deal with this case? Any commercial HMI+Database already has this built in?
Here is how I think it could be done, any recommendation/suggestion is welcome:
-As the data is not changing rapidly, the HMI can be doing normal polls at 30s/60s intervals, for example. When the network is back up, the HMI will continue it's normal scan to update the current values, and start in parallel a faster scanning process to poll the RTU's for their logged data, until all that data is in the database.
-Another way could be having the gateway getting the data from the RTU's and send it (CSV via mail or ftp, for example) to the server where the database is hosted, and a helper application will then import to the database.
I am looking at MBLogic and PVBrowser, I think that with both, solutions like above could be implemented. I haven't yet installed latest MBLogic that can log to database. If I use MBLogic should I use the same database or create a separate database for Historical Data? In PVBrowser I've seen mails in the mailing list about connecting to databases. A web interface is needed, and some special plots too (2D or 3D plots for temperature view). In PVBrowser I think I can use GNUPlot for the plots, and I'll have to check how it behaves with standard browser. MBLogic is web HMI, so that part should be fine. In both cases, with the data in a database, the plots could be generated with PHP and some plot library.
FWIW, my background is ANSI (plain) C for embedded controllers. I think I have the skills to modify demos or example code of C++, Python or PHP, but if what I need to code has less OOP, would be better. I don't know SQL, but will be learning the basics to have working demo for this project.
Nelson
Basically, there will be a few RTU's with backup battery and logging capacity, that will be monitoring temperature and/or digital inputs mostly. A gateway will poll the data from the RTU's and a HMI should display that data and store it to a database. The RTU's and gateway device are proprietary, but if needed, it can be re-programmed. Right now it offers Modbus TCP connectivity. The main issue is that when the network is down, the RTU's will continue log their data locally, and when the network is back up, that data should be stored in the database too. One of the specific needs is to know how the temperature behaves during a power outage. Is there a standard approach on how to deal with this case? Any commercial HMI+Database already has this built in?
Here is how I think it could be done, any recommendation/suggestion is welcome:
-As the data is not changing rapidly, the HMI can be doing normal polls at 30s/60s intervals, for example. When the network is back up, the HMI will continue it's normal scan to update the current values, and start in parallel a faster scanning process to poll the RTU's for their logged data, until all that data is in the database.
-Another way could be having the gateway getting the data from the RTU's and send it (CSV via mail or ftp, for example) to the server where the database is hosted, and a helper application will then import to the database.
I am looking at MBLogic and PVBrowser, I think that with both, solutions like above could be implemented. I haven't yet installed latest MBLogic that can log to database. If I use MBLogic should I use the same database or create a separate database for Historical Data? In PVBrowser I've seen mails in the mailing list about connecting to databases. A web interface is needed, and some special plots too (2D or 3D plots for temperature view). In PVBrowser I think I can use GNUPlot for the plots, and I'll have to check how it behaves with standard browser. MBLogic is web HMI, so that part should be fine. In both cases, with the data in a database, the plots could be generated with PHP and some plot library.
FWIW, my background is ANSI (plain) C for embedded controllers. I think I have the skills to modify demos or example code of C++, Python or PHP, but if what I need to code has less OOP, would be better. I don't know SQL, but will be learning the basics to have working demo for this project.
Nelson