Go to Post PS: When/if it gets to be too easy to build a machine that can accomplish a recent/typical FRC game, then I suspect it will be time for someone to unveil a harder game. - gblake [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 22-12-2008, 13:03
Jim.D Jim.D is offline
Registered User
FTC #1983
 
Join Date: Dec 2008
Location: Seattle
Posts: 16
Jim.D is an unknown quantity at this point
[FTC]: FTC read encoders vi

I'm having trouble getting the encoder position from the FTC read encoder vi. I can get the move fixed dist to work so I think the encoders are working.
Any help appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 22-12-2008, 13:49
ttldomination's Avatar
ttldomination ttldomination is offline
Sunny
no team
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Roanoke, TX
Posts: 2,066
ttldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond repute
Re: [FTC]: FTC read encoders vi

I'm not to familiar with Labview but check out the following page to see if you can find anything helpful. http://www.education.rec.ri.cmu.edu/...view/index.htm
__________________
1261: 2007-2012
1648: 2013-2014
5283: 2015
Reply With Quote
  #3   Spotlight this post!  
Unread 22-12-2008, 15:06
Jim.D Jim.D is offline
Registered User
FTC #1983
 
Join Date: Dec 2008
Location: Seattle
Posts: 16
Jim.D is an unknown quantity at this point
Re: [FTC]: FTC read encoders vi

Thanks for your reply. I have already been there. I think I have all the patches applied. I didn't see any samples for reading the encoder, only for using the fixed dist or speed vi's. I can get those ones working but not the one that just reads the position. I noticed that the fixed distance vi has output terminals for the encoder position but they don't really show encoder position as they will count even if the motors aren't turning. They just echo the count that you told it to use for the distance.

I need to find ends for the encoder cords and make a diagnostic cord.

Thanks again
jim


Update - Maybe the vi works different than I am expecting. I can read out the position after I use a motor move command. Is there a way to read the USDigital encoder position directly without having to use a move command ?
(like you can with the lego motor/encoder). For now I will try issueing a move 0 command before the read encoder.

Last edited by Jim.D : 22-12-2008 at 19:19. Reason: update
Reply With Quote
  #4   Spotlight this post!  
Unread 23-12-2008, 18:45
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]: FTC read encoders vi

Read thru this thread and check out the sample code.

http://www.chiefdelphi.com/forums/sh...ad.php?t=69991
__________________
Jon Thompson
Coach
VRC 177 Twisted Botz
Sponsored by FRC 122
NASA Knights
Reply With Quote
  #5   Spotlight this post!  
Unread 23-12-2008, 22:17
Jim.D Jim.D is offline
Registered User
FTC #1983
 
Join Date: Dec 2008
Location: Seattle
Posts: 16
Jim.D is an unknown quantity at this point
Re: [FTC]: FTC read encoders vi

Thanks Jon,

I had looked at that. I also have noticed the problem with the rest. My main problem was that I wanted to read the encoder position. It seams that you really cant do that directly like you can with the lego motors. the read encoder vi returns the pointer of were the encoder should be and not were it is. IE you can watch the reported position change even though you disconnect the motor and it realy didn't move.

Not getting an accurate position can lead to letting the smoke out of the motors. We need to be able to use motor protectors on the FTC bots.

Do you know how the error out for the motor VI's works ? can it be used to protect the motors or does it also just report that the motor should be turning ?

Thanks for your help. I am new this year to robotics and labview.

Jim
FTC 1983
Reply With Quote
  #6   Spotlight this post!  
Unread 24-12-2008, 09:47
TimeOut's Avatar
TimeOut TimeOut is offline
Registered User
AKA: Sean Kelly
FRC #0499 (The Toltechs)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: San Antonio, TX
Posts: 50
TimeOut is on a distinguished road
Re: [FTC]: FTC read encoders vi

Morning Jim,

