View Single Post
  #2   Spotlight this post!  
Unread 01-26-2011, 10:47 PM
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: CAN from scratch

There are two options for creating a CAN network:

You can use a 2CAN as your CAN bus master (connecting to the cRIO via an ethernet cable)

OR

You can use a Black Jaguar as your CAN bus master (connecting to the cRIO via an RS232-CAN adapter).

Here's an overview of the differences:
  • 2CAN provides access to the CAN bus at 5x the rate of the bridging Black Jaguar
  • You can update firmware directly from the 2CAN, whereas with the Black Jaguars, you must upate the firmware using an RS232 port (or converter) on your computer
  • 2CAN is more expensive
  • Using a black Jaguar will require you to make or buy RS232-CAN cable, wheras the 2CAN uses a common ethernet cable to connect to the cRIO

Now, picking one doesn't prevent you from switching. You can always start with a bridging Black Jaguar, and switch to 2CAN if you decide you need a greater communication rate.
However, we can help you better if you decide which one to go with for now.


You can have a tan Jaguar on the bus. Any Jaguar on the bus requires a firmware update to be fully functional with CAN.



In software, it's a very easy change. MotorDevRefs include PWM- and CAN-based controllers in the same typedef. You can convert to CAN just by changing how the motor is opened. (In LabVIEW, this is in Begin.vi. Make sure to replace the "DriveMotorOpen" with the one from the functions palette, so you can just use the polymorphic selector to change it to a CAN open.


If you're using LabVIEW and the Black Jaguar CAN, I've put together a package to help you set up your Jaguars.
http://kamocat.com/robot/electrical/CAN_resources.zip
__________________
-- Marshal Horn
Reply With Quote