|
Page 1 of 1
|
[ 6 posts ] |
|
Motors Not Responding When Using Multiple Motor Controllers
| Author |
Message |
|
MC_Mirth
Rookie
Joined: Tue Nov 25, 2008 2:48 pm Posts: 3
|
 Motors Not Responding When Using Multiple Motor Controllers
Our team recently purchased a new motor controller  We have daisy-chained all of the controllers off of sensor port 1 (Motor, Motor, Servo). We have changed the motors and sensors set up to option 1. The problem is that the only motors that respond are those attached to the first controller in the chain. The debugger window inside of RobotC says that the motors are responding, but they are not physically responding. 
|
| Wed Jan 14, 2009 5:31 pm |
|
 |
|
Sunny1261
Novice
Joined: Thu Oct 09, 2008 7:58 pm Posts: 79
|
 Re: Motors Not Responding When Using Multiple Motor Controllers
Hm...well let's a do a bit of testing then.  . 1. Make sure you using ROBOTC 1.46. 2. Make sure that your electrical is properly wired. ie, the output electricity from the first motor controller goes into the input slots into the second motor controller. You'll need to do that. A good way would be a plug in a Servo on your Servo Controller and see if that works. If it doesn't, I'm pretty sure your problem is power flow. 3. Make sure your wires in general are properly connected. Make sure that the wires are properly connected to the motors and make sure the wires are in turn properly connected to the motor controller. 4. Test for a bad motor controller. Take the one which isn't working and plug that into the NXT directly and power it up with the FTC extra battery and make sure that your motor encoder actually *works*. If it doesn't, then you need to contacts Pitsco about this and request a replacement. 5. Make sure the order of the set up is correct. Motor -> Motor -> Servo. While they maybe look a little different, someone working hard and in a rush might not notice the immediate difference. Let me/us know if these steps don't work and we'll figure something else out.
|
| Wed Jan 14, 2009 5:49 pm |
|
 |
|
MC_Mirth
Rookie
Joined: Tue Nov 25, 2008 2:48 pm Posts: 3
|
 Re: Motors Not Responding When Using Multiple Motor Controllers
1. Check. We are using RobotC 1.46, our firmware is up-to-date, and the platform type is FTC.
2. The battery is wired correctly. You'll have to further explain the servo test. I don't understand exactly what you mean by that.
3. Wires are connected properly at this stage.
4. I don't think that it is a bad motor controller because if the order is switched the other two still don't work. (i.e. Motor A --> Motor B --> Servo -- Motor A responds, no Servos; Motor B --> Motor A --> Servo -- Motor A responds, no Servos).
5. Order is correct.
Also, I have more information that may help in diagnosing the problem. When we go into motors and sensors setup and try to configure a custom order and run our program, we get an error message:
Byte Code Intercepter Exception: Program Slot: 0, Task ID: main[0] Error at PC: BAD_LOC +0x9900 Task PC: BAD_LOC +0x9900, Task State: 'Exception' Exception Type: 'Motor out of range(2)'
|
| Fri Jan 16, 2009 2:23 pm |
|
 |
|
Sunny1261
Novice
Joined: Thu Oct 09, 2008 7:58 pm Posts: 79
|
 Re: Motors Not Responding When Using Multiple Motor Controllers
Ok.
A servo test would be used to confirm that you have the electrical layout wired properly. Take the current configuration you have, Motor Controller -> Motor Controller -> Servo Controller, and then plug in a Servo and see if the servo physically responds. If it does, then your power flow is not the problem. If the servo does not move, then your problem is power flow and somewhere along the line, your power is being cut off.
If the servo test is good, then go ahead and post the code. It could be a problem with what u did.
|
| Fri Jan 16, 2009 6:56 pm |
|
 |
|
MC_Mirth
Rookie
Joined: Tue Nov 25, 2008 2:48 pm Posts: 3
|
 Re: Motors Not Responding When Using Multiple Motor Controllers
The servo is getting power. I know this because when the power is switched on from the battery the servo twitches. The problem is that the servo does not respond to controller movements. Here is our code *Note: This is not using the new template--we haven't switched our code yet:  |  |  |  | Code: #pragma config(Hubs, S1, HTMotor, HTServo, HTMotor, none) #pragma config(Motor, mtr_S1_C1_1, MotorR, tmotorNormal, openLoop, reversed) #pragma config(Motor, mtr_S1_C1_2, MotorL, tmotorNormal, openLoop) #pragma config(Motor, mtr_S1_C3_1, ArmMotorR, tmotorNormal, openLoop) #pragma config(Motor, mtr_S1_C3_2, ArmMotorL, tmotorNormal, openLoop) #pragma config(Servo, servo1, servo1arm, tServoNormal) #pragma config(Servo, servo2, servo2arm, tServoNormal) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#include "JoystickDriver.c"
task main() { while (true) { getJoystickSettings(joystick);
if (joystick.StopPgm) // stopped { nxtDisplayTextLine(2, "Disabled, Fool!"); motor[MotorR] = 0; motor[MotorL] = 0; wait1Msec(50); continue; }
if (!joystick.UserMode) // autonomous mode { nxtDisplayTextLine(2, "Autonomous");
}
else // teleop mode { nxtDisplayTextLine(2, "TeleOp, Fool!"); if (joystick.joy1_y1 < 5 && joystick.joy1_y1 > -5) { motor[MotorL] = 0; } else { motor[MotorL] = joystick.joy1_y1; }
if (joystick.joy1_y2 < 5 && joystick.joy1_y2 > -5) { motor[MotorR] = 0; } else { motor[MotorR] = joystick.joy1_y2; }
if(joy1Btn(1)) { PlaySound(soundFastUpwardTones); wait1Msec(200); } else { }
if(joy1Btn(2)) { if(joy1Btn(8)) { motor[ArmMotorR] = -15; motor[ArmMotorL] = -15; continue; }
if(joy1Btn(6)) { motor[ArmMotorR] = 15; motor[ArmMotorL] = 15; continue; } }
if(joy1Btn(8)) { motor[ArmMotorR] = -8; motor[ArmMotorL] = -8; continue; }
if(joy1Btn(6)) { motor[ArmMotorR] = 8; motor[ArmMotorL] = 8; continue; } else { motor[ArmMotorR] = 0; motor[ArmMotorL] = 0; }
if(joy1Btn(5)) { servoChangeRate[servo1] = 1.5; servoChangeRate[servo2] = 1.5; servoTarget[servo1] = ServoValue[servo1] + 5; servoTarget[servo2] = ServoValue[servo2] - 5; }
if(joy1Btn(7)) { servoChangeRate[servo1] = 1.5; servoChangeRate[servo2] = 1.5; servoTarget[servo1] = ServoValue[servo1] - 5; servoTarget[servo2] = ServoValue[servo2] + 5; } } } } |  |  |  |  |
|
| Fri Jan 16, 2009 7:38 pm |
|
 |
|
hobbseltoff
Rookie
Joined: Thu Jan 08, 2009 7:51 pm Posts: 25
|
 Re: Motors Not Responding When Using Multiple Motor Controllers
One thing I notice is that in your original post, you say the order everything is in is Motor-> Motor-> Servo, but in your code you have it configured Motor->Servo->Motor.
_________________ It must be user error.
|
| Sat Jan 17, 2009 5:30 am |
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|