Which type do you have? WEDS, single ended, open collector output, or WEDL, line driver output? Do you really need the I (index) channel?
How fast will the encoder be turning (RPM)?
Use INPUT_PULLUP mode for encoder inputs, they are often open-collector, although because this
is a differential unit that might not be the case, but why not make the code general?
Why do you have 3 copies of the code reading 3 different sets of pins?
I think you've been confused by the differentlal outputs.
For one encoder you only read A and B, ignore all the others, two input pins, one copy of the code
to detect changes. A/ and B/ is simply an inverted copes of A & B, there to provide better noise immunity in
an industrial environment.
The I output is index pulse, unless you are going to home the system using it, ignore it.
outsider:
Which type do you have? WEDS, single ended, open collector output, or WEDL, line driver output? Do you really need the I (index) channel?
How fast will the encoder be turning (RPM)?
Line driver with a RS422 protocol.
I just thought I will use all the channels for more accurate readings? I will look into what is an index channel.
The RPM is variable depending on each situation, how is it interfering with the encoder?
MarkT:
Use INPUT_PULLUP mode for encoder inputs, they are often open-collector, although because this
is a differential unit that might not be the case, but why not make the code general?
The I output is index pulse, unless you are going to home the system using it, ignore it.
I might need homing in the future, but I believe the code is more accurate with A,B and A/B/ channels.
jremington:
Post a wiring diagram (anything but Fritzing).