![]() |
Talon SRX in Position Mode Won't keep zero
So i have code that runs our actuators to set our zero's for our Closed Loop PID system. using setPosition(0.0); to set the zero.
It seems to loose its zero after switching positions a few times. its off by about 0.9 rotations about 6-8 inches on our actuator. im using the SRX Mag encoder with the pulse width position feedback selected. Thanks, Matthew Smith |
Re: Talon SRX in Position Mode Won't keep zero
We're going to need to see pertinent code to be able to help.
|
Re: Talon SRX in Position Mode Won't keep zero
its really messy at the moment, just have been trying lots of things sorry.
Code:
package org.usfirst.frc.team2282.robot; |
Re: Talon SRX in Position Mode Won't keep zero
Quote:
Here is an example on how we did it. The code is in the method setMotorPower. https://github.com/trc492/Frc2016Fir...cPidMotor.java |
Re: Talon SRX in Position Mode Won't keep zero
Quote:
|
Re: Talon SRX in Position Mode Won't keep zero
Quote:
https://www.ctr-electronics.com/Talo...e%20Manual.pdf |
Re: Talon SRX in Position Mode Won't keep zero
Quote:
Hope this clarifies anything, |
Re: Talon SRX in Position Mode Won't keep zero
From what I'm reading, I don't think setPosition(0) works in absolute mode. You should instead getPulseWidthPosition() when you hit the limit switch and return to that absolute position.
If you want to use setPosition you could instead use the magnetic encoder in quadrature mode. The whole point of absolute mode is that you don't have to calibrate on boot-up. Also, if you're using the CTRE magnetic encoder, you should select the feedback device with one of the following options. Code:
shooterFlap.setFeedbackDevice(FeedbackDevice.CTREMagEncoder_Absolute);Code:
shooterFlap.setFeedbackDevice(FeedbackDevice.CTREMagEncoder_Quadrature); |
| All times are GMT -5. The time now is 07:54 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi