Use a pull-up resistor
If you connect a pull-up resistor between the +24 volt supply and the sensor output, you can connect the sensor to a sinking (PNP) input. However, there are a few things to be aware of.
When the sensor output is "on" (connected to 24 volt common), the PLC input will be "off" (zero input). If necessary, this can usually be inverted in the PLC logic.
When the sensor output is "off" (sensor output open), the PLC input will not see a full 24 volts. Having 2 inputs in parallel will give a lower voltage than 1 input. Usually a 24 volt PLC Input will operate down to 10 or 12 volts so check the PLC specs.
The value of the pull-up resistor is critical. If the resistance is too high, the PLC input voltage will not be high enough to turn the input on. If the resistance is too low, you will overload the sensor output. As I don't know the specs of the sensor or PLC you are using, I will give you an example of sizing the resistor to the minimum resistance value for a typical sensor.
Typical sensor max. output current = 200 mA
Minimum resistor value = 24 volts/.2 amps = 120 ohms
Resistor Wattage = 24 volts x .2 amps = 4.8 watts
From experience, I would say that this value should allow you to drive 2 Inputs on most PLCs. Connect the sensor and resistor to the PLC and turn off the sensor output. Measure the PLC Input voltage and confirm it is more than the minimum voltage needed to turn on the input.
Good Luck