When wiring a device to 2 different PLC cards, there is always a danger of shorts and overloads. The best way to do what you want to do is to wire the pnp sensor to a relay with a 24VDC coil, and use 2 sets of NO contacts for the two digital inputs. You could do as you suggest, as long as the power supply circuit is the same for both PLC cards. Bad things can happen (shorts, sparks, etc.) if the two DI cards are on separate circuits.