Go to Post Shouldn't we be encouraging exploration instead of repeatedly beating it with a stick? - Mike Soukup [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 9 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 14-02-2015, 17:45
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Talon SRX PID Not Running

We're trying to use the built-in Talon SRX PID loop to control our Elevator motor. We have a quadrature encoder that is correctly reading the position of the Elevator and we can verify that the ticks are increasing as the Elevator moves up. I think that I have done what is necessary in code, but the Talon isn't doing anything during closed loop control.

These are the results of a self-test after (as far as I know) enabling the PID control mode of the Talon.

Code:
The self test completed successfully.
TALON is enabled.
Mode : 1 : Position Close Loop
Applied Throttle : 0
Brake during neutral

CloseLoopError : 1300
ProfileSlotSelect : 0

Selected Device for Close Loop : 0 : Quad Encoder
Pos: -1
Velocity: 1

Quad Encoder 
Pos: 0
Velocity : -1
A Pin : 0
B Pin : 1
Idx Pin : 1
Idx rise edges : 0
This is the code that I'm using to enable PID and change the setpoint:

Code:
elevatorTalon.changeControlMode(CANTalon.ControlMode.Position);

elevatorTalon.set(0.0);

elevatorTalon.setProfile(0);

elevatorTalon.setPID(0.00091054, 0, 0);

elevatorTalon.enableControl();

elevatorTalon.set(setpoint.encoderValue);
(The setpoint used was 1300 encoder ticks)
__________________
Any post that I make expresses only my opinions. I do not represent the opinions of my team or of any entity affiliated with my team.

As a Mentor:
2016 - Engineering Inspiration at Greater Pittsburgh Regional

As a Driver:
2014 - Winner of Greater Pittsburgh Regional

Last edited by eddie12390 : 14-02-2015 at 17:47.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:46.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi