Independent direction control

Miniaturized tripple stepper motor controller ICs

Independent direction control

Postby avacta » 22 Jun 2012, 16:16

I'm using a TMC429 to control three TMC246 axes. Is there any way to independently control the positive direction of the axes? Like the "polarity_PH_AB" bit but independent for each axis? Swapping the left and right reference switches would have the same effect but I don't see a way to that either (except with my soldering iron!).

Thanks,

Mark
avacta
User
User
 
Posts: 4
Joined: 22 Jun 2012, 15:47

Re: Independent direction control

Postby Dr.LarsLarsson (TRINAMIC) » 22 Jun 2012, 21:31

You can control three independent axes by writing positions (ramp_mode) resp. velocities (velocity_mode) with positive or negative numbers into the associated registers. The numbers are represented as 2th complements (similar as integer numbers of type int in C).

It is recommended not to change the polarity of phase control bits within the SPI driver chain configuration to change the direction of motion.
the direction of motion.
User avatar
Dr.LarsLarsson (TRINAMIC)
Site Admin
 
Posts: 323
Joined: 21 Jul 2006, 14:46

Re: Independent direction control

Postby avacta » 26 Jun 2012, 16:14

Hi,
What I would like to be able to do is to correct in software for motors or cables that have been wired incorrectly such that the motor spins the wrong way.

Why is it not recommended to use the "polarity_PH_AB" bit?

Thanks,

Mark
avacta
User
User
 
Posts: 4
Joined: 22 Jun 2012, 15:47

Re: Independent direction control

Postby TRINAMIC_BD » 29 Jun 2012, 12:24

If it works for you, you can do it this way. It is just not recommended to use this bit for changing motor direction rather than using negative and positive velocities. But for "single" usage it is OK.
User avatar
TRINAMIC_BD
Site Admin
 
Posts: 2448
Joined: 25 Jul 2006, 12:21
Location: Hamburg (Germany)

Re: Independent direction control

Postby Dr.LarsLarsson (TRINAMIC) » 29 Jun 2012, 12:31

The TMC429 already takes care concerning the direction of motion: It counts up for movements into positive direction and it counts down for movements into negative direction.
User avatar
Dr.LarsLarsson (TRINAMIC)
Site Admin
 
Posts: 323
Joined: 21 Jul 2006, 14:46

Re: Independent direction control

Postby avacta » 02 Jul 2012, 15:57

Thanks for that, but I think I need to restate the original question. My problem is that if the motor spins the "wrong" way, then the limit switches don't work because it hits the positive limit while moving negatively and vica-versa. The "polarity_PH_AB" can be used to correct this, but it effects all three axes. My question is: is there a way to control this on a per-axis basis? Say I have one axis where the motor spins the wrong way (or if you prefer where the max and min limits are reversed), but the other two axes are OK, is there anything I can do in software?

Thanks,

Mark
avacta
User
User
 
Posts: 4
Joined: 22 Jun 2012, 15:47

Re: Independent direction control

Postby TRINAMIC_SK » 03 Jul 2012, 08:34

As the "polarity_PH_AB"-bit effects all axes you have two options to modify only a single axis:
Software option - make something like a software wrapper function that inverts the sign of the target velocite for the respective axis while configuring it into the TMC429.
Hardware option - change the phase wire connections of your motor to have it turning in the correct/inverted directions while leaving the software as is.
User avatar
TRINAMIC_SK
Site Admin
 
Posts: 55
Joined: 19 Apr 2010, 10:41
Location: Hamburg


Return to TMC428 / TMC429

Who is online

Users browsing this forum: No registered users and 1 guest

cron