Thanks Richard.

My problem is to find that rate of change.

I have a sensor that gives me the level of the tank. Also a variable 'rate' that is set by the user.

Now I have to combine these two and decide how many pumps should work at a time.

Ioannis