|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: We Need Serious Robot Help!
I suspect that since you opened two instances of the drive system, they were competing with each other.
I'm enclosing a VI that shows how we opened our Joystick and the Archade Drive System using 4 motors. The code only identifies a 2 motor drive system, the "Y" cable from PWM1 goes to both motor controllers on the left side and the "Y" cable from PWM2 goes to both motor controllers on the right side. All motor control's MUST be of the same type; ie: Talon, Victor, Jaguar. |
|
#2
|
||||
|
||||
|
Re: We Need Serious Robot Help!
Quote:
You only need to have one drive system, the default arcade drive code works fine for your application and did not need to be changed. I've attached a photo if you don't want to download Chris's code. |
|
#3
|
||||
|
||||
|
Re: We Need Serious Robot Help!
Quote:
This is actually not a direct result of using two drive systems (they cannot fight each other, drive one only uses PWM 1 and drive two PWM 2). The problem is because you have configured the left and right motors on each drive to feed to the same PWM, and then inverted one of them. So your code works like this (when you go forward). -->Get joystick value (1) -->Set leftmotor to inverted joystick value (-1) -->Set rightmotor to noninverted joystick value (1) -->Left motor is PWM 1, set PWM 1 to value of -1 -->Right motor is PWM 1, set PWM 1 to value of 1 Nothing ever happens because you make the motors go full forward and full backward as fast as the code can execute. Use Chris's code, but modify it for 4 talons (or use y-cables) Last edited by John : 21-01-2014 at 22:07. Reason: I should not have presumed that this is the only problem. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|