How to reverse direction on servo motor

More
02 May 2014 01:55 #46524 by greeder88
I have a problem reversing my direction.
I have dc brushed servos.
I have my encoders set to the proper + or - direction.
The problem I have is this direction causes runaway.
When I change the scale direction it stops the runaway however changes the encoder direction the wrong way.
What will change the motor direction without changing the encoders too?

Please Log in or Create an account to join the conversation.

More
02 May 2014 09:26 #46530 by PCW
Probably the best way with 7I77s is to change the sign of the scalemax parameter

setp hm2_5i25.0.7i77.0.1.analogoutN-scalemax 10

That is, if it was 10, changing the value to -10 will reverse the sign of the analog out
The following user(s) said Thank You: greeder88

Please Log in or Create an account to join the conversation.

More
02 May 2014 09:55 #46533 by Todd Zuercher
You could also revers the polarity on the motor wiring. But I would probably do what PCW suggested (or some similar hal trickery.)
The following user(s) said Thank You: greeder88

Please Log in or Create an account to join the conversation.

More
02 May 2014 13:39 #46535 by PCW
You have to be a bit careful about swapping motor leads
since if you have tachometer feedback, you will reverse the
velocity feedback direction, leading to runaway in the drive itself.

you can swap motor _and_ tachometer leads but its easier to change
it in the hal file.
The following user(s) said Thank You: greeder88

Please Log in or Create an account to join the conversation.

Time to create page: 0.137 seconds
Powered by Kunena Forum