What is the frequency of Encoder pulses coming into PLC HSC inputs?
Are you using a quadrature Encoder with pulse phase A and pulse phase B?
If you are using quadrature Encoder pulses, phase A must be wired to PLC Input #3 and phase B must be wired to PLC Input #4 that is if PLC HSC #1 is being used. If PLC HSC #2 is being used, then, wired phase A to PLC Input #5 and phase B to PLC Input #6.
If you are not using both quadrature Encoder pulses, for example if you are only using phase A let us say connected to PLC Input #3, then, Input #4 must be permanently disconnected (open) in order for leading-edge of pulse arriving at Input #3 to increment count. If Input #4 is permanently connected to ground, the leading-edge of pulse arriving at Input #3 decrements count.
I am going to assume that you are using single phase (not quadrature) and the other HSC complement input is changing states and thus causing a reversal in direction of count .
Sincerely;
Albert Martinez
martinezalbert@yahoo.com