Go to Post Students, mentors, schools, corporations, teams, and communities - they are all critical to the success of FIRST. . - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
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 18-12-2012, 13:47
Dragonslayerend Dragonslayerend is offline
DuncanDynamics lead programmer
AKA: Tom Xiong
FRC #3970 (DuncanDynamics)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Fresno, CA, Duncanpoly Tech
Posts: 33
Dragonslayerend will become famous soon enoughDragonslayerend will become famous soon enough
BDC-COMM & CANJaguar function in C++

I have used the BDC-COMM to implement my PID loop. The mode was Speed, encoder PPR 360, and Quadrature Encoder as my Reference. The problem though is that I found out in Windriver, the PID loop while using CAN was jittery and unstable.

My code In Windriver:
SslTwo->ChangeControlMode(CANJaguar::kSpeed);
SslTwo->SetSpeedReference(CANJaguar::kSpeedRef_QuadEncode r);
SslTwo->ConfigEncoderCodesPerRev(360);
SslTwo->SetPID(-.003, -.013, 0);
SslTwo->EnableControl();

I also notice that the Integral part (__,ki,__) alone of the loop, when implemented in Windriver gave the erratic jittery behavior. While in the BDC-COMM it worked perfectly. Can I get some assistance on this, how come the PID loop erraticly jitters in Windriver and not in BDC-COMM?
Reply With Quote
  #2   Spotlight this post!  
Unread 19-12-2012, 17:23
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: BDC-COMM & CANJaguar function in C++

Are you sure you aren't disabling and enabling? Also are you sure your units are correct? I'm not sure that the units in the bdc-comm are the same as the API in WPILib. Maybe your constants are wrong.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-01-2013, 20:23
Dragonslayerend Dragonslayerend is offline
DuncanDynamics lead programmer
AKA: Tom Xiong
FRC #3970 (DuncanDynamics)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Fresno, CA, Duncanpoly Tech
Posts: 33
Dragonslayerend will become famous soon enoughDragonslayerend will become famous soon enough
Re: BDC-COMM & CANJaguar function in C++

I actually figured out that you can't do a slave and master using CAN, it was the problem that made everything jittery.
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 20:24.

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