View Single Post
  #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