View Single Post
  #6   Spotlight this post!  
Unread 20-02-2011, 16:37
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Keeping track of Encoder Shaft Location using WPI Counter VI

My previous post was incorrect. I believe you need at least two pieces of state data to accomplish what you want.

1. The value of the WPIlib counter
2. The value of your counter

Each cycle the delta is calculated as the Current WPIlib value - the previous WPIlib value.

This delta is then added or subtracted from the previous value of your counter based on direction.

So you need either at least 2 shift registers or 2 feedback nodes. You can also use 3 pieces of state data as Greg described above.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote