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