Log in

View Full Version : Problems with Encoder


Wen1992
11-02-2010, 15:34
Our team is trying to use an encoder to measure the amount of times our motor turns so we can adjust our kicker during the match. I have no clue first off how to get the encoder to count in labview and second i am trying to set a limit switch in the encoder so that i can then set it to only wind till a certain position. IE Position 1 to Position 3 or 1 to 2 or 2 to 1. Any help?

Racer26
11-02-2010, 15:44
You need to create an Encoder object from the WPILib stuff. Then you start it, and use Get to get the value. Reset will reset it.

You could for instance then do something like run a motor until encoder get returns 10, or 100 or whatever.

Wen1992
11-02-2010, 16:05
Thanks, but I'm curious how you wire the "get" to find the information and I am completely and unequivocally confused of how to set a limit in the encoder as a switch that we can use to judge where the kicker is at. Any Help?