If the excisting encoder is a 24V line driver type, then you can easily connect both PLC inputs (old & new PLC) in parallel.
If it's an open collector (NPN or pull down) output type, I would suggest using diodes in series with every PLC input, since voltage levels between old & new PLC's might be different.