Go to Post I'm pretty sure there is a federal sequester on the bandwidth coming out of LSR. - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 13-02-2012, 16:56
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: speed by encoder

Quote:
Originally Posted by powerrbill View Post
In our everlasting wisdom we have decided that trying to maintain shooter precision. To do this we are trying to take output from an encoder in 100 millisecond samples. Is this even feasable? How would we accomplish this?
Our team is reading the shooter speed from an optical encoder and applying PID control on the shooter speed. So it is possible. We are using Jaguars on CAN bus, so we connected the encoder directly to the Jaguar. Our PID control reads the shooter speed from the Jaguar and calculate the motor output power using our PID controller.

It is working quite well. The only issue we have is that one of our mentors have a strobe light and decided to check the shooter speed with it. It came out different from our encoder reading. For example, if we set the shooter speed to 3000 RPM (and reading approx. 3000 RPM on the encoder), the strobe light said it was 2400 RPM. No matter what speed we read on the encoder, the strobe light seems to read a percentage lower than the encoder. At first, I questioned how accurate is the strobe light? But the mentor who provided the strobe light said he had sent it in for calibration and just gotten it back, so it is calibrated. So I am entertaining the idea that we did not read the encoder correctly which is possible since this is our first year playing with the Jaguar and the encoder is connected to the Jaguar. So here is our question: Did we configure the Jaguar correctly regarding the encoder?

When configuring the Jaguar, we set it to PercentVbus mode. We also called ConfiguEncoderCodesPerRev() with 360 (we have a 360-line optical disc on our encoder). Then we called SetSpeedReference() with kSpeedRef_QuadEncoder. Our question is: why do we need to specify kSpeedRef_QuadEncoder in SetSpeedReference and what is the difference between kSpeedRef_QuadEncoder and kSpeedRef_Encoder? My understanding of the difference is that quadrature counts both rise and fall edges of the encoder pulse for both channels A and B so it is "more accurate" but since the GetSpeed() function will scale the output according to quad or non-quad, from the caller's point of view, it should have no difference. Am I understanding this correctly?
__________________
Reply With Quote
 


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 12:56.

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