encoder problem
I don't know AD PLCs, but, it is absolutetly impossible that the setup (which only affects how signals are treated logically) damages the encoder in any way.
From drawings of and by disassembling similar encoders, I found frequently a disc of some film-like material carrying a sequence of black and translucent stripes. Thes marks are read by an assembly of a light source and light sensitive devices, e.g. photo diodes.
Now, if the shaft leans to one side, the disk mounted at it's end either gets out of the focal plane of the detectors or it touches the light detectors or other components, so they make scratches to the disc.
If the disc gets out of focal plane, the detectors may produces a "noisy" signal getting an amount of ligtht that varies around the switching threshold.
Scratches would produce additional signal changes.
Normally, the encoder should produce two signals shifted by 90 degrees. The PLC evaluates this in a way that if Input A changes from 0 to 1 while input B is 0, it counts forward, if input B is 1, it counts backward.
Mostly, it also evaluates more or all other combinations of transitions of one and corresponding state of the other signal.
So if there are extra signal changes from scratches or from light intensity changes around detector threshold, let' say on signal A, you would get:
A 0->1 while B=0: count up; this is the normal transition
A 1->0 while B=0: count down; this is faulty a transition
A 0->1 while B=0: count up; this is faulty a transition
A 1->0 while B=0: count down; this is faulty a transition
A 0->1 while B=0: count up; this is faulty a transition
B 0->1 while A=1: count up; this is the next normal transition
A 0->1 while B=1: count down; this is faulty a transition
A 1->0 while B=1: count up; this is faulty a transition
...
You see, counts from faulty transitions cancel out here. But as scratches may be much narrower than the normal spacing of marks and gaps and oscillations around the threshold may be much faster than changes from normal operation, this leads to much higher frequencies. The PLC will not be able to follow them all. Then, they cannot cancel out any more.
This may lead to the effect that your total counter, missing more "down" than "up" transitions, reaches a very high count.