In an electron cyclotron resonance (ECR) ion source, the magnetic field along the axis of the plasma chamber and extraction system is a key parameter. At Peking University, a new 2.45 GHz ECR ion source (PMECR III), dedicated to proton production, has been developed to investigate the influence of the magnetic field on the gas discharge and beam characteristics. The magnetic configuration is provided by two permanent magnet rings independently tunable along the source axis. Moreover, the beam extraction position changes by moving the whole magnetic system along the source axis and by using different lengths of plasma electrode. A brief description of the source is reported and the magnetic field influence results are presented.