Go to Post Remember to have fun! That's what the FIRST experience should be for you- a lot of fun while doing a lot of learning. - smurfgirl [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

 
 
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #20   Spotlight this post!  
Unread 17-01-2012, 17:26
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: New to 2CAN and Jaguar

Quote:
Originally Posted by jwakeman View Post
if you are in percent vbus mode I would think the PID gains should have no effect.
That's exactly my point. I was using PercentVbus mode, PID constants should be totally irrelevant and should be ignored. It is true that I could just comment out the SetPID calls and call it good since PercentVbus mode doesn't need them. But there are cases where I need to call ChangeControlMode and change to a close-loop mode. When that happens, I must call SetPID to set the constants. And later on, I may switch back to PercentVbus mode. If calling SetPID would make non close-loop mode not working, that's not very intuitive.
BTW, I set Kp to 15 because I tested the Jag with bdc-comm tool using Position mode and found that if the value is higher than 15 (e.g. 20), the wheel will oscillate before stopping at the target position. If it is less than 15 (e.g. 5), it takes a long time to get to the set target. I am not familiar with the internal PID algorithm of the Jags, but from my point of view, K should be different in different modes. For example, Kp is multiplied to the "error" to get the output voltage. Different modes have different units (Amp in current, rev in Position and rev/sec in Speed). So the error will be in different ranges and so the K multiplier could be quite different. Since I am new to Jags, I could be totally wrong but this is my understanding. Regardless, even if my K's are wrong, as you said, PercentVbus mode should ignore them anyway. So why would it not work if I called SetPID?
__________________
Reply With Quote
 


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:13.

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