Go to Post Kickoff in Australia is an overnight party! - timytamy [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 21-02-2010, 22:16
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Thumbs up CAN Jaguar code set up as a VxWorks Library

Hi Gang,

Attached you'll find a zip file that I put together to create a copy of the CANJaguar code as a linkable library (static). Once it's a library. you can link your C++ applications against it using the project build properties in workbench. The library is set to be built from the command line via a make file.

In order to build the library, go to workbench and then project->Open Workbench Development Shell and select the "Wind River VxWorks 6.3" option. This opens a development command box with the environment set up to build code from the command line. CD to where you unzipped the files and type "make". Then copy the library & header files to your chosen directory, set up your header search path and add the library to your project build settings.

Why did I set this up to build from the command line? Well, I've encountered problems with the VxWorks shared library project because it compiles with the PPC32 build spec rather than the PPC603 build spec. This causes problems with the "GOTT" table on the PPC. Building from the command line allows me to simply build the library without having to screw around with creating a whole new set of build specs.

I've combined all of the various flavors of the CANJaguar code from FirstForge, other teams and some extras that I added into this one set of files. I've tested all of the operating modes (voltage, current, speed and position) with this code and have seen these modes work using US Digital shaft encoders and CIM motors mounted in a toughbox gearbox. Using P (.35), I (.003), D (.001) values referenced elsewhere in the forums (thanks!), I find that we get pretty good performance characteristics.

I've tested both V87 and V89 Jaguar firmware with Black and Gray Jaguars. Sorry, I don't have a set up with a 2CAN, so I can't test that easily. If you find anything missing, please let me know and I'll update the software.

Also, you'll find that I changed the indentation of the CANJaguar.cpp code to be that used in the Linux kernel (modified K&R). Sorry if that offends anyone, but I'm a Linux guy . You can always change it back using a pretty printer if you really want to. But, since it's now a library, you really don't need to look at the code .

HTH,

Mike A.
Attached Files
File Type: zip JaguarLib.zip (42.2 KB, 70 views)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
CAN Jaguar Malfunction PranavSathy CAN 4 21-02-2010 18:32
CAN Jaguar Synchronous Updates?? Bryscus Programming 3 30-01-2010 16:13
Black Jaguar RS232->CAN - anyone? oddjob C/C++ 12 22-01-2010 16:25
Can not set team number on DS TekClaz FRC Control System 2 23-12-2008 14:25
FIRST Code Library 114Klutz Programming 17 10-07-2006 15:24


All times are GMT -5. The time now is 02:55.

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