SPRAC77E January 2022 – February 2022 TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S
An absolute encoder output represents the exact position of a rotating shaft. If Qmax is the resolution of a single rotation, then the position will range from 0 to Qmax. Resolutions in the range Q17 = 217 or Q20 = 2 20 are common. The absolute position increases when the direction is forward (clockwise) and decreases when the direction is reverse (counter-clockwise).
An incremental encoder output is a quadrature encoder pulse (QEP). This pulse train consists of the following outputs: QEP-A, QEP-B and QEP-I with the following characteristics:
The resolution of the incremental encoder is specified by the number of lines around the disk. As each line passes a sensor, an edge (falling or rising) is generated on QEP-A as shown in Figure 4-3. A second channel can be added by second ring of lines, inside and offset from the outer ring. In such a case, this inner ring of lines generates QEP-B. For example, a 1024 line encoder would have 1024 QEP-A lines and 1024 QEP-B lines for a total of 2048 QEP state changes in a full rotation.
In Abs2Qep, a configurable parameter in the header file defines how many QEP state transitions are generated per line. The QEP state transition is controlled by an internal CLB signal called QCLK as shown in Figure 4-3. The default setting is each line corresponds to two QCLK pulses.
The example in Table 4-1 further clarifies this point.
Line | QCLK | QEP-A | QEP-B |
---|---|---|---|
Line 1 Outer Ring | QCLK 1 | Rising Edge | |
Line 1 Inner Ring | QCLK 2 | Rising Edge | |
Line 2 Outer Ring | QCLK 3 | Falling Edge | |
Line 2 Inner Ring | QCLK 4 | Falling Edge |