Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   using CAN with the 2010 control system (http://www.chiefdelphi.com/forums/showthread.php?t=80360)

Us3rNam3 16-01-2010 16:21

using CAN with the 2010 control system
 
Does anyone have any tips or know to program using CAN using the Andy Mark adapter? Any info on how to use CAN would be greatly appreciated. Diagrams/pics of code would especially helpful.

Thank you

Alan Anderson 16-01-2010 23:14

Re: using CAN with the 2010 control system
 
You can find documentation and example code here.

(The 2CAN is made by Cross The Road Electronics. AndyMark is merely acting as a distributor.)

Us3rNam3 17-01-2010 13:59

Re: using CAN with the 2010 control system
 
thank you...but unfortunately i forgot to include that i need it for labVIEW not c++

kamocat 17-01-2010 14:53

Re: using CAN with the 2010 control system
 
Send an email to Omar Zrien (ozrien@gmail.com).

Quote:

Originally Posted by Omar Zrien
The cRIO driver/interface will allow you to transmit and receive "CAN Frames", whereby a CAN frame will be defined as a structure with arbid, data bytes, len, and also status bits for selecting extended ids, remote frames, and also possibly error information (Transmit Error Count, Receive Error Count).

I suppose it is possible that they don't have a license to LabVIEW, and thus can't do the LabVIEW portion themselves. In looking at it, it's a UDP datagram of a struct[ message, arbitration ID].
If I had experience with UDP, I'd do it myself.

jhersh 17-01-2010 21:37

Re: using CAN with the 2010 control system
 
The LabVIEW API (as well as C++ and Java) for using CAN is here: http://firstforge.wpi.edu/sf/projects/canjaguar

The C++ API that CTRE has posted will not work with FRC 2010, based on the rules requirement of using the FIRST specific Jaguar firmware.

jhersh 17-01-2010 21:50

Re: using CAN with the 2010 control system
 
BTW, the plugin for the 2CAN has not been released yet. When it is, you will be able to find it at FIRST Forge.

Another way to connect to CAN is to use the new Black Jaguar as a serial to CAN bridge. You just make the cable according the the getting started guide from TI and plug it straight into the RS232 serial port on the cRIO. This way you don't need to buy a separate bridge device and can simply use one of your motor controllers. The driver plugin for using the Black Jaguar as a Serial to CAN bridge is posted on FIRST Forge.

If you are going to use a lot of motors in open loop mode, you may need the additional bandwidth of Ethernet.

airnate 21-01-2010 22:42

Re: using CAN with the 2010 control system
 
If anyone has difficulty navigating the FIRST Forge site looking for the LabVIEW code to use with Jaguar / CAN, here is a deep link to the zip file (at least where it is today):

http://firstforge.wpi.edu/sf/frs/do/...ar_for_labview

Andy Bradley 30-01-2010 18:06

Re: using CAN with the 2010 control system
 
Quote:

Originally Posted by airnate (Post 904383)
If anyone has difficulty navigating the FIRST Forge site looking for the LabVIEW code to use with Jaguar / CAN, here is a deep link to the zip file (at least where it is today):

Thanks very much. Do you know in which directory the extracted files should be placed so that LabView can see them?

airnate 30-01-2010 23:26

Re: using CAN with the 2010 control system
 
Quote:

Originally Posted by Andy Bradley (Post 910114)
Thanks very much. Do you know in which directory the extracted files should be placed so that LabView can see them?

We put them in

C:\Program Files\National Instruments\LabVIEW 8.6\user.lib\CANJaguar for LabVIEW

They will then show up in your User Libraries palette in LabVIEW.

imcmahon01 01-02-2010 10:29

Re: using CAN with the 2010 control system
 
I have a similar question to Andy's. Our team is using the netbeans ide; how is the CANJaguar for Java folder added as a library to allow the use of edu.wpi.first.addons.CANJaguar?

MikeE 01-02-2010 10:57

Re: using CAN with the 2010 control system
 
Our team has looked at the Java CANJaguar release, and at the moment only voltage setting is supported - none of the closed-loop methods are implemented yet.
I'm not sure if the primary developers are planning to release another update before the end of build, but we plan to try to implement some of the functionality we need ourselves. If we have success we will make our efforts available to the community.
In the meantime, the bdc-comm utility does allow some experimentation with closed loop control, but obviously not under actual robot conditions.

jhersh 01-02-2010 12:59

Re: using CAN with the 2010 control system
 
Quote:

Originally Posted by MikeE (Post 911121)
Our team has looked at the Java CANJaguar release, and at the moment only voltage setting is supported - none of the closed-loop methods are implemented yet.
I'm not sure if the primary developers are planning to release another update before the end of build, but we plan to try to implement some of the functionality we need ourselves.

This is the first I've heard of a team wanting to use CANJaguar with Java. I've not ported the C++ class's closed loop methods to Java yet because I had not heard any demand. I'll either do it or find someone else to do it before the end of build.

-Joe

MikeE 01-02-2010 13:04

Re: using CAN with the 2010 control system
 
Thanks for the quick reply Joe. The team decided to program in Java this year since it is the language taught at the High School, and we only started seriously investigating CANJaguar support this past weekend.

I also realize this is the wrong sub-forum for Java discussion, so apologies for hijacking a Labview thread.


All times are GMT -5. The time now is 11:50.

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