Home Products Application Notes Technical Articles Reps & Distributors Literature Request Samples Contact Us Corporate Sites Computer Optical Products, Inc., Chatsworth, California

Absolute Encoders
Application Note

The disadvantage of incremental encoders is the loss of position data at power-down. This is not a problem if the system can be re-initialized on power up by searching for the index and re-setting the position counters. Where this is impractical, an absolute encoder should be used. With this type of encoder, position information is instantly available as a digital word on power-up. COPI absolute encoders are available with a wordlength of 8, 10 and 12 bits for single-turn encoders and 24 bits for the CP-850-24MT multi-turn encoder.

The disk of an absolute encoder is patterned with a number of discrete tracks, corresponding to the wordlength:

The pattern shown for this 4 bit encoder is "reflected binary" or "Gray" code. The advantage of this pattern is that from position to position only one bit changes state. Gray code is used in all COPI encoders because of the practical difficulties a "natural" or "straight" binary pattern would represent in the construction. Small differences in gain of the photo-elements would make the individual channels switch at slightly different positions, causing potentially large differences in the binary representation.

Converting Gray code output to binary can be done with a few lines of programming in a PLC or electronically with an array of exclusive-OR gates:

Various COPI encoders have built-in translators to convert the Gray code generated by the disk into natural binary (CP-850-12NB) or into binary coded decimal (CP-850-12BCD). These are not "handshake" outputs (no "data ready" line) : if used with a processor or PLC a few "read" and "compare with previous value" instructions must be performed to make sure the outputs have stabilized from the internal Gray code through the translator EOR gates to the outputs.

An alternative is to use a Gray-code encoder and convert to binary by means of a short software routine (12 bit encoder):

		BEGIN: set B0 through B11 = 1
		B11 = G11
		IF B11 = G10 THEN B10 = 0
		IF B10 =  G9 THEN B9 = 0
		IF B9  =  G8 THEN B8 = 0
		IF B8  =  G7 THEN B7 = 0
		IF B7  =  G6 THEN B6 = 0
		IF B6  =  G5 THEN B5 = 0
		IF B5  =  G4 THEN B4 = 0
		IF B4  =  G3 THEN B3 = 0
		IF B3  =  G2 THEN B2 = 0
		IF B2  =  G1 THEN B1 = 0
		IF B1  =  G0 THEN B0 = 0
		DONE

For fast conversions, a 4096 words x 12 bit matrix can be set up, using the Gray code as address.

To convert binary code into Gray code, the word to be converted is added without carry to the same word one position right-shifted, disregarding the rightmost digit of the result:

		binary:	1 0 1 1   (= 11)
			  1 0 1 1
		Gray:	1 1 1 0 1

In addition to the strictly parallel binary format, COPI manufactures encoders that internally convert the digital word into an analog output by means of a D to A converter for 0 - 10 V output or a further conversion of the analog voltage into a 4 - 20 mA loop transmitter. These encoders can be used in situations where excessive wear would make traditional contacting potentiometers impractical or unreliable. Custom patterns, e.g. for valve control, can be readily made by changing the code pattern on the disk. It is, for instance, possible to have a 1° resolution per position repeated twice over a full revolution.


Home | Products | Applications | Articles | Distributors

Literature Request | Samples | Contact Us | Corporate Sites
| Directions

24 Dec 1996