View Single Post
  #9   Spotlight this post!  
Unread 12-02-2015, 00:11
ozrien's Avatar
ozrien ozrien is online now
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 524
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Talon SRX Missing Encoder Counts in Labview

Chris, I figured out what is wrong, the problem is your LabVIEW app. Without revealing the details of your project, the brief description of the problem is that "Motor Enable" is being called every loop. Every time "Motor Enable" is called, a frame is sent to the Talon to "set" the current encoder position. Since the caller has wired the position signal to the last received position, it has the negative effect of constantly setting the position to the last received position [not ok]. So changes in encoder position in the Talon firmware are being stepped on by the RIO's request to reset the encoder position.

I reproduced your exact symptom by creating a new Labview project and dropping in your VIs. I teleop'd enabled, moved the encoder to the zero position, marked it, moved it forward one rotation and then back. Encoder pos was no where near zero [not ok]. Then I deleted the call to "Motor Enable" in ElevatorPositions.vi and redid the test, encoder went back to zero successfully [ok].

Long story short, do not call motor-enable continually. If you want to kill the motor drive set the throttle to zero or change the control mode of the Talon object.
Reply With Quote