A method for determining a pump setpoint for delivering a desired volumetric flow rate of a substance through a channel comprises measuring a first volumetric flow rate through the channel for a first pump setpoint. The pump setpoint for delivering the desired volumetric flow rate is determined based on previously obtained performance curves of the pump and a flow resistance of the channel. Each performance curve represents the relation between flow rate and pressure at the pump's exit for a different setpoint. The flow resistance of the channel is determined based on said first volumetric flow rate and on the performance curves of the pump.