View Single Post
  #6   Spotlight this post!  
Unread 16-04-2013, 01:34
Dragonslayerend Dragonslayerend is offline
DuncanDynamics lead programmer
AKA: Tom Xiong
FRC #3970 (DuncanDynamics)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Fresno, CA, Duncanpoly Tech
Posts: 33
Dragonslayerend will become famous soon enoughDragonslayerend will become famous soon enough
Re: Multiple Encoder issues

Quote:
Originally Posted by stevep001 View Post
If you put the encoders on higher numbered ports on the DSC do you get the same results?

Have you swapped the cable that connects the DSC to the cRIO?

Which encoders are you using?

When you say "flickering values", what do you mean?

A couple things on your test code -- don't think they're causing your problem, but good to fix.

1. You're setting Jag1 twice and not setting Jag2.
2. Should print out the same value from each of the encoders.
Yeah we get the same results. And By flickering I mean it jumps back and forth from 1-2. Ex: *It gives me* 1,2,1,2,1,2,1. (over and over again as I spin the encoder). We have swapped the cables multiple times. We are using Ep4 360 and 250 encoders. Oh and I have multiple versions of the code to test the encoders that didn't involve Jags and printed out only GetDistance() for both.