Procedure for the production of an ultrasonic sensor for a field device used in automation engineering, with a sensor body and an electromechanical transducer , which is arranged on a side surface of the sensor body via at least an adaptation layer , wherein a soundwave generated by the electromechanical transducer , after passing through the sensor body , propagates at a defined TARGET propagation speed at an exit surface of the sensor body , or wherein a soundwave generated by the electromechanical transducer propagates at a defined TARGET angle in relation to the perpendicular line to the exit surface in a medium adjacent to the exit surface , characterized in that the procedure comprises the following steps: • Provision of an oversized sensor body ; • Excitation of the soundwave via the electromechanical transducer ; • Determination of the current speed of propagation of the soundwave at the exit surface of the sensor body or determination of the current angle between the perpendicular line (N) to the exit surface and the direction of propagation of the soundwave in the medium ; • Determination of the difference between the current speed of propagation and the TARGET propagation speed of the soundwave at the exit surface of the sensor body or determination of the difference between the current angle and the defined TARGET angle between the perpendicular line to the exit surface and the direction of propagation of the soundwave in the medium ; • Determination of the difference between the speed of sound in the sensor body and the TARGET speed of sound; • Removal of material in the area of the exit surface of the sensor body , wherein the remaining material is sized in such a way that the current speed of propagation of the soundwave at the exit surface of the sensor body and/or the delay caused by the speed of sound in the sensor body at least approximately corresponds to the TARGET propagation speed of the soundwave at the exit surface of the sensor body , or in that the current angle between the perpendicular line to the exit surface and the direction of propagation at least approximately corresponds to the defined TARGET angle between the perpendicular line to the exit surface and the direction of propagation of the soundwave in the medium . • Provision of an oversized sensor body ; • Excitation of the soundwave via the electromechanical transducer ; • Determination of the current speed of propagation of the soundwave at the exit surface of the sensor body or determination of the current angle between the perpendicular line (N) to the exit surface and the direction of propagation of the soundwave in the medium ; • Determination of the difference between the current speed of propagation and the TARGET propagation speed of the soundwave at the exit surface of the sensor body or determination of the difference between the current angle and the defined TARGET angle between the perpendicular line to the exit surface and the direction of propagation of the soundwave in the medium ; • Determination of the difference between the speed of sound in the sensor body and the TARGET speed of sound; • Removal of material in the area of the exit surface of the sensor body , wherein the remaining material is sized in such a way that the current speed of propagation of the soundwave at the exit surface of the sensor body and/or the delay caused by the speed of sound in the sensor body at least approximately corresponds to the TARGET propagation speed of the soundwave at the exit surface of the sensor body , or in that the current angle between the perpendicular line to the exit surface and the direction of propagation at least approximately corresponds to the defined TARGET angle between the perpendicular line to the exit surface and the direction of propagation of the soundwave in the medium . <EOS>