Go to Post The world isn't made out of Nerf, you will get scrapes and bruses, but you will get back up and continue on. If you watch out you can avoid the sharp edges. - Joe Matt [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 31-01-2011, 01:17
Gary Bonner Gary Bonner is offline
Registered User
FRC #3974
 
Join Date: Jan 2002
Rookie Year: 2000
Location: PA
Posts: 115
Gary Bonner has a spectacular aura aboutGary Bonner has a spectacular aura about
Resetting Encoder

Is there a way to reset an encoder to 0 or some other value when in position mode? For example, if an arm is not in its home position when the robot boots up. We're using Labview.

Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2011, 21:55
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Resetting Encoder

Yes, there is.
There's an input on the "enable" VI to set the position, if you're in position mode.

There is currently a small bug in this: The first time it is called after a Jaguar is booted up, this parameter doesn't work. You can get around this by calling it twice the first time.
__________________
-- Marshal Horn
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2011, 22:53
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Resetting Encoder

Could a de-bounced switch that is connected to the index pin work too?

Quote:
Originally Posted by Luminary Micro RDK
The index pulse can be used to reset the position counter; this causes the position counter to
maintain the absolute encoder position. Otherwise, the position counter maintains the relative
position and is never reset.
Attached Thumbnails
Click image for larger version

Name:	Index switch for Jaguar encoder.png
Views:	51
Size:	5.2 KB
ID:	9908  
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #4   Spotlight this post!  
Unread 31-01-2011, 22:57
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Resetting Encoder

I believe so, but I've never tried it.

Now that you mention it, that makes much more sense as a use for an index than another channel on an encoder.
__________________
-- Marshal Horn
Reply With Quote
  #5   Spotlight this post!  
Unread 01-02-2011, 04:24
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Resetting Encoder

Quote:
Originally Posted by kamocat View Post
I believe so, but I've never tried it.

Now that you mention it, that makes much more sense as a use for an index than another channel on an encoder.
Then the question becomes: are both edges of the index pin counted?

If not, then the switch can be connected like my schematic.
If yes, then the switch will have to be connected through a monostable oscillator (a one-shot)
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #6   Spotlight this post!  
Unread 01-02-2011, 07:43
Gary Bonner Gary Bonner is offline
Registered User
FRC #3974
 
Join Date: Jan 2002
Rookie Year: 2000
Location: PA
Posts: 115
Gary Bonner has a spectacular aura aboutGary Bonner has a spectacular aura about
Re: Resetting Encoder

Justin,
From what document or post did you pull the Luminary Micro TDK quote?
Thanks.
Reply With Quote
  #7   Spotlight this post!  
Unread 01-02-2011, 10:11
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Resetting Encoder

Your best bet is to do it with software rather then custom circuit.

enable(0);
enable(0);

or in java
enableControl(0);
enableControl(0);
Reply With Quote
  #8   Spotlight this post!  
Unread 01-02-2011, 10:16
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Resetting Encoder

Gary, it's in the RDK-BDC Firmware Development Package
USER’S GUIDE. (RDK-BDC stands for Reference Design Kit - Brushed DC motor)

You can get it from the Firmware Development Package here:
http://www.luminarymicro.com/products/rdk_bdc.html

Look under "software updates"
(It looks like they've updated it since November)
__________________
-- Marshal Horn
Reply With Quote
  #9   Spotlight this post!  
Unread 06-03-2011, 12:23
MikeE's Avatar
MikeE MikeE is offline
Wrecking nice beaches since 1990
no team (Volunteer)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: New England -> Alaska
Posts: 381
MikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond repute
Re: Resetting Encoder

We discovered the behaviour of the index pulse accidentally.
One of the encoders on our robot was wired up to include the index wire, and the consequence was that we were only recording positions in the range [-1.0, 1.0] revolutions, i.e. phase wrapping. For a sufficently fast turning mechanism the signal can look similar to noise.
Reply With Quote
  #10   Spotlight this post!  
Unread 11-03-2011, 19:56
nuttle nuttle is offline
Registered User
AKA: Allen Nuttle
FRC #4080
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: United States
Posts: 104
nuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud of
Re: Resetting Encoder

We're not 100% certain of this, but our experience with using an indexed encoder with the Jaguar closed-loop control has been pretty bad. We're very likely going to disconnect the index pin tomorrow. The basic issue here is that it doesn't seem that a scheme where the encoder count is reset by the index works very well, the PID control seems to get really confused by the wrapping that happens when you go from 0 to full-count (for one revolution) and then back to zero -- this proably holds in either direction of rotation.

Has anyone gotten this to work? I think if you were to use some type of switch connected to the index pin you might be OK, as long as you either aren't using closed-loop control, or only reset the index once (not once per
revolution). What I'm wondering is if anyone has gotten closed-loop control with a real index encoder to work.
Reply With Quote
  #11   Spotlight this post!  
Unread 13-03-2011, 22:18
nuttle nuttle is offline
Registered User
AKA: Allen Nuttle
FRC #4080
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: United States
Posts: 104
nuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud of
Re: Resetting Encoder

Just to follow up, I can confirm that using an idexed encoder with the closed-loop position control does not work well at all, as of Jaguar firmware version 92. Disconnecting the index pin and just having things start up in the zero position gets around this problem, but we only came to this very late in our first competition this season.
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


All times are GMT -5. The time now is 02:42.

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