Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Talon SRX position control (http://www.chiefdelphi.com/forums/showthread.php?t=134397)

TylerStaudigel 11-02-2015 23:37

Talon SRX position control
 
1 Attachment(s)
I am trying to create pid code using the built in code on the talon srx. I'm programing in labview. The question I have is that when you set your setpoint that the code will try to go to do you place the setpoint in the motor output or the sync group/parameters slot below it in the motor set output vi. I also need to find out how to set the motor output range or if it is even needed. :confused:

ozrien 12-02-2015 00:22

Re: Talon SRX position control
 
Quote:

The question I have is that when you set your setpoint that the code will try to go to do you place the setpoint in the motor output or the sync group/parameters slot below it in the motor set output vi.
I don't understand your question.

Check out the Talon SRX Software Reference Manual to get an idea about what is necessary to leverage the closed-loop feature. It's more then calling the motor-set VI. You have to select your sensor (and may need to software-reverse it), select gains, select the control mode (position or velocity), and then you can set the target and watch it servo.

TylerStaudigel 12-02-2015 08:07

Re: Talon SRX position control
 
Quote:

Originally Posted by ozrien (Post 1442259)
I don't understand your question.

Check out the Talon SRX Software Reference Manual to get an idea about what is necessary to leverage the closed-loop feature. It's more then calling the motor-set VI. You have to select your sensor (and may need to software-reverse it), select gains, select the control mode (position or velocity), and then you can set the target and watch it servo.

I have set up the pid settings and sensor settings in begin. If I understand what you are saying correctly this means that I need to set the desired pid values and set point in the vi that I wish to use to drive the motors instead of begin. I currently calling out the motors in periodic tasks so I can use a control loop to change the desired set point. This method will still work there right?

ozrien 12-02-2015 15:37

Re: Talon SRX position control
 
It sounds like you are asking about selecting the various settings (control mode, PIDF values, set point) in Begin vs in the various loops (teleop/auton).

Either is sufficient and you have a doubt just grab the Self-Test (section 2.4 - Talon SRX software reference manual) and confirm the mode, gains, SelectedProfile, sensor position, closedLoopEr, and set point). You can calculate the set point by (ClosedLoopErr + SensorPos[orVelocity] ).

Obviously you will want to MOTOR SET OUT periodically since you will change your set point in your robot application.

Most of these settings are not applied until you enable your robot (see section 16.2) and will not report in the webdash, so enable the robot before checking.


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

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