@tim-c Without knowing for sure since I do not not own such a printer, a little bit of googling suggests that these are 12-24V NPN inductive sensors which means that they require at least 12V to work reliably.
Have a look in this old thread: https://forum.duet3d.com/topic/12056/npn-12v-endstops-at-duet-wifi
If this is correct, it will behave as my old PL-08N2 inductive probe and output near input voltage when near a metal object. Just make sure that your input port can handle the higher (>3.3V signal) voltage.