|
Page 1 of 1
|
[ 8 posts ] |
|
| Author |
Message |
|
dooey100
Rookie
Joined: Fri Jan 02, 2009 9:13 pm Posts: 10
|
 Encoder Question
We only have one encoder (the other broke, it will be warrantied, but not in time for when we need it) and we have the working one attached to one motor. There is another motor powering the same mechanism, and we would like to use PID control. Is there any way to use the encoder value from one motor one another motor?
tl;dr version: is there a method of finding the PID value of a motor?
|
| Fri Jan 02, 2009 9:16 pm |
|
 |
|
Jeff McBride
Professor
Joined: Fri Sep 19, 2008 1:22 am Posts: 200
|
 Re: Encoder Question
In our experiance you need to turn off PID control for both motors if only one of them has an encoder. There are algorithms available on the net to do the PID control manually but I suspect that you won't need them for the purposes of this competition. I suggest trying it without and not spending the short time remaining to you fighting it.
Note: You can still use the encoder to count rotations even if PID control is OFF.
_________________ Jeff McBride Benson Robotics Club
|
| Fri Jan 02, 2009 10:54 pm |
|
 |
|
dooey100
Rookie
Joined: Fri Jan 02, 2009 9:13 pm Posts: 10
|
 Re: Encoder Question
We have been doing without so far, but it is very difficult because the arm the motors are attached to have a lot of weight on them. I can see the number I need right on the debug window, is there really no way to access it in my program?
|
| Sat Jan 03, 2009 1:13 am |
|
 |
|
Jeff McBride
Professor
Joined: Fri Sep 19, 2008 1:22 am Posts: 200
|
 Re: Encoder Question
Hmm. Anything you can see in the debugger should be accessible to you somehow at runtime. What value are you looking at in which debug window?
_________________ Jeff McBride Benson Robotics Club
|
| Sat Jan 03, 2009 1:56 am |
|
 |
|
dooey100
Rookie
Joined: Fri Jan 02, 2009 9:13 pm Posts: 10
|
 Re: Encoder Question
The circled one.
Thanks for all your help so far!
|
| Sat Jan 03, 2009 2:07 am |
|
 |
|
dooey100
Rookie
Joined: Fri Jan 02, 2009 9:13 pm Posts: 10
|
 Re: Encoder Question
So I guess its not possible, then?
|
| Mon Jan 12, 2009 9:40 pm |
|
 |
|
10nisman94
Novice
Joined: Mon Oct 13, 2008 6:29 pm Posts: 75 Location: Florida, USA
|
 Re: Encoder Question
try "pm"ing tfriez or Dick Swan and please post the reply here, i would like to know too.
_________________ PHUHS Robotics Team 516 FTW
Daytona Robofest Winning Alliance Captain Daytona Robofest Inspire Award
|
| Tue Jan 13, 2009 2:19 pm |
|
 |
|
Dick Swan
Creator
Joined: Fri Feb 09, 2007 9:21 am Posts: 613
|
 Re: Encoder Question
Youcannot use the encoder value from one motor to control a second.
FOr the LEGO NXT motors, the PID control is implemented in the ROBOTC firmware code. And the values in the debugger are the valid calculation of the values.
The initial implementation of the 12V motors simply enabled the existing ROBOTC firmware (i.e. in the NXT CPU) to control the 12V values. Unfortunately, this did not work as well as expected. There was too much latency in the control loop partially due to I2C messaging delays but mostly due to delays within the HiTechnic controller firmware.
Fortunately, the firmware in the HiTechnic motor control also implements a PID algorithm. It's not as "good" (i.e. less feature rich) as the implementation in the NXT firmware -- for example it does not have the capability to synchronize two motors for driving straight. So the ROBOTC firmware PID control is disabled for the 12V motors and the PID control in the HiTechnic motor control is used.
For the 12V motors, the ROBOTC debugging field in the motor display that shows "PID setting" is not valid. It is the value that the ROBOTC firmware would use if it's PID code was enabled.
|
| Wed Jan 14, 2009 8:31 am |
|
|
|
Page 1 of 1
|
[ 8 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
|
|