The sensor i.e. light curtain (1), has a sensor unit with a transmitter and a receiver for monitoring a protection field. An evaluation unit generates a stop command for a machine or system as a safety function during detection of an object in the protection field. An external or internal bypass unit is arranged for bypassing the safety function of the sensor, when an object existing signal is registered within an interval of two independent signal sources. One of the signal sources is automatically integrated in the safety sensor.