Can I drive the infrared beacon LEDs with a frequency generator, set at 40 KHz, 50% duty cycle, and then observe the infrared sensors output change state?
Yes (and mostly no). You’ll see a brief low-going pulse when you turn on the frequency generator and then, mysteriously, nothing. You’ll see a note on page five of the data sheet that says the device will discriminate against continuous 40KHz signals. To get a continuous stream of output pulses from the sensor you’re going to have send it bursts of modulated infrared light, like the beacon does.