Go to Post Once I see that it is black with aluminum ends, I only care about the inside. Sort of like Oreo's. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 10-02-2015, 18:58
Chaube97 Chaube97 is offline
Registered User
FRC #4859
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Byron, MN
Posts: 7
Chaube97 is an unknown quantity at this point
Re: Using Encoders with TalonSRX

Ok, I just thought set() was something else that applied to CANTalon modes and PID control. I figured out that the set() values in speed mode go from 0 to 1000. Everything works now. Thank you so much for your help!
Reply With Quote
  #2   Spotlight this post!  
Unread 10-02-2015, 19:13
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: Using Encoders with TalonSRX

Quote:
Originally Posted by Chaube97 View Post
I figured out that the set() values in speed mode go from 0 to 1000. Everything works now. Thank you so much for your help!
Well...wait....it sets the target speed in pos per 100ms, which can be negative (reverse) and can be larger than 1000.

So do you see how in section 17.1 (Talon SRX software reference manual) the example math for a CPR=360 quadrature encoder calculates a speed of 28800 for 20 rotations per second (or RPM=1200)? So set(28800) would servo a velocity of 1200RPM in the positive direction IF using a quad encoder (that's CPR=360).

Make sense?
Reply With Quote
  #3   Spotlight this post!  
Unread 11-02-2015, 17:47
Chaube97 Chaube97 is offline
Registered User
FRC #4859
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Byron, MN
Posts: 7
Chaube97 is an unknown quantity at this point
Re: Using Encoders with TalonSRX

Ohhh. Our encoder is the E4P-250-250-D-D-D-B. I don't know the CPR, is it 250? If we set the speed to 500, the encoder reads a velocity of 300.
Reply With Quote
  #4   Spotlight this post!  
Unread 11-02-2015, 17:53
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Using Encoders with TalonSRX

Quote:
Originally Posted by Chaube97 View Post
Ohhh. Our encoder is the E4P-250-250-D-D-D-B. I don't know the CPR, is it 250?
Yes.

Quote:
If we set the speed to 500, the encoder reads a velocity of 300.
What value is the Talon reporting for the setpoint-process_variable error?



Last edited by Ether : 11-02-2015 at 17:58.
Reply With Quote
  #5   Spotlight this post!  
Unread 11-02-2015, 18:06
Chaube97 Chaube97 is offline
Registered User
FRC #4859
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Byron, MN
Posts: 7
Chaube97 is an unknown quantity at this point
Re: Using Encoders with TalonSRX

Thanks! How many rotations would the encoder have then? I don't know where to find the setpoint-process_variable error, but the ClosedLoopError variable in the self-test section is 200. The motor not going 500 is probably a result of me messing with the PID variables. I was changing the P variable around to see the ocsillation and other things. The motor goes a velocity of 300 when my P = 1.5, and my I and D equal 0.
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 10:54.

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