The I/O module on the CoDeSys controller I have has PNP inputs. Here is the single channel rotary pulse generator/linear sensor combination (with NPN output) that I want to use.
It is being used to measure length of a masking paper for indexing after each cycle of a machine.
Yes you can but you will have to make sure that the pull-up is sufficient to get the input to a high enough voltage to work correctly. The max. output current of your device is 40mA so if you arrange for about a 10mA pull up that should suffice. If it doesn't work as expected check the output on a CRO once connected (you probably know that...).
I would say that you would be better off driving a PNP transistor with your NPN output through a resistor to the base. Connect the PNP emitter to +V and its collector to your PNP input of the PLC.
I am pretty sure Keyence, and maybe some other sensor manufacturers or terminal block manufacturers make a NPN-PNP converting terminal block. If I am remembering correctly the Keyence part was in the $10-20$ range and was in a convenient 6mm terminal block form.