We win as a team.
Home
Go Back   Chief Delphi > Technical > Programming
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
  #9   Spotlight this post!  
Unread Yesterday, 13:56
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,609
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: encoder PIDController and set

1x and 4x decoding affect which edges the FPGA counts, but not the reported distance. When you select 4x, WPILib scales the output to be the same as 1x, ie if DistancePerPulse is 1, in 4x you would get values of 1.0, 1.25, 1.50, 1.75, 2.0, and in 1x you would just get 1.0, 2.0, etc.

The FPGA measures rate by timing successive pulses. In 4x decoding, the next pulse is from the opposite channel, which means that you will see a lot of noise. If you look phase relation specs for the the E4T, the relationship can vary by up to 60 degrees, which means you could get 2/3 of the measurement as noise. It's much better to use 1x decoding for rate, so the same edge is always being counted. It's also better to use a lower resolution encoder, so that there is a longer time period between pulses.

This is based on using the roboRIO for decoding the encoder. If using the Talon SRX, the opposite applies, it's rate algorithm wants a very high resolution encoder (although this might not be an issue with the 2.22 firmware).

Last edited by Joe Ross : Yesterday at 15:34.
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 15:31.

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