Go to Post When is comes down to it, remember what FIRST is really about, it is about those students and helping to inspire them - E3 Robotics Ctr [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-12-2008, 23:49
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Unhappy [FTC]: Tips page on using FTC Encoders with LabVIEW

I continued to be a bit frustrated with the LabVIEW encoder VIs so I became determined to figure out how and when they work.

I discovered quite a few things through experimenation and disecting the VI's.

I'm still not convinced I have figured out the way to overcome the occasional glitch, but I decided to write up my finding for anyone else trying to get the encoders working.

Here is the white-paper.

http://www.chiefdelphi.com/media/papers/2179

Please feel free to pass on any tid-bits you've discovered and I'll update it.

Phil.

ps: does anyone know how to delete attachments from a white paper.
I used the "delete" link but things just stay attached.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2009, 08:02
jbbjjbt jbbjjbt is offline
VRC Coach
AKA: Jon T
VRC #0177 (Twisted Botz)
Team Role: Coach
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Gloucester, VA
Posts: 110
jbbjjbt is an unknown quantity at this point
Re: [FTC]: Tips page on using FTC Encoders with LabVIEW

I have been studying this paper the last few days. Thanks so much for putting it out. Hope to do some tests this week.

Our team has two issues with Labview/Motor controllers/encoders. They are:
1)Reset encoders only works roughly 80% of the time, even when called twice. So frequently in autonomous the robot turns when it should have gone straight or vice-versa.
2)The motor controllers/encoders lock up (probably need a better term) and the robot just sits and jiggles back and forth. The only way we've found to get out of this is to cycle the power to the motor controllers. This just about ruined us in competition because if you lock up in autonomous, you're dead in teleoperations.

Does anyone else have these problems, especially number 2? Does anyone know if the problems exist if you use RobotC?

Back to the paper, we will soon be trying Phil's unblocking versions to see if this helps the situation.
__________________
Jon Thompson
Coach
VRC 177 Twisted Botz
Sponsored by FRC 122
NASA Knights
Reply With Quote
  #3   Spotlight this post!  
Unread 14-01-2009, 09:43
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Tips page on using FTC Encoders with LabVIEW

Quote:
Originally Posted by jbbjjbt View Post
Our team has two issues with Labview/Motor controllers/encoders. They are:
1)Reset encoders only works roughly 80% of the time, even when called twice. So frequently in autonomous the robot turns when it should have gone straight or vice-versa.
2)The motor controllers/encoders lock up (probably need a better term) and the robot just sits and jiggles back and forth. The only way we've found to get out of this is to cycle the power to the motor controllers. This just about ruined us in competition because if you lock up in autonomous, you're dead in teleoperations.

Does anyone else have these problems, especially number 2? Does anyone know if the problems exist if you use RobotC?
We have both of these problems, and are trying to develop strategies to mitigate them.

Once such strategy is NOT to reset the encoders. If you never reset them, that problem goes away.

Something that is becoming clear to me is that for some reason the communications with the motot controller is VERY sensitive to battery voltage. Although these are nominally 12V batteries, when charged they get all the way up over 14V.

I've found that if the battery voltage gets close to 13V we seem to start getting more of the problems you are describing. Seems like that shouldn't be the case but it's what I've found. That's one reason I created the Battery monitoring VI. I need to know when that occurs.

We have two batteries and so we always have one on charge when using the other. After about an hour of testing you HAVE to change the battery otherwise you start getting those dropouts and "shimmies".

Another thing we found is that we get MUCH better reliability in AUTO, if we actually power down the NXT and 12V before each run. This emulates what happens on the field so maybe they discovered the same thing. If we just run the auto program three or four times in a row, successive runs seem to mess up, even if we reset 12V power and restart the NXT program. It's as if the NXT and motor controller get left in a bad state if you just stop the program and restart it. I can't explain it.

Bottom line, the NXT/Motor-controller communications are NOT solid enough (for a real competition), and the trick is finding the way to mitigate the problem.

From what little I've seen, it seems that Robot C has simmilar problems.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor

Last edited by PhilBot : 14-01-2009 at 09:55. Reason: 12V changed to 14V
Reply With Quote
  #4   Spotlight this post!  
Unread 14-01-2009, 14:13
jbbjjbt jbbjjbt is offline
VRC Coach
AKA: Jon T
VRC #0177 (Twisted Botz)
Team Role: Coach
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Gloucester, VA
Posts: 110
jbbjjbt is an unknown quantity at this point
Re: [FTC]: Tips page on using FTC Encoders with LabVIEW

We've found the same connection to battery voltage, although we find the voltage has to stay considerably above 13V, more like 13.7 to minimize troubles. Sometimes we think it is related to the NXT battery voltage also.

I'll share the one trick that we developed at the VA Tournament. We hooked a Lego motor to the 12V switch. Then if the motor controller acted up we could remotely switch the power on and off. This saved several matches.

