Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Reversing motors (http://www.chiefdelphi.com/forums/showthread.php?t=41993)

railerobotics 16-01-2006 18:25

Reversing motors
 
We are using a tank type driving system. How do I make the motors on one side go in reverse.

devicenull 16-01-2006 18:27

Re: Reversing motors
 
pwmX = 255 - pwmX

Put that at the end of your code. Or you can switch around the wires going to the speed controller.

railerobotics 16-01-2006 18:32

Re: Reversing motors
 
It gives me a syntax error

Mr. Steve 16-01-2006 18:35

Re: Reversing motors
 
You need to substitute the X for the number.


An easier way would be to just take the motor wires running to the Victor speed controllers and switch them, plugging the red where the black was, and the black where the red was.

Just make sure to do this for the wires going from the motor to the Victor, not from the Victor to the panel.

devicenull 16-01-2006 18:35

Re: Reversing motors
 
by pwmX I mean pwm01.. 16 depending on which you are using.. Without seeing the actual code, I'm not sure why it would cause a syntax error.

railerobotics 16-01-2006 18:36

Re: Reversing motors
 
Oops, I put the code in the wrong place.
Now it works
Thanks for your help.


All times are GMT -5. The time now is 04:34.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi