How to wire pull-down/up on an N or P channel MOSFET?
You probably want to use an N-channel MOSFET only and put the pullup (if you need one) between drain and +24. This is equivalent to an "NPN output" aka "sinking" in industrial control terminology. 

In that case the PLC input will typically be "current sourcing" and you will not need a pullup resistor. Image from this web page. 

If you do add a pullup (and if it is low enough value) it may be able to drive a PLC current sinking input. 



Driving a P-channel from a 5V signal (sourcing or PNP output) is a bit more complex and requires level shifting if the 0V/5V ground is not common with the +24V ground.