Go to Post The jags are powered with magic... - Aren Siekmeier [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 24-02-2016, 08:15
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 79
sraque is on a distinguished road
Re: Using PID with Talon SRX and Mag Encoder

Since you have read the manuals, I will try to tie it all together for you as best I can. Ignore motion profile. It would be an advanced approach.

In brief terms, setting the brake on the talons only holds position in a kind of passive mode. the motor resists turning, but it is not powered and keeping your position.

You need to have the motor actively running to keep the arm in position. Here's the basic approach for you. You do need to use position control PID. Here are two videos to explain (P is not for position).

https://www.youtube.com/watch?v=_bWv...q4iGo s5CQKuw
and go to about 4:00 on this one to see how changing the PID constants affects the behavior
https://www.youtube.com/watch?v=lfMMPe7s9nU

You set the Talon SRX to position control and feed it (motor output VI) the position (in native talon units) you want it to control to and it goes there. You get the positions by moving your arm in manual mode and reading the positions from the web dashboard. Use the Set PID VI to set the PID constants.

Some words of caution. Be very careful. You can easily break your arm. If the position is wrong or the PID constants are wrong, the arm will get jammed against whatever physical limits you have and probably break something. Start with very small P, have the motors disconnected and probe to see what the code is telling the talon to do and the status output VI to see what throttle is being applied and see if that matches what you think should be happening. Reduce the P if large throttle outputs are being observed. Use graphical outputs to see target position and actual position. Connect the motor and proceed to tune as per the second video. Always be ready to disable at a moments notice. Because of different behavior up and down, an arm is going to be very challenging to position control.

Sorry this is so brief, but I need to get rolling to the Palmetto Regional.
Reply With Quote
 


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 20: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