It's likely that the transmitter sends IR on some carrier frequency and the receiver takes time - several pulses (reps) have to be missing before it loses lock.
Post the code
Post schematics
Post links to the item
Where the heck is the data sheet for that sensor. Who cares if its a sale site. I have posted links to RS, Digikey and Farnell parts more times than I can remember in here and they are sales sites.
Is it possible you have not given us the information you are supposed to, as stated in the posting guidelines ?
We need information from you to be able to help you with your project.
- Attach your Schematic
- Give us links to datasheets
- Attach your sketch which you are using
- Attach good images showing your actual wiring
We understand you want things solved now but that does not give you the right to use sarcasm with volunteers.
Simple IR beam break sensors can be of 2 versions.
- version one uses a plain IR TX LED and a simple IR receiver like a phototransistor
- Version two uses a simple IR TX LED that needs to output a modulated pulse train, the receiver needs to demodulate this pulse train