Gray encoder

pauly

Member
Join Date
May 2002
Location
South Wales,U.k
Posts
244
I have an ssi encoder connected through a Stegman spa3 serial to parallel converter to my plc. I am converting the Gray inputs to an integer but the value instead of going to max and then to zero it is counting backwards from max to zero. I have had this problem before and I coudn't fix it then. Any ideas?
 
The quickest, universal solution, is just subtract the actual count value (from the encoder) from the maximum count value.


If the encoder max count value is 1023:
1023 - Curr_Count = Direction_Inverted_Count

1023 - 0 = 1023
1023 - 1023 = 0
1023 - 1022 = 1 etc.
 
Pauly

As you are using the SPA3 convertor you can very simply reverse the counting direction of the encoder by reversing the polarity of Pin10 on the 37 pin parallel connector, if you have this pin at 0V simply apply +VE to it and vice versa.

Paul
 
I should have explained a little better, the count goes from 0 - max and then instead of resetting to zero which I was expecting and counting to max again it counts down to zero from the maximum.
RDRast youre idea sounds good I'll give it a try.Thanks Plucas.
 
Gray encoder again

Hang on Rdrast if I subtract the actual count from the max count then the result will still be up and down surely??
 
Are you sure you have properly converted the Grey signal to an Integer? The description you gave is what an untranslated Grey signal, minus the MSB, kind of looks like.
 
Multi turn gray encoder??

Okay I get the conversion from Gray to binary, if I have a multi turn encoder how would that get converted? Same way or would you treat the "turns" bits differntly?
Thanks Pauly
 

Similar Topics

Hey guys, Although I've poured through this forum for help in the past this is my first post. I am looking at replacing obsolete Baumer IVO...
Replies
6
Views
1,938
First time I have used an absolute encoder and it is definitely:banghead:. I have a Siemens 6FX2001-5FN25...
Replies
21
Views
6,039
I am migrating a PLC-5 to CLX. I do not have the option of changing out the existing encoders (845D-SJHZ25AGCW4). 8-24v DC, 256...
Replies
0
Views
1,589
Hi I have a question about a gray code absolute 8 bit encoder. The encoder is connected to 8 inputs on an Allen Bradley PLC. if you turn the...
Replies
6
Views
2,258
Any recommendation on using a gray code encoder as input to a compactlogix PLC to trigger a digital input every 15 degree position on a rotary...
Replies
3
Views
2,768
Back
Top Bottom