07-09-2010 10:37 AM
There are two things I would like to mention. First, if there are only two nodes on the bus, listen only won't work, because "someone" has to acknowledge the message. If there are only two nodes and one is listen only there is no ack bit. Second, a properly terminated CAN bus has 2 120 ohm resistors, one at each end, therefore the net resistance on the bus should be 60 ohms. Normally when there are CAN issues, this is the first thing I check. You have to make sure all the nodes are powered down, or you will get some, well shall we say "odd" readings. Grounding is not really relevant, because the protocol backbone is based on a differential pair. When referenced to "ground", generally you'll see a signal that "floats" around a 2.5 volt offset.
07-09-2010 11:24 AM
Thanks, I'm pretty sure I have the basics covered. I previously checked that there were terminators on both ends of the bus (combined resistance ~ 60ohms) ... sorry I didn't mention that earlier. I believe that this is a real issue with the transmitting module and I am just trying to dig into to it to better understand and hopefully help find root cause. Bottom line is that I am trying to better understand how, why, and when Error Frames occur.
I read on a J1939 discussion web site that an error frame does NOT contain any information whatsoever. An error frame is a certain sequence of bits that destroys the last message on the bus, and synchronizes all nodes. Here is the link http://www.j1939forum.com/viewtopic.php?p=407&highlight=#407 . Do you agree with the statement on this forum and if so is there a way to use the info displayed in the BusMonitor [Error Frame 4 00 00 01 AA] to better understand what went wrong? Any insight would be appreciated. Or perhaps there is a tool available for actively diagnosing errors on a CAN bus?
Thanks,
Don
07-09-2010 11:48 AM
FOLLOW UP:
From what I read there are only a few reasons that cause an Error Frame to be transmitted on the bus (Bit Stuffing, Bit Error, CRC Error, Acknowledgement Error, Form Error). Could you reccomend a way to diagnose the bus to better understand what type of error is happening?
Thanks Again,
Don
07-09-2010 11:49 AM
As far as I know, there is no real information in an error frame. As a matter of fact, from what I know, an error frame is a "stuff" bit violation. In the CAN specification, you are not allowed to have more than 5 consecutive bits at the same level. Therefore, if there are 6 bits low or 6 bits high in a row in a message, a bit is "stuffed" into the message, to maintain compliance with the specification. This is all generally transparent to the user because it is usually handled in "hardware". An error frame, by definition, starts by violating the "stuff" bit rule. An overload frame is also similar.
Starting out you didn't mention J1939. I have a lot of experience with J1939, and CAN in general. There are a lot of things that can cause an error frame. Noise on the bus is a big one. The first thing you should try to do is figure out who is sending the error frame. You should be able to do this by checking the error counters. I'm working from memory here so.... The USB 8473 has two error counters, one is transmit, and one is receive. Since there is only two nodes, if you look at the error counters you should be able to know who is reporting the error. Then you know where the error is at. CAN errors can be very difficult to track down as to what the actual cause it. I work in electric vehicles and with the high currents I find a lot of noise issues. I would get a scope, and with a differential probe, check out the signal and see how "hairy" it is. Looking at the signal with reference to ground is not really relevant, because the CAN transceiver doesn't "see" it that way. The other thing you could do is try a different unit. Here is one little trick I've used, I don't know how good it is to do but, on occasion you can find a "weak" CAN transceiver. A quick, dirty test for this is to remove one terminator. If you have a weak transceiver, sometimes it'll start working with the higher impedance. I've also seen instances where adding a 3rd terminator will kill the noise, and the bus will start working. In practice, neither one of these is really a great idea because of overloads and overvoltages.
07-15-2010 09:58 AM
I have one question: When do you see these Error Frames ?
As I can see from you picture, there are "only" 5 Error Frames on the bus. Are the comming when you start the bus monitor or when you start the J1939 unit ?
Are they only comming in the begin or all the time ?
Some CAN Error Frames can also be related to CAN bautrate not set correct in both nodes.
If your unit is at startup is per default having a wrong bautrate, that could make a Error Frame in the Bus monitor.
07-15-2010 01:51 PM
I looked at the bus on an o-scope and the baud rate looks good. After more experimentation I am finding out that the errors appear to be tied to the operating voltage. As I adjust the battery voltage to the module (in the devices operational range) I can get the error rate to change drastically (from 0 errors/hour to ~1000 errors per/hour). After discusisons with the manufacturer I am finding out that device has an old version CAN board that has known regulator issue.The manufacturer is trying to round up a newer version of the board for us to test.
07-16-2010 05:43 AM
That could definitely cause issues. If the baud rate were incorrect, all you would really get would be error frames. You can't beat using a scope to find out what's really going on. You should be aware however, I have been in situations where the scope, (depending on the scope, probes, etc.,) will actually cause problems as well. We had a situation where someone was trying to diagnose an issue, "floating" the scope instead of using a differential probe. This practice can be dangerous working on 800 volt hybrid vehicle circuits like I do, but in this particular instance, the scope was actually injecting noise on the bus. Bottom line, you have to have the right instruments and you have to know the instrument you're using.
A question that I have; does anyone know how to send error frames? I am trying to test some hardware/software and I need to look at the handling of the error frames. I can force errors, by wrong baud rates and .... but that ends up being rather arbitrary. You don't really know how many errors you should have generated etc.
08-23-2010 02:07 PM
We have resolved our issue. The manufacturer tried to sell us old hardware (the old hardware had CAN issues). But, I still do not have an answer as to If the USB-8473 detected an error (with the Listen Only Checkbox not checked) would the USB-8473 terminate the transmission and what would you see on the NI-CAN BusMonitor?
Thanks,
Don
08-24-2010 12:25 PM
Hello Don,
If the listen only checkbox is not checked it should not stop the transmission on the CAN bus. Also on the Bus Monitor you should just see the error frame that was transmitted.
Best Regards,
Adam G
08-24-2010 03:51 PM
Adam,
Just so I'm clear, it sounds like when using the USB-8473 with the NI Bus Monitor... it will not terminate a transmission, creating an error frame (if the listen only checkbox is checked or not).
Correct?
Thanks,
Don