A focusdetector system of an X-ray apparatus is disclosed for generating projective or tomographic phase contrast recordings. The inventive method improves the performance of servomechanism control systems which utilize a digital feedback sensor by enabling the gain to be varied. A response is received from the device and a power setting is identified therefrom.