Real time computer control of a reagent addition system