|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#45
|
|||
|
|||
|
Re: Unexpected results from Encoder::GetRate()
Quote:
"DownRisingEdge => countup A if B is high" "DownFallingEdge => countdown A if B is low" Quote:
Lets try an example for 1x: UpRisingEdge = true , DownRisingEdge=false Assume B is static high so Bhigh=true Now A channel gets a rising pulse so ARising = true , AFalling= false Evaluate 1) Count = true; (BHigh ^ DownRisingEdge ^ ARising)=(true^false^true) = false; so CountUp = true & !(false) = true CountDown = true&false = false Hence we count up .... Now A channel gets a falling pulse so Arising = false, AFalling = true Evaluate 2) Count = true: (BHigh ^ DownRisingEdge ^ ARising)=(true^false^false) = true; so CountUp= true &!(true)=false CountDown = true&true = true Hence we count down .... This repeats so with a stuck B channel, it oscillates. In the case where B is not static , it inhibits the count when AFalling = true because Bhigh= false during that transition. So I guess I'm with you. Since this logic requires a transition to count 1x properly, it seems the code should throw a flag when the B is static since this is an invalid input. Otherwise why require it. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [BB] An unexpected change in plans | yodameister | General Forum | 22 | 01-12-2009 21:26 |
| Inconsistent reading from encoder get rate | rwood359 | National Instruments LabVIEW and Data Acquisition | 5 | 13-01-2009 19:10 |
| Results from Drexel, thanks from 365. | archiver | 2001 | 1 | 24-06-2002 02:44 |
| Results from GLR? | archiver | 2001 | 0 | 24-06-2002 02:44 |
| results from regionals | archiver | 2000 | 0 | 23-06-2002 22:31 |