|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Is there any way of having the encoder measure the maximum distance it moved and then resetting it back to 0?
|
|
#2
|
|||||
|
|||||
|
Re: Need help with Encoders!!
The encoder itself will not do this, but your own program can read the encoder's value and keep track of the largest reading. What language are you using?
|
|
#3
|
|||
|
|||
|
Re: Need help with Encoders!!
LabView
|
|
#4
|
|||||
|
|||||
|
Re: Need help with Encoders!!
If you put the attached snippet in Teleop or inside a loop in Periodic Tasks, it should keep track of the maximum distance reported by the encoder as long as the "Reset" boolean is False. The True case resets the encoder and has a constant 0 wired to the output tunnel.
(The attachment is a VI Snippet. Save it and drag it into a LabVIEW block diagram and it will become live code.) |
|
#5
|
||||
|
||||
|
Re: Need help with Encoders!!
"Wpi Robotics Library\Sensors\Encoders\Reset"
This vi resets the count of the encoder to "0". |
|
#6
|
|||
|
|||
|
Re: Need help with Encoders!!
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|