One sensor is outside the cage. When it detects Don Quixote, the cage door opens and closes after 2 seconds.
The other IR photoreflector is in the cage. When Don Quixote comes in front of it, after a 2 second delay, the carriage starts moving forward for 3 seconds and then stops.