defcon.klaxon
Lifetime Supporting Member
In a system I'm working on, remote well pump sites report to a central controller. Amongst other signals, the remote well pumps report the daily number of pump starts (and daily runtime hours). These values reset each night at midnight. What I'd like to do is display the daily number of starts and runtime hours on my HMI, as well as show an accumulated value for the life of the pump as well.
I'm thinking there has to be a simple way to program a function that would show the daily value, the accumulated value, and have them both increment simultaneously when the pump is running. The problem I'm facing is that of course with ladder logic, the purpose is to run over and over again, so I can't just add the values because they would accumulate every time the program ran through the ladder. So I'm thinking maybe I store the values in other variables, but the exact method is something I'm finding a bit challenging. I was wondering if someone had a suggestion for implementing this.
The functionality I'm thinking of similar to Excel being able to display a value in a cell that is based on the values of other cells, and that display cell just contains an equation. That's basically what I'm trying to do. The resetting value is creating another level of complexity, I think.
Anyway, if anyone has suggestion on how this might be implemented with logic, I'd love to see them. I can write this program either in ladder logic with function blocks, or in structured text a la IEC 61131-3. Thanks!
I'm thinking there has to be a simple way to program a function that would show the daily value, the accumulated value, and have them both increment simultaneously when the pump is running. The problem I'm facing is that of course with ladder logic, the purpose is to run over and over again, so I can't just add the values because they would accumulate every time the program ran through the ladder. So I'm thinking maybe I store the values in other variables, but the exact method is something I'm finding a bit challenging. I was wondering if someone had a suggestion for implementing this.
The functionality I'm thinking of similar to Excel being able to display a value in a cell that is based on the values of other cells, and that display cell just contains an equation. That's basically what I'm trying to do. The resetting value is creating another level of complexity, I think.
Anyway, if anyone has suggestion on how this might be implemented with logic, I'd love to see them. I can write this program either in ladder logic with function blocks, or in structured text a la IEC 61131-3. Thanks!