Active diffraction gratings: Development and tests