|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Set Jaguar device number via cRIO
So I finally got the time to try out CAN. However, I can't seem to address my black Jaguar.
Here's the setup: 1 black jaguar, connected to cRIO via serial 1 120 ohm resistor between CAN_H and CAN_L Here's the code I'm using: ![]() The enumeration command returns one element with a value of 0. If I interrupt the CAN or serial communication in any way (unplugging a cable, removing the termination resistor, or removing power to the jaguar), it returns an empty array. There's a couple documents saying that the default device number for a Jaguar is 1. Sounds like my results are a little strange. Pressing the "user button" on the Jaguar doesn't have any effect on the return of the enumeration command. Is there anything I'm doing wrong? |
|
#2
|
|||
|
|||
|
Re: Set Jaguar device number via cRIO
Have you set an ID and updated the firmware of the black jag through BDC-Comm (on a PC)? I'm not sure how cooperative an unprogrammed jag is with the FRC code
|
|
#3
|
||||
|
||||
|
Re: Set Jaguar device number via cRIO
I managed to dig up a USB to serial device, but I had the same problems.
|
|
#4
|
|||
|
|||
|
Re: Set Jaguar device number via cRIO
Is the LED on the jag blinking yellow? If not you may be stuck in bootloader. There should be a recover device option in BDC-COMM, which should fix it.
I believe ID 0 means broadcast to all (or it may be host device, not sure). If the jag is somehow assigned to that ID, I'd expect the system to not work properly. Have you tried holding the user button while you turn the power on to the robot? That is supposed to reset the ID to 1. |
|
#5
|
||||
|
||||
|
Re: Set Jaguar device number via cRIO
Yes, the LED is blinking yellow. If I plug in a PWM cable, Normal PWM operation works perfectly (including the LED, brake, coast, and the limit switches).
If I connect another Jaguar on the CAN bus, it shows no change. However, I think I made a mistake in a previous test. It makes no difference whether the termination resistor is present or not. It should be 120 ohms, and connecting the CAN low and CAN high, correct? |
|
#6
|
|||
|
|||
|
Re: Set Jaguar device number via cRIO
The data sheet says to use 120 ohm resistors, but in the cable assembly guide it says that 100 ohm work just fine.
Also, since you are using serial mode, there should be 2 resistors. One of them is in a jack at the end of the chain, and the other is inside the serial adapter, bridging the green and red wires. I guess the only thing left to check is your wiring. Are you using a 6-conductor wire between the cRIO and the black jag? Have you tried a different wire? Are you sure you made the apapter properly? The end result inside of it should have been the red and green wires connected to a resistor, 3 more going to the DB-9 connector, and one left free. I remember I didn't have the bus working for a while because I didn't push the pins all the way into the DB-9 port |
|
#7
|
||||
|
||||
|
Re: Set Jaguar device number via cRIO
Thanks, I forgot to put one on both ends.
I'm using bdc-comm right now, for superstitious aid. I've tried both 120 ohm and 100 ohm resistors, but no change. I've even measured the resistance between CANL and CANH after assembly, but it's around 50 ohms, just as you'd expect. I guess the next thing is to take out an O-scope and see if there's any data being sent on the bus at all. There should be a heardbeat from bdc-comm. |
|
#8
|
|
Re: Set Jaguar device number via cRIO
Are you using the DB-9 to RJ14 (6p-6C) adapter that was specified in the instructions?
I have had bad luck in trying other adapters (like the ones at frys), you are using the one from digikey? (Btw. all the part numbers from digikey can be found in this document http://firstforge.wpi.edu/sf/go/doc1030?nav=1) |
|
#9
|
||||
|
||||
|
Re: Set Jaguar device number via cRIO
Buy the cable? It's just a female RJ25 connected to a female DB9. Is the digikey part specially shielded? I don't have shielding over any of my CAN bus.
I tried to find a periodic signal on the CAN bus (the heartbeat), but I couldn't find anything that would qualify for much more than periodic noise. (only a couple of microvolts, really noisy, and extremely unreliable. However, it didn't seem to appear when I didn't have bdc-comm running or I didn't have my hand resting on my computer, if that makes any difference ) |
|
#10
|
|||
|
|||
|
Re: Set Jaguar device number via cRIO
Perhaps you aren't using a proper wire. A standard 6-pin cable most likely won't work for the same reason you need a crossover cable. A standard phone wire will swap the conductors and not work with CAN.
|
|
#11
|
|
|
Re: Set Jaguar device number via cRIO
Quote:
It seems that in other adapters (maybe only the ones I bought), that the spacing between the side of the adapter and the pins was slightly off. The slot was large enough to allow the 6 pin cord to fit in and latch, but the off spacing would make the pins not line up causing no comms in either direction. Try a continuity test between the pins of the 6 pin cord and the cords inside the adapter (or the DB9 pins). |
|
#12
|
||||
|
||||
|
Re: Set Jaguar device number via cRIO
Watch out for the 100 Ohm resistor legs if you tried to put the resistor into the 6P6C connector itself. I experienced many problems with the resistor shorting itself out if I tried building it like the manual says. I found that connecting the resistor to a wire pigtail coming out of the modular connector to be much more reliable.
HTH, Mike |
|
#13
|
||||
|
||||
|
Re: Set Jaguar device number via cRIO
Quote:
I also double-checked my wires, and they are straight-through. I've tried the terminating resistor both with and without a pigtail. I think with the pigtail is both more reliable, and easier to create. Last edited by kamocat : 10-05-2010 at 20:56. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Set computer to receive it's IP via DHCP? | grosh | FRC Control System | 21 | 28-05-2010 16:33 |
| Set Jaguar device number via cRIO | kamocat | FRC Control System | 0 | 08-05-2010 20:41 |
| CAN Jaguar code set up as a VxWorks Library | taichichuan | CAN | 0 | 21-02-2010 22:16 |
| Unable to set team number | Erebos | FRC Control System | 4 | 27-01-2009 17:00 |
| Can not set team number on DS | TekClaz | FRC Control System | 2 | 23-12-2008 14:25 |