Method for detecting a foam boundary (2.1) in a container of a device by means of a capacitively operating measuring device having a sensor which can be moved, wherein at least one output signal (s out (t)) is processed by the capacitively operating measuring device, wherein the method comprises the following steps which are carried out during the execution of an up or down movement of the sensor in the container; a. performing a charging operation by predetermining an input signal (s in (t)) which causes a charging operation at a total capacitance (C T), wherein said total capacitance is formed from the sensor, air, foam and liquid, which is in the container, b. providing the at least one output signal (s out1 (t), s out2 (t)) at a first comparator and at a second comparator, wherein the first comparator is adapted to provide a first comparator output signal if the at least one output signal (s out1 (t), s out2 (t)) reaches a first reference voltage (U 1), and wherein the second comparator is adapted to provide a second comparator output signal if the at least one output signal (s out1 (t), s out2 (t)) reaches a second reference voltage (U 2), c. discharging the sensor, d. repeating steps a. to c., characterized in that the second reference voltage (U 2) is greater than the first reference voltage (U 1), and that the first comparator output signal and the second comparator output signal are put in relation to each other within the framework of an evaluation process in order to determine B1. whether the output signal (s out1) of the sensor in immerged state rises faster in an initial range (t < Tx, U C < Ux) than the output signal (s out2) of the sensor in emerged state, and B2. whether the output signal (s out1) of the sensor in immerged state rises more slowly in a range after the initial range (t > Tx, U C > Ux) than the output signal (s out2) of the sensor in emerged state, and if the conditions B1. and B2. are fulfilled outputting a detection (Kf) of a foam limit (2.1), wherein the output signal (s out1) of the sensor in immerged state and the output signal (s out2) of the sensor in emerged state have the same value (Ux) at a point in time (t = Tx) at the end of the initial range. a. performing a charging operation by predetermining an input signal (s in (t)) which causes a charging operation at a total capacitance (C T), wherein said total capacitance is formed from the sensor, air, foam and liquid, which is in the container, b. providing the at least one output signal (s out1 (t), s out2 (t)) at a first comparator and at a second comparator, wherein the first comparator is adapted to provide a first comparator output signal if the at least one output signal (s out1 (t), s out2 (t)) reaches a first reference voltage (U 1), and wherein the second comparator is adapted to provide a second comparator output signal if the at least one output signal (s out1 (t), s out2 (t)) reaches a second reference voltage (U 2), c. discharging the sensor, d. repeating steps a. to c., characterized in that the second reference voltage (U 2) is greater than the first reference voltage (U 1), and that the first comparator output signal and the second comparator output signal are put in relation to each other within the framework of an evaluation process in order to determine B1. whether the output signal (s out1) of the sensor in immerged state rises faster in an initial range (t < Tx, U C < Ux) than the output signal (s out2) of the sensor in emerged state, and B2. whether the output signal (s out1) of the sensor in immerged state rises more slowly in a range after the initial range (t > Tx, U C > Ux) than the output signal (s out2) of the sensor in emerged state, and B1. whether the output signal (s out1) of the sensor in immerged state rises faster in an initial range (t < Tx, U C < Ux) than the output signal (s out2) of the sensor in emerged state, and B2. whether the output signal (s out1) of the sensor in immerged state rises more slowly in a range after the initial range (t > Tx, U C > Ux) than the output signal (s out2) of the sensor in emerged state, and