Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   CAN (http://www.chiefdelphi.com/forums/forumdisplay.php?f=185)
-   -   2CAN API (http://www.chiefdelphi.com/forums/showthread.php?t=82112)

Dweller 07-02-2010 14:31

2CAN API
 
Does anybody have any documentation on the API for the 2CAN device? We're looking for a byte command protocol or something that would allow us to read the raw CAN data packets from the ethernet network.

Thanks.

ozrien 07-02-2010 18:24

Re: 2CAN API
 
If you are trying to send/recieve CAN frames from the cRIO you can just use the functions prototyped in the JaguarCANDriver.h (see CANJaguar c++ examples). this uses the FRC_2CANPlugin.out (see 2CAN User Manual).

If you are trying to send/receive frames outside of the cRIO you can socket to the 2can and do it yourself. We don't have documentation yet for the protocol but you can figure it out by looking at the code for the 2CAN plugin. Basically each CAN frame is wrapped in a udp datagram.

To get the plugin source check out the CANJaguar repository from FIRSTForge (SVN). There is a sudirectory under "plugins" that has the FRC_2CANPlugin c++.

If you have any trouble PM me and i can get you what you need.

Dweller 08-02-2010 19:29

Re: 2CAN API
 
Thank you so much for the information, we'll be sure to take you up on that offer.

brianje 12-03-2011 13:26

Re: 2CAN API
 
Hello,

I am also trying to decypher the 2CAN API in order to make a program that can control jaguars directly. I found the repository you referenced, but the username/password it provides doesn't seem to work. Do you know it its been changed?

ozrien 12-03-2011 21:07

Re: 2CAN API
 
Hmm... looks like there isn't anonymous access to the repository.

I posted the source on our website...
http://www.crosstheroadelectronics.com/2CAN.htm
Download Wind River Kernel Module Plugin Source (SVN rev 66) for FRC cRIO (Posted 3/12/2011) and import the project into Wind River. Then you can build the FRC_2CANPlugin.out that normally goes in the cRIO's FTP server.

Take a look at C2CAN::receiveMessage and C2CAN::sendMessage. Specifically how STo2CAN_TxCANPacket and STo2CAN_RxCANPacket are used.

Also I invite you to take a look at the C# example at...
http://www.crosstheroadelectronics.com/Cross_link.html
...for using a 2CAN to control Jaguars with non-FIRST firmware. With this you can drive your robot with just your PC/laptop/driverstation/net-book and connection to your 2CAN (Ethernet or Wi-Fi).


All times are GMT -5. The time now is 20:25.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi