Hourly rate counter / accum
Hourly rate counter / accum
(OP)
A couple of us have been trying to figure out how to develop an hourly rate counter for a robtic operation. We are using RSLogix5000 but it wouldn't have to be that platform. I know the basic operation has to be simple, but we're coming up with some interesting issues. Let me know if anyone would like to discuss this. Thanks





RE: Hourly rate counter / accum
You need to know how often you want the rate updated. In my example I will use 5 seconds, but it could be any reasonable amount of time.
Use a 5 second self-resetting timer.
When the timer done bit is true:
1. Subtract register-1 from current counter value, store in register-2.
2. Move current counter value to register-1.
3. Multiply register-2 to get one hour rate, in my example that would be 720. (There are 720, 5 second intervals in an hour. If the timer was for 1 second then you would multiple by 3600.)
4. Store the results of step 3, in register-3, this register can then be linked to an HMI, display, etc...