Go to Post It's a shame that this is likely the year that sacred ground will be touched by that unworthy drive :rolleyes: - AdamHeard [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 10-03-2014, 22:54
staplemonx's Avatar
staplemonx staplemonx is offline
The Idea Guy
AKA: JJ Biel-Goebel
FRC #1389 (The Body Electric)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Washington DC
Posts: 249
staplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond repute
4 wheel pwm drive with encoders for an xbox controller

Does anyone have any code they could share. Our team has been trying to get CAN working on practice bot and we are running out of time so I told them to go back to PWM based code.

They pushed back by saying you can't use encoders with PWM. I think they are a little off with that statement so I am looking to give them an example of code that can do just that.

Feel free to personal message me if you want to keep it secret.
Thanks
JJ
__________________
crazy engineer
www.jjbiel-goebel.com
helping team 1389
http://team1389.com/
  #2   Spotlight this post!  
Unread 10-03-2014, 23:43
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: 4 wheel pwm drive with encoders for an xbox controller

I'm fairly certain that encoders can only be used in CANBus mode. I think it has to do with how PWMs are not accurate enough? I'm not sure, I know in Labview you cannot code with encoders unless you have CAN Jaguars, as far as I know.
  #3   Spotlight this post!  
Unread 10-03-2014, 23:50
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,825
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: 4 wheel pwm drive with encoders for an xbox controller

Hunter, I hate to break it to you, but your statements ONLY apply to encoders connected directly to Jaguars.

For any encoder connected to the DSC's digital in/out ports or the Analog Breakout, the above does not apply. Of course, then the cRIO has to do all of the work associated with those particular encoders (or offboard it to a co-processor).
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

  #4   Spotlight this post!  
Unread 10-03-2014, 23:52
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 191
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: 4 wheel pwm drive with encoders for an xbox controller

You can only use the encoders connected directly to the JAGs in CANBus mode. You can still use encoders with PWM but you have to connect them to the digital side car's digital inputs or some other input to the cRio and then setup a controller. In LabView there is a PID object and in C++ and Java in WPILib there is a PIDController class you can use.

Edit: What EricH said. I had a hunch someone might beat me to the post.
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?


Last edited by kylelanman : 10-03-2014 at 23:54. Reason: Simultaneous post
  #5   Spotlight this post!  
Unread 10-03-2014, 23:53
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: 4 wheel pwm drive with encoders for an xbox controller

Ah, I see. I assumed he was talking about connecting direct to jaguars.
  #6   Spotlight this post!  
Unread 11-03-2014, 06:44
staplemonx's Avatar
staplemonx staplemonx is offline
The Idea Guy
AKA: JJ Biel-Goebel
FRC #1389 (The Body Electric)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Washington DC
Posts: 249
staplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond reputestaplemonx has a reputation beyond repute
Re: 4 wheel pwm drive with encoders for an xbox controller

Do you have example code for either option?
__________________
crazy engineer
www.jjbiel-goebel.com
helping team 1389
http://team1389.com/
  #7   Spotlight this post!  
Unread 11-03-2014, 08:58
Chadfrom308's Avatar
Chadfrom308 Chadfrom308 is offline
Slave to the bot
AKA: Chad Krause
FRC #0308 (The Monsters)
Team Role: Driver
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Novi
Posts: 272
Chadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to behold
Re: 4 wheel pwm drive with encoders for an xbox controller

We use a 4 PWM/ 4 Encoder drivetrain with our mecanums. We use talons, not jags, though
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 02:43.

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