Excitation of isobaric states in (p,n) reactions at 30 and 50 MeV