The encoders don't actually keep the position, they tell you how many clicks away you are from where you last zero'd the encoder count. So, if you have 360 ticks (I'm not sure how many there are on these encoders) then each tick would be 1 degree. As the wheel turns forward the tick count increase, as the wheel turns backward the tick count decreases.

By counting the ticks you can tell how far you've traveled. By adding a time factor into you can tell how fast you are moving. After doing the math for any gearing and wheel diameter you can determine distance moved.

The Mindstorms Encoder keeps the count internally and uses the count to determine an approximate 'position' of the motor and to 'move-to' a specific position.

This may have to be accomplished manually with the FTC equipment; part of the fun eh?

If you need the position to control a manipulators position, you may want to consider using a potentiometer instead of the quadrature encoder. The can be easier to deal with when you do not need continuous rotation (like a drive train).

The typical application for the quadrature encoders is on drive trains to help with measuring distance, turning the robot specific angles, and helping the robot drive straighter (especially in autonomous mode) by either implementing PID controller or comparing the left/right encoders and adjusting speed when one gets too far ahead of the other.

Sean
Reply With Quote
  #7   Spotlight this post!  
Unread 24-12-2008, 12:14
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: 747
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]: FTC read encoders vi

Quote:
Originally Posted by Jim.D View Post
Thanks Jon,

I had looked at that. I also have noticed the problem with the reset. My main problem was that I wanted to read the encoder position.
This isn't a great solution, but one way to read the encoder position is to repeatedly call ConstantSpeed with power set to "0". This keeps the encoder logic running.

So, in a pinch you can have a loop that contains "Constant Speed, followed by Read Encoder and a short time delay... maybe 20ms"

I've still had problems with this approach, but it's better than nothing.

I was going to post a snyde remark to "Sean" indicating that while Pots are a good solution, they are not available to us in FTC..... but then I thought..... Wait, If I use a NXT prototyping board, and the POT is attached to that board, it IS legal..... Hmmm.... potential....

So, Thanks Sean.
__________________
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
  #8   Spotlight this post!  
Unread 24-12-2008, 22:53
TimeOut's Avatar
TimeOut TimeOut is offline
Registered User
AKA: Sean Kelly
FRC #0499 (The Toltechs)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: San Antonio, TX
Posts: 50
TimeOut is on a distinguished road
Re: [FTC]: FTC read encoders vi

Phil,

Actually, that was a good catch and I didn't even think about the 'legal for FTC' part and I should have actually looked it up before referring to it.

Sean
Reply With Quote
  #9   Spotlight this post!  
Unread 26-12-2008, 23:42
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: 747
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]: FTC read encoders vi

Quote:
Originally Posted by Jim.D View Post
Thanks Jon,

I had looked at that. I also have noticed the problem with the rest. My main problem was that I wanted to read the encoder position. It seams that you really cant do that directly like you can with the lego motors. the read encoder vi returns the pointer of were the encoder should be and not were it is. FTC 1983
Hey... I just posted a paper that explains what I have found out about the various encoder VIs

It may help you figure stuff out.

http://www.chiefdelphi.com/media/papers/2179
__________________
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]: Progress report on using encoders PhilBot FIRST Tech Challenge 11 14-11-2008 14:01
[FTC]: FTC Controller Station Connectivity (Bluetooth and USB) Issue jbbjjbt FIRST Tech Challenge 6 05-11-2008 11:49
[FTC]: Rookie Team Needs Help With Tetrix FTC Kit! rjustice4 FIRST Tech Challenge 8 05-10-2008 09:44
[FTC]: FTC]: FTC Champ Tournament - Ontario (Scoring Breakdown) Mr. Lim FIRST Tech Challenge 2 03-03-2008 11:54
[FTC]: [FTC]: Ontario Provincial FTC Start/End Times cbhl FIRST Tech Challenge 8 16-12-2007 13:37


All times are GMT -5. The time now is 12:37.

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