FYI, you may want to take a quick read of this old thread when the roboRIO came out. There are some part numbers in there for working photoeyes. Not all photoeyes will work without an external pullup resistor. Review the thread for more info.
You are looking for a 10-30vdc NPN photoeye, seeing you said AB, this part number was tested to work. 42CA-P2MNB-A2
We typically purchase the units with an integral cable, we also end up with a terminal strip by the roborio DIO side, to feed 12v power to the sensors from the VRM, and the signal wire, (typically white or black) the the signal socket of the female pwm connector to get plugged into the roborio.
https://www.chiefdelphi.com/forums/s...d.php?t=133484