Go to Post Unconventional isn't necessarily innovation. - AdamHeard [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-02-2016, 22:37
Caboose's Avatar
Caboose Caboose is offline
Programmer - LabVIEW, C++, C#, Java
AKA: James Parks
FRC #0900 (Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: NC
Posts: 71
Caboose has a spectacular aura aboutCaboose has a spectacular aura about
Question Help with Armabot RS7 Talon SRX Feed-Forward Tuning

Hoping someone could help with this...

Using CTRE math in the `Speed Closed Loop.lvproj` to calculate the F value of a Armabot RS7 encoder with 12CPR on a 775pro, we are having an issue with the produced F value being too small to run the motor at the desired value.

CTRE Code.
Code:
VelocityNativeUnits = Change In Sensor / 100mS
also
VelocityNativeUnits = RPM / 600 * SensorUnitsPerRotation

Fgain = 100% X 1023 / VelocityNativeUnits , 
       where VelocityNativeUnits  is measured at 100% throttle

Mag Encoder has 4096 units per rotation.

Example: VelocityRPM is 10198 at 100% throttle
                 => VelocityNativeUnits = (10198 / 600 * 4096) = 69618
                 => Fgain = (1023 / 69618)  = 0.01469
We are setting the CPR using the Talon SRX API VI. And multiply the CPR by 4 to get the SensorUnitsPerRotation.


Since the CPR is being set the `Sensor Velocity` is returned as RPM. So to get the VelocityNativeUnits we use the second equation.

Running the motor in %vbus at 10% we get a VelocityNativeUnit of 31 so we use the equation Fgain = (1023 * 0.1) / 31 = 3.3. Trying to run this Speed mode this applies a throttle of 1%.

Am I doing something obviously wrong?
__________________
navX Labview Library

"Robots are aluminum shavings, held together by zip-ties."

myManga

Last edited by Caboose : 20-02-2016 at 14:48. Reason: Clarification of title.
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2016, 16:27
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Armabot RS7 Talon SRX Feed-Forward Tuning

Use the self-test to confirm the native velocity as seen by the Talon.

Also I would avoid using the config-encoder-cpr VI and use native units in your LV app, see section 21.25 for the details
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2016, 17:51
Caboose's Avatar
Caboose Caboose is offline
Programmer - LabVIEW, C++, C#, Java
AKA: James Parks
FRC #0900 (Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: NC
Posts: 71
Caboose has a spectacular aura aboutCaboose has a spectacular aura about
Re: Armabot RS7 Talon SRX Feed-Forward Tuning

This seems to work, thanks.
__________________
navX Labview Library

"Robots are aluminum shavings, held together by zip-ties."

myManga
Reply With Quote
  #4   Spotlight this post!  
Unread 21-02-2016, 10:09
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Armabot RS7 Talon SRX Feed-Forward Tuning

We were bitten by the div by four sensor feature. It didn't cause issues with our F calculation, but we noticed it and thought is was rollover.

I've been meaning to ask you why that feature exists in the LV version. Do we need these things exposed?

Greg McKaskle
Reply With Quote
Reply


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 04:22.

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