PNP high-side switching with logic reverse
simulate this circuit &ndash; Schematic created using CircuitLab
Figure 1. Here's the general idea using a MOSFET.

For PNP output Q1 is held on by R1. Q1 will turn off when Q2 (the PLC output) turns on.
For NPN output Q3 is held off by R4. Q3 will turn on when Q4 (the PLC output) turns on.




simulate this circuit
Figure 2. With the addition of an external opto-isolator both PNP and NPN modes become non-inverting.
The application seems a bit daft as with a second pole on the switch the load could be switched to operate as shown in Figure 3.



simulate this circuit
Figure 3. No-nonsense solution using DPDT switch.