Go to Post The best way to deal with an opponent who is going to hang is to go and hang yourself. - dtengineering [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2010, 14:31
Dweller Dweller is offline
Registered User
FRC #1014
 
Join Date: Jan 2010
Location: Ohio
Posts: 2
Dweller is an unknown quantity at this point
Question 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.
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2010, 18:24
ozrien's Avatar
ozrien ozrien is online now
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2010, 19:29
Dweller Dweller is offline
Registered User
FRC #1014
 
Join Date: Jan 2010
Location: Ohio
Posts: 2
Dweller is an unknown quantity at this point
Re: 2CAN API

Thank you so much for the information, we'll be sure to take you up on that offer.
Reply With Quote
  #4   Spotlight this post!  
Unread 12-03-2011, 13:26
brianje brianje is offline
Registered User
FRC #1058
 
Join Date: Jan 2011
Location: US
Posts: 2
brianje is an unknown quantity at this point
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?
Reply With Quote
  #5   Spotlight this post!  
Unread 12-03-2011, 21:07
ozrien's Avatar
ozrien ozrien is online now
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
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).
Reply With Quote
Reply


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
Plugin update for 2CAN ozrien CAN 3 01-02-2010 16:26
Wierd program behavior with LabVIEW and 2CAN Jon236 CAN 7 01-02-2010 15:55
2CAN Plugin Released Mike Copioli Control System 16 24-01-2010 03:31
Legality of the 2CAN Geek 2.0 FRC Control System 9 19-01-2010 20:51
SMTP C++ API Ryan M. Programming 1 23-09-2004 13:49


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

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