Datasheet
TMC8460-BI Datasheet (V1.00 / 2016-Sep-01)
Copyright © 2016 TRINAMIC Motion Control GmbH & Co. KG 123
6.6.7 ENC_CONST
The encoder constant is a 32-bit fixed-point value that is added to or subtracted from the internal
accumulator. Depending on the bit enc_sel_decimal in the ENC_MODE register, the fractional part is
interpreted differently:
When enc_sel_decimal is 0:
(ENC_CONST_INT+(ENC_CONST_FRACT/65536)) is added to or subtracted from the accumulator
When enc_sel_decimal is 1:
(ENC_CONST_INT+(ENC_CONST_FRACT/10000)) is added to or subtracted from the accumulator
6.6.8 ENC_LATCH
The encoder position X_ENC is latched into this register on each N event.
Encoder Configuration Example:
ENC_MODE = 0x001c
Everytime while N is active (high), generate an N event regardless of the A and B inputs. Only latch
the value, do not clear X_ENC.
clr_enc_x = 0
neg_edge = 0
pos_edge = 0
clr_once = 0
clr_cont = 1
ignore_AB = 1
pol_N = 1
pol_B = 0
pol_A = 0
ENC_CONST = 0x00010000 (=65536)
Encoder constant = 1.0 ( each quadrature signal change counts either up or down)
Encoder constant examples for different encoders on a motor with 200 fullsteps/revolution and 256
microsteps/fullstep (51200 microsteps/revolution) to match encoder position and microstep position:
Table 139 : list of typical encoder constants
Encoder
resolution
Required
encoder factor
ENC_CONST Comment
200 256 0x01000000 No fractional part
360 142.2222
= 9320675.5555 /
2^16
= 1422222.2222 /
10000
0x008E38E4 No exact match possible. Since the absolute error
of the binary representation is smaller, this value
should be used.
500 102.4
= 6710886.4 /
2^16
= 1024000 /
10000
= 102 +
(4000/10000)
0x00660FA0
Exact match with decimal setting
enc_sel_decimal = 1
1000 51.2
= 51 +
(2000/10000)
0x003307D0 Exact match with decimal setting
enc_sel_decimal = 1
1024 50 0x00320000 No fractional part
4000 12.8
= 12 +
(8000/10000)
0x000C1F40 Exact match with decimal setting
enc_sel_decimal = 1
4096 12.5 0x000C8000 Binary fractional part