TMC423 Encoder position register

TMC423 Encoder position register

Postby krunal_299 » 07 Jun 2007, 10:06

According to the 423 datasheet, i don't get myself cleared how the contents of encoder position register going to be changed on reading the encoder pulses.
Does this position reg. incremented/decremented by 1 either on each compelete pulse of channel A or on every transition of the pulse?
More explicitly, with initial value of 000hex in Encoder position reg. and prescalar set to 1.6, what will be the data this reg have after detecting 400 pulses on channel A from relevant encoder?(calculate for 1000 PPR encoder and 6400 microstep).
With waiting 4 your reply.
krunal_299
Power User
Power User
 
Posts: 73
Joined: 02 Jun 2007, 16:04
Location: India

Postby TRINAMIC_BD » 07 Jun 2007, 11:23

The TMC-423 counts up / down with every encoder step, using quadrature evalution of the encoder signal, i.e. a 1024 line encoder give 4096 counts per rotation. When you use the scaling function, it counts up / down by a value which is given by the pre-scaler factor.
When you do not find a fitting pre-scaler factor for your system requirements, it is most universal to work with a factor of 1, and do a scaling later on in software.
User avatar
TRINAMIC_BD
Site Admin
 
Posts: 2441
Joined: 25 Jul 2006, 12:21
Location: Hamburg (Germany)

Postby krunal_299 » 07 Jun 2007, 12:23

ok Thank you very much !
so with following example:

with initial value of 000hex in Encoder position reg. and prescalar set to 1.6, what will be the data this reg have after detecting 400 pulses on channel A from relevant encoder?(calculate for 1000 PPR encoder and 6400 microstep).

The data of position reg. is= 190hex(400 dec)
am i right?
if yes then with proper prescalar factor we get the exact no. of microsteps of motor in position reg. ok?
let it be cleared to me.
krunal_299
Power User
Power User
 
Posts: 73
Joined: 02 Jun 2007, 16:04
Location: India

Postby TRINAMIC_BD » 07 Jun 2007, 12:36

400 pulses on channel A means 400*4=1600 encoder steps, because it also means 400 pulses on channel B, i.e. each 800 transitions. The position counter thus counts 1600*pre_scaler=1600*1.6=2560.

For the 1000 PPR encoder and 6400 microstep, you need a pre-scaler of 6400 / (4*1000)=1.6.
Last edited by TRINAMIC_BD on 07 Jun 2007, 13:27, edited 1 time in total.
User avatar
TRINAMIC_BD
Site Admin
 
Posts: 2441
Joined: 25 Jul 2006, 12:21
Location: Hamburg (Germany)

Encoder does not count steps. It indicates position

Postby Andrew » 07 Jun 2007, 13:03

I am not sure what exactly you are trying to adjust the prescaler for, and what is your perception of what you might achieve.
I just would note that an encoder does not count steps. It indicates position.
Position is not rock solid.
Microsteps are not rock solid either.
There will always be deviation.

Trinamic Motion Control Language (TMCL) has a parameter for deviation, and how to treat deviation. Which exactly these parameters are depends on the model of a module. Although I think that they must be unified across all models, especially that now all modules can attach to an encoder.
This note is a general one.
Of course you are talking about a chip, rather than a module. Still you might want to mimic the behaviour of TMCL in your circuit board. Yet you do use an Evaluation board, which has TMCL on board.

For postion related articles you may want to read starting from here:
http://www.trinamic.com/ttdg/viewtopic.php?t=469
Andrew
 

Postby krunal_299 » 07 Jun 2007, 13:41

Thnx for such a QUICK response!
so from this discussion, i conclude the following statement for encoder relating caculation within the 423:

With proper prescalar factor setting, the encoder position register represents the no. of microsteps motor has taken.
pls let me know anything i misunderstood by this conclusion.
With Warm Regrads!
krunal_299
Power User
Power User
 
Posts: 73
Joined: 02 Jun 2007, 16:04
Location: India

Postby TRINAMIC_BD » 07 Jun 2007, 13:52

Exactly! We have just again updated the TMC423 documentation, to better explain the meaning of the pre-scaler factor bits.

With best regards,
Bernhard
User avatar
TRINAMIC_BD
Site Admin
 
Posts: 2441
Joined: 25 Jul 2006, 12:21
Location: Hamburg (Germany)

Encoder cannot count steps. Controller does

Postby Andrew » 07 Jun 2007, 23:34

krunal_299 wrote:the encoder position register represents the no. of microsteps motor has taken
I think this is wrong. You both ignored my note:
Andrew wrote:an encoder does not count steps. It indicates position.

Please note, that Bernhard meant steps of encoder. Not steps of a motor.

Physically encoder cannot count steps.
Controller does count steps. - Not encoder.

In order for a measurement device to count steps of another device - a motor - the measurement device needs to be super smart, so that it discerns between a step, and an ambient deviation.
Andrew
 


Return to Other ICs

Who is online

Users browsing this forum: No registered users and 0 guests

cron