First off, I’m a mentor that graduated high school in 2008, so the last control system I really touched for FIRST was the 2008 IFI Control system. Also, I’ve had 2 internships where my primary job was LabVIEW, so I’m pretty good with it.
Now then… One of the features we would love to use this year is CAN to get reduce the spaghetti and to get some of the features of the Jaguar that are not available via PWM.
I’ve been patiently waiting on NI to release a guide on how to get it working. I understand the basics of CAN, and have the setup program working properly on my laptop with the Black Jaguar via a home-made RS232-to-RJ25 (with GND, Rec, Xmit tied to the 6P6C connector. Again, it works with the computer perfectly, so I’m pretty sure the actual cable is good.
The team programmer (not myself) found Kamocat’s LabVIEW CAN example for use with this year’s FIRST Software… and out of the box it doesn’t work. We have also switched the console output switch on and off.
The problem is the connection. The Jaguar blinks yellow, indicating that there is no network connection. I’m sure all the CAN code is working, but I don’t believe the serial port is initializing.
Any idea what to do? I’ll be really really (and I mean really) happy just to get the LED indicator to stop blinking. From there, I’m sure we could figure it out.
Our team has the same problem. We’ve re-imaged the crio with the Black Jaguar Bridge option, we can turn a motor with the CAN cable connected to the computer using BDC-COMM, we successfully run motors with pwm, so all the basics like the driver station are working, and tried all the suggestions we’ve seen in this forum and from another team we know that got it working.
We’ve tried the “CAN enumerate” vi in the library, and it shows no CAN devices.
We get an error code -52007. We’ve stepped through the “CAN open” vi (I forget the exact name) and it appears to fail when it asks for the firmware version of the Jaguar and gets 0 instead of 92. (Of course, BDC-COMM shows 92).
We’re giving up, unless there are any new suggestions soon…
Well, there’s a couple more steps in here than just loading the code.
In short, you must use the cRIO reimaging utility to install the BlackJaguarPlugin in the cRIO.
Also, the Jaguars must have updated firmware. (Done through the BDC-COMM)
The other things you must watch out for is that the code is made to work with Jaguars at certain Device Numbers.
I apologize about the lack of documentation in my code. I’ll try to have a more complete package uploaded soon.
It will fail out-of-the-box if you do not have encoders attached, or if the Jaguars do not have the correct device IDs. However, both of these things can be changed in Begin.vi
Fritzdejongh, your best option would be to meet with a local team and have them test your hardware with their functional equipment. Something is obviously different between your BDC-COMM setup and your cRIO setup. It could be as simple as a poor connection (bad connection within the cable caused by stress from bending, dirty contacts on your cRIO RS232 port, a poorly seated connector), or something as bad as an issue in your cRIO firmware or your LabVIEW install. It could even be interference (from the netconsole trying to use the cRIO’s RS232 port, or from electrical noise around the cable).
Again, your best option is meeting with someone who has CAN working over the RS232. I can’t help you much without being there with your robot.
You’re just the guy I was hoping for. I saw your LabVIEW code last week and took a look at it. I’m pretty sure our problem is that we’re not using the plugin. I’ll let the programmer know and see what he can do. I forgot to mention that we updated the firmware. I think the plugin is the only thing missing from the equation.
Well we found our problem on Saturday. It turns out we didn’t image the cRIO with the right image. In fact, the programmer never updated the imaging tool like he was supposed to… so no new image, no Black Jaguar plugin, nothing…
After we updated the cRIO, we got a solid amber light on our Jaguar.
Only 1 Jaguar worked though. Turns out the phone cables I bought were reversed. I spliced them this weekend. We never did get them running. I’m sure it’s a simple problem. Probably the fact that it couldn’t find ID #3, the Jaguar with the wrong cable.
Well we got it all running. We’re having a few problems though. One of the Jaguars seems to disconnect randomly. Then we had a whole robot communication failure for no reason at all. I have no idea what caused them.