What component do Photoelelectric sensors connect to?

I have been searching, and found what each wire needs,

Blue -> ( - )
Brown -> PWR
White or Black -> SIG

but I am not sure what component they go to. I have an Allen-Bradley 42JT sensor.

DIO on the RoboRIO, unless you’re using another sensor-processing board. You’ll need to make sure you have a connector attached properly for the DIO section.

The power needs to come from a 12v boosted source, like a VRM.
Signal and ground can both go to a DIO input.

Thanks! How do we then connect the ferrule crimps on signal and ground to the DIO ports of the RIO?

You need to use a standard PWM connector or cable to connect to the DIO.
You can cut an existing PWN cable and splice/solder/heat shrink the connections if you don’t have DIY PWM connectors and housings available.
Cut the ferrules off (or don’t put them on).
A ferrule can be used to get power from a VRM 12v/.5a output.

Here’s the datasheet which should be your first stop for things like this. As Mark said, power to 12V, ground to 0V, BLACK is your signal and should go to signal on a DIO. Also you apparently should look at the datasheet and do what is says to select “dedicated NPN” output, since the DIO is on a 5V pullup resistor.

For connecting you either need a set of connectors, crimps and crimping tool, or cut a PWM cable in half and splice your sensor wires to the cable.

The maximum input voltage for the DIO is shown as 5.25V on page 4 of the RoboRio specifications.

You should set the sensor to NPN mode as Kevin suggests but without the connection from the sensor output (pin 4) to the RoboRio input. Once it is set to NPN mode, you can connect the sensor output to the RoboRio. You should connect a 4.7 kOhm or 10 kOhm load resistor from the +5V pin on the RoboRio DIO to the sensor output. There is an internal 40 kOhm pull-up resistor but that is kind of weak.

In the PNP mode, the output can be pulled to the sensor supply voltage (12V). This exceeds the maximum input voltage of the RoboRio and may damage it.