Hi Graeme, HankMcSpank,

OK, that makes a bit more sense now, thank you. I'll check Hank's suggestion first - power it up without the resistor between black and brown and check the voltage on the black. If it is nothing then I have a simple switch and can follow up on your suggestions Graeme. I may need to clarify something with you but lets see what I have first.

If it is 24V then I have a pull-resistor inside the sensor and need to do something else as I know this board won't like 24V into the logic circuits!

I see Clive has posted as well so I'll have a read of his link next . . .

Thank you