The method involves dividing a measuring sequence based on the type of sequence in time slices, where each slice is assigned to time slice type, a transmission type, or a receiving type. Variables are assigning to each time slice, and one variable describing the time slice is assigned to each parameter. Resolution values of the variables, with which a given target parameter of the sequence is optimized under consideration of boundary conditions, are determined. The sequence executable on hardware by assigning the resolution values to the appropriate parameters of the time slices is obtained. An independent claim is also included for a computer program, which implements a method for generating a measuring sequence.