Go to Post They had a well made scouting form on the bottom was a check box with nothing next to it, when asked what the box was for they said. "Oh thats the jerk box" Since then one of our team goals is "Stay out of the jerk box" - Gary Stearns [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-01-2016, 15:49
CSkillet CSkillet is offline
Registered User
FRC #0135
 
Join Date: Jan 2016
Location: Indiana
Posts: 12
CSkillet is an unknown quantity at this point
Getting Motor to update faster

So I'm having trouble getting values from a motor at a fast pace. I have a Talon hooked up to a motor which is hooked to an Encoder with the idea that I can eventually do PID. Basically I have a program where I log the encoder Velocity along with time. The time updates pretty fast, about every .01 seconds, but the encoder velocity updates every .1 seconds, so the encoder velocity value is the same for ten iterations of time. I have been experimenting with setExpiration() and SetSafetyEnabled() and none of that has worked. I changed the expiration time to .01 figuring that the motor would update every .01 seconds but that didn't work. I was wondering if I had to use EnableControl(). Any Ideas?
  #2   Spotlight this post!  
Unread 30-01-2016, 15:59
ozrien's Avatar
ozrien ozrien is online now
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 549
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Getting Motor to update faster

Sounds like your using a Talon SRX over CAN bus.

Be sure to update to latest FRC legal firmware 2.0. (Section 2.3).

Please read section 16.9 and section 20 for tweaking the update rates the Talon reports it's signals over CAN bus.

setExpiration() and SetSafetyEnabled() is a totally different feature available for all motor controllers (has to do with auto-zero-ing your motors if software does not call set often enough). Also is explained in section 19.

Is there any reason why you are not letting the Talon SRX perform the close-loop for you (section 10.3 Velocity closed loop)?

Sections are in the Talon SRX Software Reference Manual...
http://www.ctr-electronics.com/talon...ical_resources
  #3   Spotlight this post!  
Unread 30-01-2016, 21:10
CSkillet CSkillet is offline
Registered User
FRC #0135
 
Join Date: Jan 2016
Location: Indiana
Posts: 12
CSkillet is an unknown quantity at this point
Re: Getting Motor to update faster

Thanks for the advice. I was able to fix the problem associated with updating the Encoder Position value with SetStatusFrameRateMs(). However, this function did not update the Encoder Velocity value. They are both part of the CANTalon class for the encoder so I'm not sure why it would work for the Encoder Position but not the Encoder Velocity. Any more help?
  #4   Spotlight this post!  
Unread 30-01-2016, 21:44
ozrien's Avatar
ozrien ozrien is online now
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 549
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Getting Motor to update faster

So did you check the firmware version?
  #5   Spotlight this post!  
Unread 01-02-2016, 13:47
CSkillet CSkillet is offline
Registered User
FRC #0135
 
Join Date: Jan 2016
Location: Indiana
Posts: 12
CSkillet is an unknown quantity at this point
Re: Getting Motor to update faster

Yes, updating the talons did work. Thanks for the help!!!
Closed Thread


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:33.

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