Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Timebase Accuracy for NI CAN Devices

Can anybody tell me the timebase accuracy of the following two NI CAN products?

 

USB-8473

PCI-8512

 

Also, do they use the same transceiver? I believe the 8473 uses the TJA1041 but I'm not sure about the 8512.

 

I'm troubleshooting an issue where connecting the PCI-8512 to my custom device @ 1MBaud results in intermittent bus errors (after initially working well for several minutes).  The 8473 works fine (several days with no issues) when connected to the same network in place of the 8512.  I've tried the 8512 with and without termination and get the same result (using an external 120 Ohm resistor when disabling the internal termination--the same setup as when using the 8473).

John Passiak
0 Kudos
Message 1 of 5
(3,159 Views)

Both the 8473 and the 8512 use the TJA1041 transceiver. The two devices use completely different controllers so a direct comparison of time-base accuracies wouldn't be very useful. 

 

What bus errors are you seeing on the 8512? Form, Ack, Stuff etc? What is the payload of the error frame?

 

Are you using the default baud rate settings for 1M or have you set a custom rate? I.e. have you moved the sample point or adjusted the time quanta etc.

 

 

Jeff L
National Instruments
Message 2 of 5
(3,145 Views)

Hi Jeff,

 

Thanks for the reply--I realized I left out a lot of detail since I was just looking to answer that one question about the timebase accuracy (doesn't that have an impact on the appropriate SJW setting?  Our custom nodes have 50 ppm oscillators for what it's worth).

 

I don't yet have a lot to go on, I'll be doing more investigation on the firmware side.  I was just hopeful there might be some obvious difference between the two NI cards that might give some further insight since the application is working well with the USB 8473.

 

But in case you're interested... more details are:

 

I'm using the old NI-CAN channel API in case that makes a difference (using the XNET compatibility library for the 8512).  It actually isn't too important to get the 8512 working specifically, the final application will use an sbRIO.  However, I'm also trying to validate my firmware on the other CAN node(s) so I just want to better understand what might be going on.

 

It's part of a pretty large application and I need to come up with a more simple test case that I can share (and to help me diagnose), but basically what ends up happening is I do not receive any response from one particular device on my network--there actually isn't an error on the LabVIEW side as far as I can tell other than the lack of a response which results in a timeout at a higher level in my API.  The call "ncReadNetMulti.vi" would return an error frame as one of the array entries, correct?

 

This node in question generates a lot of data (hundreds of frames per query) but it also uses a faster timebase compared to my other nodes.  It generally works for a few minutes and then I'll encounter my timeout error.  Other nodes seem to work fine even with the 8512, but their responses are typically a single frame.  The high data node works fine on the 8473.

 

With regards to baud rate settings, on the 8512 I've tried default 1Mbaud (BRP 1, SJW 1, TSEG1 5, TSEG2 2, 1 sample per bit) as well as 3 samples per bit.  The 8473 card is running default settings.  If you have a good resource for picking optimal CAN bus settings I'd be interested--basically all I am familiar with is that the sample point should be as late as possible (seems like this is 75% for the NI cards at 1 Mbaud) to allow for the maximum propagation delay.  On my device side, I'm at ~89% (think I'd need to lower it to match the NI card?).

 

 

Best Regards,

John Passiak
0 Kudos
Message 3 of 5
(3,135 Views)

Paring down your larger application to a small unit test that you can share would be very helpful for troubleshooting. There aren't many differences between the 8473 and the 8512 at the physical layer. The biggest difference is that the 8473 runs native NI-CAN code while the 8512 must use the compatibility layer.

 

There isn't a 100% match between all NI-CAN functionality and NI-XNET. Bus errors are handled differently in NI-XNET and aren't supported through the compatibility layer so I wouldn't expect ncReadNetMulti.vi to return any error frames.

 

We can try using the 8473 to control the DUT and then use the NI-XNET bus monitor on the 8512 to detect any bus error frames. If we see lots of random error types such as stuff, ack, and form, it would be a good indicator that the sample points are not set close enough to match. Adjusting the DUT to have a lowe sample point closer to the 75-80% range would be something to try. 

Jeff L
National Instruments
0 Kudos
Message 4 of 5
(3,100 Views)

Hi Jeff,

 

I'm thinking we can rule out CAN communication issues--when I dial back my throughput (only sending a single frame per CAN response) it runs fine overnight.  Also, my custom node is not seeing any bus errors either and I have confirmed that it is receiving ACKs for all of the data that it sends (and it is also receiving all of the messages sent from the NI card).

 

I'm now under the assumption that the issue has to do with the buffering within the XNET / NI-CAN compatibility driver.  I did try increasing the Read Queue Length parameter of "ncConfigCANNet.vi" from 100 to 1000 to no avail (I'm not sure if there is any other configurable buffer in this API).  It's a bit surprising to not receive an error though if a buffer overrun is in fact the issue.

 

Anyway, I think I'm going to move along and try it on the sbRIO--I don't want to spend too much time troubleshooting the 8512 since I am just using this board as a prototype.  If I did have to get it working on the 8512 I suppose my next step would be to try writing a module using the native XNET driver.

 

Thanks again for your responses!

 

Best Regards,

John Passiak
0 Kudos
Message 5 of 5
(3,093 Views)