FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder Rate Doesn't Work

Having trouble using the rate output of the encoders.  Using the Encoder Example vi, going a constant speed, the rate in one direction is zero and the rate in the other direction is intermittently zero.  The pulses coming out of the encoder are accurate.  Any hints or is this a bug with the encoder vi?

0 Kudos
Message 1 of 9
(8,000 Views)

The encoder rate works if deployed at 1x or 2x but not at 4x.  The behavior at 4x deployed remains the same as described.  ???  What is wrong with 4x?  (Digging into the Encoder Get VI, the 4x is different from the 1x & 2x.)

0 Kudos
Message 2 of 9
(3,321 Views)

Are you using averaging?

I think I just read that the minimum averaging for 4x encoding is 2 (the default).

Setting averaging to 1 causes problems.

Get a life? This IS my life!
0 Kudos
Message 3 of 9
(3,321 Views)

Thanks Philbot.  We were using 1 for averaging in the code we were testing.  We will try more than 1 and see what happens.

0 Kudos
Message 4 of 9
(3,321 Views)

Still can't get 4x to work with averaging greater than 1. 1x & 2x works fine so we're going to stick to 2x.

0 Kudos
Message 5 of 9
(3,321 Views)

Are you using LabVIEW update 3 with the v11 image?

0 Kudos
Message 6 of 9
(3,321 Views)

The default in hardware is 2, but the default on the configure timer VI is 1.  That can be a source of confusion.  Just make sure you use at least 2 for averaging in 4x mode with the latest update.  Before update 3, the rate output of the encoders was not accurate in any mode.

0 Kudos
Message 7 of 9
(3,321 Views)

I am using software version 3.0a.

0 Kudos
Message 8 of 9
(3,321 Views)

I was using 4 as the value for averaging during 4x mode.

0 Kudos
Message 9 of 9
(3,321 Views)