View Single Post
  #3   Spotlight this post!  
Unread 17-01-2010, 21:55
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Encoder problems

Quote:
Originally Posted by Pausert View Post
Today I was working on the KOP optical encoders and under no circumstances could I get them to work. I placed the Open encoder and the Set encoder function outside the teleop loop and the Get encoder function in the execute case. This setup worked for my other sensors and I know the encoder works. What am I missing? See code attached.
You should under no circumstances create create constants for "DevRef" inputs. You need to open the digital inputs and pass those references into the "ToDigitalSource.vi" (on the encoder pallete) and pass the reference from that into the encoder open. Look at the Encoder Example for... well... an example.
Reply With Quote