View unanswered posts | View active topics It is currently Mon Jul 28, 2014 8:23 am






Reply to topic  [ 12 posts ] 
DC controllers not working on ports other than S1 
Author Message
Rookie

Joined: Tue Sep 23, 2008 11:23 am
Posts: 14
Post DC controllers not working on ports other than S1
I recently connected a DC motor controller to sensor port 2 instead of S1, but when I tried to move a motor connected to it I got an error which said something about the motor being "out of range". I tried a different motor controller but got the same problem. I had the same problem on S3, even though the same motor controller with the same motors under the same circumstances worked fine when connected to S1.

Is there any way to fix this?

Thanks so much,

-Jonathan

EDIT : It seems that other people have had the same problem, as posted about here.


Sun Jan 11, 2009 12:27 am
Profile
Rookie

Joined: Thu Jan 08, 2009 7:51 pm
Posts: 25
Post Re: DC controllers not working on ports other than S1
I posted a reply on the other thread but for your sake, I'll post one here too.

In the Motor/Servo configuration page, you need to to open up the "FTC Servo/Motor Ctl" tab, click on the "Custom" radio button and adjust your setup accordingly. Each of the rows (S1, S2, etc..) represents a different sensor port on the NXT. I've included a screenshot that will show you how to configure it the way you want.

Image

_________________
It must be user error.


Sun Jan 11, 2009 4:33 am
Profile WWW
Rookie

Joined: Tue Sep 23, 2008 11:23 am
Posts: 14
Post Re: DC controllers not working on ports other than S1
Huh... for some reason I didn't see your post in that thread. But anyway, I had configured the setup correctly before running the program, so I don't think that could be the problem.

-Jonathan


Mon Jan 12, 2009 9:27 am
Profile
Rookie

Joined: Thu Jan 08, 2009 7:51 pm
Posts: 25
Post Re: DC controllers not working on ports other than S1
Well can you copy and paste the config code from your program then?

_________________
It must be user error.


Mon Jan 12, 2009 9:45 am
Profile WWW
Professor

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post Re: DC controllers not working on ports other than S1
I recommend using port S1 for your controllers. Since this is all new technology it does not surprise me that there are issues doing it anyway else. Our robot has three controllers (two motors and a servo) daisy-chained on port S1 and they all work great. Do you have a reason not to use port S1?

_________________
Jeff McBride
Benson Robotics Club


Mon Jan 12, 2009 12:48 pm
Profile
Rookie

Joined: Tue Sep 23, 2008 11:23 am
Posts: 14
Post Re: DC controllers not working on ports other than S1
It definitely isn't a problem with the configuration... I tried purposefully using a wrong configuration, and didn't get any error. Here's the code I used with the correct configuration:

#pragma config(Hubs, S2, HTMotor, none, none, none)
#pragma config(Motor, mtr_S2_C1_1, motorD, tmotorNormal, openLoop)
#pragma config(Motor, mtr_S2_C1_2, , tmotorNone, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

#include "JoystickDriver.c"

task main()
{
while (true)
{
getJoystickSettings(joystick);
motor[motorD] = joystick.joy1_y1;
}
}

I had one DC contoller (with two DC motors connected to it) connected to port 2. You can see a screenshot of the error we got below.

Tim, or one of the other developers, do you know anything about this problem and how we could fix it? It's very important to us to put two controllers on a different port than the other controller, because of a problem we're having with the controllers freezing up when all three are daisy-chained together.

Thanks,

-Jonathan

P.S. BTW, I should mention that the Servo controller does work on other sensor ports - only the DC controllers (both of them) don't work.


Attachments:
S2 DC Motor Error.png
S2 DC Motor Error.png [ 20.08 KiB | Viewed 2183 times ]
Wed Jan 14, 2009 10:50 pm
Profile
Professor

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post Re: DC controllers not working on ports other than S1
It sounds like a bug to me. I suspect that if you hooked one motor controller into S1 and the second one into S2 they would both work. Is there a reason that you can't use S1 for the motor controller(s)?

_________________
Jeff McBride
Benson Robotics Club


Wed Jan 14, 2009 11:12 pm
Profile
Rookie

Joined: Tue Sep 23, 2008 11:23 am
Posts: 14
Post Re: DC controllers not working on ports other than S1
Actually, that was the first thing I tried, and it didn't work. I described why we don't want all the controllers on S1 in my last post - we have a problem with them freezing up when all three are daisy-chained together.

-Jonathan


Wed Jan 14, 2009 11:27 pm
Profile
Professor

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post Re: DC controllers not working on ports other than S1
OK. Are you running version 1.46? Did you completely uninstall the previous version before installing 1.46? Have you tried reloading the firmware?

We have all three controllers (Motor, Servo, Motor) on S1 and everything works fine.

_________________
Jeff McBride
Benson Robotics Club


Thu Jan 15, 2009 11:16 am
Profile
Rookie

Joined: Tue Sep 23, 2008 11:23 am
Posts: 14
Post Re: DC controllers not working on ports other than S1
Huh... I'm not sure if I completely uninstalled the previous version, although I think I did. I'll try uninstalling/reinstalling it, as well as re-downloading the firmware.

-Jonathan


Fri Jan 16, 2009 12:12 am
Profile
Rookie

Joined: Tue Sep 23, 2008 11:23 am
Posts: 14
Post Re: DC controllers not working on ports other than S1
Alright, I tried uninstalling RobotC by using add/remove programs, and then reinstalled the latest version (same as what we had before, 1.46) from the website. I also reinstalled the firmware (latest version, just like we had before) on the NXT brick. Still didn't work. I tried a different NXT brick, and it still didn't work. I even tried a different computer (with 1.46 on it), and it still didn't work.

Is there something else I need to do in order to completely get rid of an old version of RobotC before re-installing? Tim, do you know anything about this problem?

-Jonathan


Fri Jan 16, 2009 4:24 pm
Profile
Rookie

Joined: Tue Sep 23, 2008 11:23 am
Posts: 14
Post Re: DC controllers not working on ports other than S1
tfriez or another developer, could you weigh in on this? It's really important to our team to use another sensor port to split up the controllers, because we have a big problem when they're all daisy-chained together.

Thanks,

-Jonathan


Sun Jan 18, 2009 6:12 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.