Datasheet
TMC4361A Datasheet | Document Revision 1.22 • 2017-JAN-12
64/230
© 2015 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany — Terms of delivery and rights
to technical change reserved. Download newest version at: www.trinamic.com .
Read entire documentation; especially the “Supplemental Directives” on page 224.
MAIN MANUAL
Position Comparison of Internal Values
TMC4361A provides several ways of comparing internal values. The position comparison
process is permanently active and associated with one flag and one event. A positive
comparison result can be forwarded through the INTR pin using the
POS_COMP_REACHED
event as interrupt source or by using the TARGET_REACHED pin as explained in section 8.4.2,
page 63.
How to compare the internal position with an arbitrary value:
Action:
Select a comparison value in the
POS_COMP
register 0x32.
Select
pos_comp_source
= 0 (
REFERENCE_CONF
register 0x01).
Result:
XACTUAL
is compared with
POS_COMP
. When
POS_COMP
equals
XACTUAL
the
POS_COMP_REACHED_F
lag becomes set and the
POS_COMP_REACHED
event
becomes released.
How to compare the external position with an arbitrary value:
Action:
Select a comparison value in the
POS_COMP
register 0x32.
Select
pos_comp_source
= 1 (
REFERENCE _CONF
register 0x01).
Result:
ENC_POS
is compared with
POS_COMP
. When
POS_COMP
equals
ENC_POS
the
POS_COMP_REACHED_F
lag becomes set and the
POS_COMP_REACHED
event
becomes released.
NOTE:
Because ENC_POS represents microsteps and not encoder steps, POS_COMP
represents also microsteps for the comparison process with external positions.
In case ENC_POS moves past POS_COMP without assuming the same value as
POS_COMP, the POS_COMP_REACHED event is not flagged but is nonetheless
listed in the EVENTS register in order to indicate that it has traversed.
In addition to comparing
XACTUAL
/
ENC_POS
with
POS_COMP
, it is also possible to
conduct a comparison of one of both parameters with
X_HOME
or
X_LATCH
resp.
ENC_LATCH
. TMC4361A also allows comparison of the revolution counter
REV_CNT
against
POS_COMP
.
Only the selected combination generates the
POS_COMP_REACHED_
Flag
and the corresponding event. Therefore, select
modified_pos_compare
in
the
REFERENCE_CONF
register 0x01 as outlined in the table below:
Basic
Comparison
Settings
Select External
Position as
Comparison
Base
Comparison
selection grid
SETTINGS
ALERT
!
Comparison Selection Grid
pos_comp_source
modified_pos_compare
‘0’
‘1’
‘00’
XACTUAL
vs.
POS_COMP
ENC_POS
vs.
POS_COMP
‘01’
XACTUAL
vs.
X_HOME
ENC_POS
vs.
X_HOME
‘10’
XACTUAL
vs
. X_LATCH
ENC_POS
vs.
ENC_LATCH
‘11’
REV_CNT
vs.
POS_COMP
Table 27: Comparison Selection Grid to generate POS_COMP_REACHED_Flag