Comparing the measuring value with a reference value which periodically or incidentally scans the measuring range