This paper describes a micromechanical reflective diffraction grating controlled by a variable magnetic field. Periodic variation of the tilt angle of the mirror elements produces modulation of the radiation intensity in the principal maxima of the diffraction pattern. A graphoanalytical method makes it possible to determine the tilt angles in a wide range of frequencies of the torsional vibrations.