|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: CAN tutorial
We tried out CAN this year via a Serial to CAN cable to a Black Jag. We had a 6 motor drive train and one motor for the elevator (2 black jags, 5 grey). Our CAN code worked beautifully with the drive train; we had not yet wired up the Jag for the elevator. When we did and started running elevator at the same time, we got lots of lag issues, with safety timeouts and CAN bus errors all over the place, resulting in system watchdogs beyond belief. We had it later confirmed (not sure where) that the Serial CAN bus on the cRio can only handle 6 jags efficiently, so we had it switched out for PWM. Unfortunately, due to <R49> and <R58> we couldn't have the limit switches on the elevator jag, which was a big sad face for the programmers.
Have other people had issues with more than 6 jags on the Serial bus? Is the 2CAN able to handle it? (I've heard it's bus speed, anyway, is much much faster, at about 800MHz?) We also had one Jag (grey) that gave nothing but a Vbus fault in BDC-COMM and didn't accept any image. It worked flawlessly with PWM, so it was probably a firmware issue. |
|
#2
|
||||
|
||||
|
Re: CAN tutorial
Quote:
the odd jaguar might have metal shavings inside... open it up and make sure its clean. I was able to fix 5 ones in the junk box that way... remove the shavings and they come back to life. |
|
#3
|
|||
|
|||
|
If I'm reading this correctly, the firmware must be updated prior to assigning a number? My team is currently experimenting with CAN on one of our off-season robots, and we've gotten as far as getting the LED on the black jaguar to be a solid yellow (don't ask why we've waited this long to even get this far!) while connected through 6P6C-DB9 cable to a laptop, and BDC-COMM is saying that it is connected, however, when we attempt to assign a number to the Jaguar (so far, just the black jaguar, and it does have the proper terminator) it gives us the countdown, we press the user button in time, it flashes yellow once, and goes back to solid yellow (meaning that it's being assigned to ID 1, when we're trying to do ID 2). So, is our issue that we need to update firmware first, or is it something else?
![]() |
|
#4
|
||||
|
||||
|
Re: CAN tutorial
Go ahead and update the firmware. You will have to do it eventually anyway. I expect the reboot will reset the address to 1 regardless of the current address. I have not actually tried with any ID but 1 this so I could be wrong.
The procedure is to put the new address in the box. Click the assign button. you see the box counting down & the jag light blinking. Press the user button within the 5 seconds. Sorry for being redundant. Should work. Look at the top of the BCD Comm box for the current board ID NOT the assign box. You can find directions for BCD-COMM here |
|
#5
|
|||
|
|||
|
Re: CAN tutorial
Quote:
The jag light was remaining solid after we pressed the assign button. Also, although the jag's LED was solid yellow, there were no board IDs listed in BDC Comm. Also, we had to force the computer to set the jaguar to Com port 1, otherwise, BDC Comm wouldn't even acknowledge that there was another Com port present. The black jag was the only one on the network at the time, and attempting to daisy chain through to a tan jag yielded no communications on the tan jag. |
|
#6
|
||||
|
||||
|
Re: CAN tutorial
The solid light means the jag has a signal which infers communication. Seems like I was getting this problem earlier, but I didn't actually have communication. Turned out I had a pin wrong in my RS232 adapter cable.
If the led remains solid after you press the assign button, it is not getting the command for some reason. Can you down load the Version 92 firmware? Is the temp updating? That would eliminate some possibilities. Some computer comm questions. Look in system settings is your RS232 port really comm 1? What kind of RS232 port are you using? Do you have another program trying to use the com port. RSlinxs (Allen Bradley & the old Palm software was real bad about that. Do you have a IR port. |
|
#7
|
||||
|
||||
|
Re: CAN tutorial
I may also suggest reading my whitepaper on serial CAN... the later firmware sections in particular.
there is a link in my signature |
|
#8
|
|||
|
|||
|
Re: CAN tutorial
Quote:
I can re-check the pins on the RS232 to CAN cable (the next time I'll be able to do so is on Thursday), this is the only thing I can think of that would be the issue, because it's not even updating the temperature. We have not updated the firmware from factory default, I was afraid that the issue was with sporadic communications, not no communications, and that might risk bricking the jag. Under the system settings, it used to be that a printer port on the laptop (a very old laptop) was assigned to COM1, we disabled that in the system settings, and forced the com port on the jag to 1, under the software of the usb to serial interface that we use. When we select "connect" in BDC comm, the status LED on the adapter blinks (it's active), and the software shows it as a "busy" state, all leading me to think that we do have comms, but it must be with wiring. I will also try with another black jag, and see if it's the jag that's the issue, I'll keep you posted |
|
#9
|
||||
|
||||
|
Re: CAN tutorial
Sounds like what I had with a bad cable. The BCD-Comm program was showing connected but that just seems to mean it is talking the the serial port. I apparently had transmission to the jag because the LED on the jag was solid. I fixed the pins & suddenly everything works.
|
|
#10
|
|||
|
|||
|
I believe I have figured out the issue here, and it is totally 100% human error if so. I believe that the issue arose from the fact that I forgot that DB9 female is reverse on its pin numbering from DB9 male... This would explain why it was a solid yellow LED (jag was receiving comms from the computer, because pin 3 is the same on both male and female, and is Tx), but was not appearing on BDC-comm (Rx was not wired in at all, rather, it was the DTR pin) it might also explain why it could not change its number, it must require some sort of handshaking to do so. Again, this is theory, and will not be tested until Thursday, but I'm willing to make a solid bet that that's the issue here. I'm sorry that I sort of wasted your time.
|
|
#11
|
||||
|
||||
|
Re: CAN tutorial
Don't be sorry. Wasting time is one of my favorite activities.
![]() BTW I did not see this as a time waster. |
|
#12
|
|||
|
|||
|
Re: CAN tutorial
Quote:
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|