Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   CAN (http://www.chiefdelphi.com/forums/forumdisplay.php?f=185)
-   -   Resetting Encoder (http://www.chiefdelphi.com/forums/showthread.php?t=90573)

Gary Bonner 31-01-2011 01:17

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.

kamocat 31-01-2011 21:55

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.

biojae 31-01-2011 22:53

Re: Resetting Encoder
 
1 Attachment(s)
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.


kamocat 31-01-2011 22:57

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.

biojae 01-02-2011 04:24

Re: Resetting Encoder
 
Quote:

Originally Posted by kamocat (Post 1012960)
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)

Gary Bonner 01-02-2011 07:43

Re: Resetting Encoder
 
Justin,
From what document or post did you pull the Luminary Micro TDK quote?
Thanks.

drakesword 01-02-2011 10:11

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);

kamocat 01-02-2011 10:16

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)

MikeE 06-03-2011 12:23

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.

nuttle 11-03-2011 19:56

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.

nuttle 13-03-2011 22:18

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.


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

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