We haven't been switching off the NXT between practice runs as the bluetooth is such a pain to hook up.
__________________
Jon Thompson
Coach
VRC 177 Twisted Botz
Sponsored by FRC 122
NASA Knights
Reply With Quote
  #5   Spotlight this post!  
Unread 14-01-2009, 14:22
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Tips page on using FTC Encoders with LabVIEW

Quote:
Originally Posted by jbbjjbt View Post
I'll share the one trick that we developed at the VA Tournament. We hooked a Lego motor to the 12V switch. Then if the motor controller acted up we could remotely switch the power on and off. This saved several matches.
Very clever...... (and the crowd roars)

.... beats waiting for the 2.5 second timeout
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #6   Spotlight this post!  
Unread 27-01-2009, 10:13
jbbjjbt jbbjjbt is offline
VRC Coach
AKA: Jon T
VRC #0177 (Twisted Botz)
Team Role: Coach
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Gloucester, VA
Posts: 110
jbbjjbt is an unknown quantity at this point
Re: [FTC]: Tips page on using FTC Encoders with LabVIEW

Quote:
Originally Posted by PhilBot View Post

Once such strategy is NOT to reset the encoders. If you never reset them, that problem goes away.
Phil,

We have been trying code that uses this strategy based on the examples in your paper. We read the encoder, add the number to it that we want to go to, run the constant speed vi until the encode reads the new number and stop.

Most of the time this is working really well. It definitely has gotten rid of the jerky motion that won't die without killing the power.

But sometimes either the encoders don't read or the loop processes to slowly and the robot goes way past where it is supposed to stop. It is somewhat random as it will work one run and not the next. It is frustrating and time consuming.

Have you seen this? Do you have any ideas how to fix it?
Thanks,
__________________
Jon Thompson
Coach
VRC 177 Twisted Botz
Sponsored by FRC 122
NASA Knights
Reply With Quote
  #7   Spotlight this post!  
Unread 27-01-2009, 11:25
Rick TYler Rick TYler is offline
A VEX GUy WIth A STicky SHift KEy
VRC #0010 (Exothermic Robotics)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Redmond, Washington
Posts: 2,000
Rick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond repute
Re: [FTC]: Tips page on using FTC Encoders with LabVIEW

Quote:
Originally Posted by jbbjjbt View Post
But sometimes either the encoders don't read or the loop processes to slowly and the robot goes way past where it is supposed to stop. It is somewhat random as it will work one run and not the next. It is frustrating and time consuming.

Have you seen this? Do you have any ideas how to fix it?
I'm not Phil and I've only worked with Vex and FRC encoders... so, for what it's worth.

You sometimes get this if your encoder is spinning too fast for the computer to keep up with it. Adding a gear to a half-speed shaft running just for the encoder can fix this. In other words, if your encoder is on your drive axle, add a small gear to the drive shaft driving a big gear on another axle with an encoder on the shaft. The second shaft doesn't do anything except drive the encoder running at half speed.

If it's more subtle than that, let's wait for someone who knows what they are talking about.
__________________
Exothermic Robotics Club, Venturing Crew 2036
VRC 10A, 10B, 10D, 10Q, 10V, 10X, 10Z, and 575
Reply With Quote
  #8   Spotlight this post!  
Unread 27-01-2009, 14:00
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Tips page on using FTC Encoders with LabVIEW

Quote:
Originally Posted by jbbjjbt View Post
Phil,
But sometimes either the encoders don't read or the loop processes to slowly and the robot goes way past where it is supposed to stop. It is somewhat random as it will work one run and not the next. It is frustrating and time consuming.

Have you seen this? Do you have any ideas how to fix it?
Thanks,
Hi

I still see times when for some reason the NXT stops being able to talk to the Motor controller. When it happens, it usually continues for about 2.5 seconds, and then corrects itself. Not helpfull if you are planning a complex sequence.

The encoders keep running insider the speed controller, but don't get seen by the NXT untill after the bus fault clears.

Are you keeping track of your 12V battery voltage? My experience is that these "random" problems occure much more if the battery voltage is let go below 13.5 V (some have said 13.75V)

This isn't a great lot of help, but we've just resigned ourselves to keeping the battery charged and putting up with random motions.

I'll say that we also get our best results if we power down BOTH the NXT and 12V betwen each run. It just "seems" to help. The glitch seems to occur whenever we forget this power-cycle step.

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FTC]: LabVIEW Programming Template for FTC Team 288 FIRST Tech Challenge 30 06-02-2010 17:49
[FTC]: FTC read encoders vi Jim.D FIRST Tech Challenge 8 26-12-2008 23:42
[FTC]: Progress report on using encoders PhilBot FIRST Tech Challenge 11 14-11-2008 14:01
[FTC]: First problem with FTC and LabView.....? PhilBot FIRST Tech Challenge 5 07-11-2008 10:36
[FTC]: FTC Servo-Motor Problem with Labview dnhansen FIRST Tech Challenge 1 26-10-2008 00:43


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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