
12-02-2015, 09:06
|
 |
Registered User
 FRC #0144 (R.O.C.K)
Team Role: Programmer
|
|
Join Date: Dec 2013
Rookie Year: 2014
Location: United States
Posts: 39
|
|
|
Re: Talon SRX Missing Encoder Counts in Labview
Quote:
Originally Posted by ozrien
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.
|
What do you mean by the motor enable vi. Is it the motor set output or something in the begin category?
|