Go to Post It's not about the robot. It's about science, technology, engineering, and mathematics. - Ether [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
  #6   Spotlight this post!  
Unread 13-02-2016, 10:16
Tparbotmail Tparbotmail is offline
Registered User
FRC #3944
 
Join Date: Jan 2015
Location: Az
Posts: 65
Tparbotmail is an unknown quantity at this point
Re: Implementing Feedforward/Feedback Motion Profile with Talon SRX

Quote:
Originally Posted by sraque View Post
You're welcome. Just to be clear, my paper does not cover the "buffered" motion profile capability of the Talon SRX. We did not get a chance to try that before releasing this paper, although Omar from CTRE did provide the essential parts of an example during the latter part of Beta testing. I know he plans to have a separate user manual for that feature soon.



In our case, we did log data to a file. Time-stamp, throttle value, and speed as measured by the Talon SRX. I wanted to see how everything behaved. I took the image for illustration when I was building the document. The easiest way for you to get that value is to drive at full speed and then refresh the web page. If you don't have the room to do all that at once, you can grab the logging VIs from our Marvin T code post or build your own.

There is one error in that document that I need to fix and repost. I said to take the cycles per rev from the spec sheet and multiply by 4. This is not correct. The help screen in labview for the configuration VI is confusing. It says:

"Allows setting the Counts Per Rotation of the Talon SRX's connected quadrature encoder. This is also referred to as the 'Number Encoder Lines', 'Counts Per Revolution', and 'Cycles Per Revolution'."

It turns out that the number you send to the config should be Cycles Per Revolution (128 for my Grayhill encoder). The Talon SRX multiplies it by 4. To me, this help text includes contradictory terms. Cycles do not equal counts or lines.

Now, you would rightly say "Dang didn't he notice a 4 to 1 error?" Well, unknown to me at the time, the encoder in our gearbox is not on the wheel shaft. It has a 4.14:1 ration with the wheel. Divide by 4 and multiply by 4.41 and you don't notice much :-) So in the end, my number ended up being 565 fed into the Config VI. Beware a shifting transmission! This ratio will probably change with gear shifts, but you can just change it on the fly in code depending on the status of the shifter.

The end performance of this approach is striking. Tuning the PID gains was really easy (just as the Poofs claimed in their presentation). Very tolerant of values (you see my round numbers..no fine tuning needed). This controls our wheels to within a tenth of a rotation or less every single time.
Hi Steve
How did you get that .97 throttle value for the right side? Having trouble understanding.
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:47.

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