A source of epithermal neutrons based on a vacuum-insulated tandem accelerator and a lithium target was proposed and developed for the technique of boron neutron capture therapy. A stationary proton beam of 2 MeV with a current of up to 6 mA was produced by the accelerator. To optimize the injection of a beam of negative hydrogen ions into the accelerator, a wire scanner OWS-30 (D-Pace, Canada) was installed . The main problem is that using the profilometer in the form in which it was provided does not allow us to determine the main beam parameters such as position and size. Also, the electron emission does not allow measurement of the total beam current and may lead to incorrect measurement of the beam profile. We have modernized the scanner by placing metal rings in front and behind the scanner with a negative potential to suppress the secondary emission of electrons from the scanner wires. We have developed software in which methods for calculating the position and size of the beam, methods for calculating the total current are implemented. Modernization of the scanner has made it possible to expand its capabilities. The suppression of the secondary electron emission made it possible to reconstruct the current profile of the ion beam and determine the value of the total current. The developed program allowed to display the coordinates of the beam, its dimensions and the total current. We are the first who proposed and implemented a new way of measurement of the beam emittance. A movable diaphragm was inserted in front of the wire scanner. Ion beams passing through the aperture of the diaphragm were measured by the wire scanner with a high level of detail when the diaphragm was moved along a radius. The use of a modernized scanner made it possible to detect the effect of space charge and the effect of the spherical aberrations of the focusing magnetic lenses on a beam of negative hydrogen ions. The use of the modernized scanner made it possible to optimize the injection of a beam of negative hydrogen ions into the accelerator, which led to an increase in the proton current and an improvement of the accelerator stability. The modernized scanner with an additional program for processing the results data and visualization has become a reliable device for beam diagnostics and for controlling beam entry into the accelerator.