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
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
You can find documentation and example code here.
(The 2CAN is made by Cross The Road Electronics. AndyMark is merely acting as a distributor.)
thank you…but unfortunately i forgot to include that i need it for labVIEW not c++
Send an email to Omar Zrien ([email protected]).
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.
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.
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.
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/listReleases/projects.canjaguar/frs.canjaguar_for_labview
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.
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?
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.
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
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.