Beam blanker for interrupting a beam of charged particles, the beam blanker having an axis along which charged particles propagate before entering the beam blanker, the beam blanker comprising means for generating an electric field perpendicular to said axis, the electric field for deflecting the charged particles, and an aperture in a diaphragm, the aperture transmitting the beam when the beam is not interrupted and the diaphragm stopping the beam when the beam is interrupted, characterized in that the electric field is generated by a resonant structure with a resonant frequency f, the resonant structure equipped to generate an electric field that sweeps the beam over the aperture, the resonant structure comprising a resonant transmission line and a grounded conductor, the electric field generated between the two resonant transmission line and the grounded conductor, as a result of which the beam is transmitted through the aperture twice per period of the frequency f.