Go to Post If you squeeze cost out hard enough, any component can become a failure point. - EricVanWyk [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 08-02-2013, 19:13
ekapalka's Avatar
ekapalka ekapalka is offline
Registered User
FRC #3216
 
Join Date: Dec 2012
Location: Bermuda
Posts: 277
ekapalka has a spectacular aura aboutekapalka has a spectacular aura about
ENcoder speed from -1 to +1

Hello! At this point, we've figured out how to program just about every sensor type available to us except the encoder. Now we would like to, but from what I've read, the data type returned is in RPM. For our application, we need it to return a value from (-1) to (1). We would like to gather the data from the sensors while the motors are not under their own control (while we are pushing it), so I don't think we can read the voltage from the motor controllers for this task. Any help would be great!
~Eric
MRT3216
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2013, 20:47
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: ENcoder speed from -1 to +1

The most basic data returned from a rotary quadrature encoder is the total amount it has turned since the count was reset to zero. The FPGA also computes a rate based on the time between "ticks" of the encoder. The rate is presented in counts per second (scaled by an optional "distance per count" that you can set when you configure the encoder).

What do you plan to do with the encoder information you gather while the robot is being pushed?
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2013, 22:24
ekapalka's Avatar
ekapalka ekapalka is offline
Registered User
FRC #3216
 
Join Date: Dec 2012
Location: Bermuda
Posts: 277
ekapalka has a spectacular aura aboutekapalka has a spectacular aura about
Re: ENcoder speed from -1 to +1

Basically, we would like to "record" the speed of each motor every tenth or hundredth of a second, then store that data somehow (someone said it could be stored in a text file). We've devided a method of playing back data (we randomly chose two sets of 150 numbers between -1 and +1, one set for the left and one for the right) which works pretty well in concept. We just need real data to use. Is there any other way to do this (if the encoder method fails)?
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2013, 22:36
Iaquinto.Joe's Avatar
Iaquinto.Joe Iaquinto.Joe is offline
RPI 2018
AKA: Joe Iaquinto
FRC #0308 (The Monsters)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2011
Location: United States
Posts: 166
Iaquinto.Joe is a jewel in the roughIaquinto.Joe is a jewel in the roughIaquinto.Joe is a jewel in the rough
Re: ENcoder speed from -1 to +1

Do you want the speed you are sending to the motor? If so you can use the Get() method from your motor to record it. If you want the current speed of your wheel use the GetRate() method from your encoder. Be sure to use the pulse number of your encoder and the circumference of your wheel to find the distance per pulse for each encoder.
__________________
4 year 2011 - 2014 FRC team 308 member, Lead Programmer - C++ / LabVIEW

3 year 2011, 2013, 2014 OCCRA member, Co-Captain OCCRA team 308
  • OCCRA Engineering Excellence - Waterford Kettering 2013
  • Innovation in Control - 2011
  • Quality award- Northville 2012
  • Engineering Excellence- Howell 2014
  • Innovation in Controls- Livonia 2014
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 14:39.

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