bulletin blues
Lifetime Supporting Member
Hello all, About 6 months ago I was attempting to wire and program an encoder to a plc. I ran into some snags. The card was taken from the TEST bench when we actually needed the card for a piece of equipment and I haven't really had a chance to hook up another one. At the time I was using a PLC5 and 6200 software (dont ask). The encoder was 1200 counts per rev. So... I was able to get the counts into the data table. I believe somehow or another I was moving them to an integer file. I then did some math to say IF equal to 1200 then reset to Zero. I then used another counter to count how many times I was at 1200. The reason for this was... I figured to kind of emulate IF one revolution translated to say 2 inches linear, and I wanted to move something 6 inches, I would need to keep track of the revolutions. The problem I had was this was not accurate at all. One thing I did notice was
if I turned the encoder Very Slowly until I reached 1199 counts and put a mark on the encoder shaft at 12 o'clock the next revolution my mark would be at about 12:05 and after spinning the encoder Fast several times my mark would be at about 4 o'clock or worse. So Im just wondering If Im going about this all wrong i.e. using the math instructions or am I on the right track? Any info would help. Thank you
if I turned the encoder Very Slowly until I reached 1199 counts and put a mark on the encoder shaft at 12 o'clock the next revolution my mark would be at about 12:05 and after spinning the encoder Fast several times my mark would be at about 4 o'clock or worse. So Im just wondering If Im going about this all wrong i.e. using the math instructions or am I on the right track? Any info would help. Thank you