FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder will not read in Autonomous

We installed two encoders and they work in the tele mode,but not in autonomous.   Autonomous and tele files attached.  Any suggestions

       Thanks

             Bob

Download All
0 Kudos
Message 1 of 4
(4,496 Views)

Hi Bob,

It's a little hard to tell from the screenshots what could be wrong so I have a few questions:

What exactly do you mean they're not working?

What values do you see for Distance, Direction and Rate?

Do they change while you're Autonomous mode?

Are both encoders not working?

What speed are your motors running at during Autonomous?

Also, take a look at the Stop output of the encoder Get VI. Does it think the encoder is stopped? By default, if the rate is less than 20 pulses/sec we assume the encoder is stopped. If this turns out to be the problem, you can change this threshold with the Configure Timer VI.

~Olivia

0 Kudos
Message 2 of 4
(2,994 Views)

You probably don't want to have the time delay VI inside your while loop. This means that everything inside the while loop will execute once every 15 seconds. I wouldn't be suprised if it isn't reading the encoder only once every 15 seconds.

If you want your drive train to run in a sequential manner, one thing you could do is take the drive commands out of your main while loop, and execute them in sequence.

When you have big complicated VIs like yours, it would be better for you to post the vi instead the of the screenshot, that way everyone can see what is happening inside the hidden areas, because that can sometimes show the problem also.

0 Kudos
Message 3 of 4
(2,994 Views)

THANKS for the feed back.

  We were trying to use the independent autonomous, after spending more time on it we identified the problem was with the watchdog.

  We switched to the iterative autonomous and now everything is working as it should.

0 Kudos
Message 4 of 4
(2,994 Views)