|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Encoder reset on power up
Currently our encoders resets their values during power up. Has anyone figured out a way to not lose those encoder values?
|
|
#2
|
||||
|
||||
|
Re: Encoder reset on power up
What's your usage case? This would mean that the encoder values from previous matches would be restored when you switched on the robot. Perhaps this could be beneficial for debugging, but I don't know why you'd want to start off the actual encoder readings with the old values. I'm not debating so much as I'm just curious.
If you do want to do something like this, I'd recommend periodically writing the current encoder value to a file on the cRIO, then add code to read from that file when the cRIO boots up. Make sure to not write to the file every time through your main code loop as it will slow down your robot's responsiveness. You might want to start a different task if using WindRiver, or create a parallel while loop if using LabVIEW. As far as I know, there's no other way to retain data through a power cycle. --Ryan |
|
#3
|
||||
|
||||
|
Re: Encoder reset on power up
We want the encoder to retain it's values because it's going to be use for something with our drive system. So say at the end of the match the wheels are at one position but since you shut the robot off the values of the encoder are gone so then we would therefore have to recalibrate the encoder to read 0 when the wheels are straight...
Sorry i'm a nub programmer xD so how would I go about making the the robot "write the current encoder value to a file on the cRIO, then add code to read from that file when the cRIO boots up"? Last edited by darkorbit : 24-01-2009 at 19:57. |
|
#4
|
|||||
|
|||||
|
Re: Encoder reset on power up
If you need to measure the absolute position of something, a quadrature encoder is not a good choice. Is there any way you can substitute a potentiometer (perhaps a multiple-turn one) or a magnetic shaft encoder?
|
|
#5
|
||||
|
||||
|
Re: Encoder reset on power up
Quote:
While I have not used them myself, I highly respect US Digital as a brand, and it appears as if they have a couple of good choices. Depending on your budget, there's both an optical version and a magnetic version of absolute encoder. (You may or may not have to shield the magnetic version if using it in close proximity to a motor. Someone want to comment on this?) I'd recommend getting one with an analog output for ease of use, then just wire it to an Analog Input module on the cRIO. --Ryan |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Camera won't initialize when reset from RC - reset from OI and Power-up works, | krunal | Programming | 7 | 15-01-2007 00:13 |
| Robot reset in competition | DanDon | Control System | 4 | 10-02-2006 23:09 |
| Complete Reset | Windex | Control System | 3 | 20-02-2005 14:02 |
| pic: Field Reset | CD47-Bot | Extra Discussion | 13 | 12-03-2003 23:56 |
| Robot reset on OI doesn't work | Carl Owenby | General Forum | 1 | 07-02-2003 07:23 |