pardon my ignorance, but i dont undestand 10v in and 28v out
The input voltage powers the photosensor. The
maximum voltage is 10V. However 5V is all it requires.
The output uses an open collector transistor that acts like a normally open contact to ground, just like a mechanical switch. The maximum voltage it can withstand is 28V.
There are many low cost voltage regulators on eBay, Here is one example.
https://www.ebay.com/itm/403714437758?You can use it to reduce your 12V to 5V for supplying the photo sensor.
This one's output is set by two areas marked A and B where you blob two pads together with solder.
There is a chart to show you how to set the voltage. For 5V there's no blob on A and a blob on B.