|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#26
|
|||
|
|||
|
Re: Testing and Cause of Failure for Encoders and Hall Effect sensors
Quote:
new RC programmed in C is 1024 (only on the RC, not the OI), but I will agree that your desired resolution is too close to the limit for comfort. If you are using busy polling in the "fast loop" to detect state transitions, you can be missing changes that happen while the RC is not looking. This happens while the RC is busy with its periodic processing of inputs and outputs, between the calls to get and put a packet. One of the things that we do here is track the minimum number of consecutive on, and off, measurements and report that as a diagnostic to indicate the risk that we might have missed any. You can indicate that the minimum has been violated with an LED output, and print the number when the computer console is being used. We start to get worried if the minimum number gets lower than 5 or so. Another strategy is to use an interrupt scheme to track the encoder, but this method has plenty of its own potential gremlins. You have to be very careful to avoid all the pitfalls, but an interrupt based scheme is capable of tracking state transitions at a much higher rate because only higher priority interrupts will interfere with it. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|