looking for some advice on the best way to implement a solution to a problem.
I need an alarm to generate when a pump status is ''running'' on the following conditions;
- if the pump starts twice in an hour
or
- the pump has been running for longer than 10 minutes.
Just after a bit of advice on the best function blocks to use. any help much appreciated.
You'll need 2 Retentive timers. 1 to keep track of the pump having run for more than 10 minutes (set point of 600 seconds), the other to keep track of how long it has been since the last time the pump turned on (set point of 3600 seconds). The retentive timer gives you the advatage of storing the time to non-volatile memory, meaning a controller or module download will not result in the reset of the timers.
The First timer should be set when the pump runs. The first stops and resets when the pump stops using a set of condition blocks. The timer also triggers the alarm parameter when it has reached its setpoint of 600 seconds.
The second timer should be set by a set/reset block that will latch the motor run status to keep the hour timer running even after the motor stopped. A condition block can monitor if the timer value is between 0 and 3600 AND the motor run status is true. This will trigger the the alarm.
The second timer stops and resets when the motor starts and the timed value is greater than 0 (but make sure to sequence the reset logic after the alarm monitor logic).
The big question is when should the alarm become inactive? Should it become inactive the next time the pump runs < 10 minutes AND less than twice in one hour? Should it become inactive immediately after becoming active (leaving it unacknowledged), or should it become inactive after it has been acknowledged (which means a subsequent occurrence can be missed). I would suggest #1, but that is definitely the trickiest to implement.