I'm using the fantastic Vector XL Driver wrappers posted here, and I was wondering if it was possible to query error frame information using these drivers?
I've looked into the XL Driver Library documentation but I didn't see anything in there that was clear on how to read CAN Error frame information. Is this information available? Is there some method of reading bus error information? Thanks.
Sorry Brian, I never got a notification of your question here.
The NI forum search subscription function doesn't seem to like me. I either get nothing or useless mismatches.
It's probably a bit late for this response now, but I don't know of a way to get more useful information out of an error frame itself. There seems to be at least a byte of information returned in a reserved field but I have no idea what it means.
One way to get more diagnotic information when a bus goes into an error state is to look at the chipstate events.
Another way is to look at the error that comes out of the api soon after. I don't know that the transceiver chip is capable of detecting much more than the fact that it can't transmit or no node is ACKing frames.
Ultimately there are only a few possibilities aren't there?
1. No nodes on bus / open circuit
2. Wrong BAUD (Sync errors)
3. Bus improperly terminated (Random error frames due to CRC errors because of reflections)
4. Short circuit (usually results in instant BUSOFF)
No worries, thanks for the suggestios. We did end up just using the chip state and showing that to the user. They seemed content with the string returned so we just perform the Request Chip State once in a while and show that. I would have prefered more information like the kind you see in CANalyzer but as long as the customer is happy.
This is not a simple question, it depends on how you will be using it.
I use the hardware from Vector because we already have so much of it here where I work and it was much more capable than the first CAN hardware from NI.
Our software teams use Vector CANoe software with Vector VN1640 hardware because that's what our customers use and they support many CAN ports. Vector CANoe licenses are very expensive though!
I agree with Troy that the fastest and most supported method of testing UDS would be with NI hardware, and the NI ADCS toolkit. If you want the cheapest I'd say look into the software I wrote for doing ISO-15765 which includes UDS, for KVaser, Intrepid, or Vector hardware.