Go to Post I've never encountered a motor as forgiving as a CIM - Stall them for 20 seconds, run them hot on a short turnaround, or call them mean names in between matches and they'll just keep doing their thing. - thefro526 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-12-2012, 01:59 PM
dsirovica's Avatar
dsirovica dsirovica is offline
Programming and Electrical Mentor
AKA: Dean Sirovica
FRC #1458 (Red Ties)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Alamo
Posts: 63
dsirovica is on a distinguished road
CANbus Jaguar control

We are finding several problems with CANbus control. There is no adequate documentation for the WPI lib code - this is a major failing on the part of FIRST.

Problems:
1. We used set(), setX(), and then get() and the get() results drift from what we have set! espaecially pronounced if we vary the set() values. Immediately after a set() or setX() the get() value is the same, but a few ms later it will drift quite significantly ~+/-0.1-0.3.
2. After a while (~10-100ms) the get() value goes to 0.0. We tried to use
CANjaguar.setExpiration() but that didn't do anything - following the source code it appears WPlib does not even use this parameter nor the
DEFAULT_SAFETY_EXPIRATION that is supposedly set at 0.1.
3. It seems that each call to CANbus takes ~10ms so our (very small) code that updates the motors grinds to a crawl, which we think is causing the set() to expire.
4. UpdateDashboard in the main loop - is just unusable due to the delay it causes. We used Timer to run updateDashbord only every second and the motors have a very visible slowdown every second!
5. The Timer "documentation" says it is in microseconds while it is actually in seconds. -minor issue but just highlights the quality and effort that was put into documentation (when there is any). Remember the purpose here is to educate kids, and not to teach them to give up in life!

So any pointers to:
1. perfrmance aspect of comands that use CANbus, updateDashboard, and
driverStation.update.
2. How to get the set/setX() values to stay set (a) no drift, and (b) increase timeout.

Would be greatly appreciated so we can focus on the real code.

Thanks,
Dean
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 08:18 AM.

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