Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-8513/2 Customized Baud Rate

Solved!
Go to solution

I finally exchanged the PXI-8513/2 I was using, which utilizes NI-XNET driver for a PXI-8464, which utilizes the NI-CAN driver.  The NI-CAN driver allows you to set a specific baud rate.  It also shows the values of BRP, SJW, TSEG1, and TSEG2 associated with that baud rate.  (I wasn't able to use this tool until the card was in place.)

 

GPIB_Guru- your values were close, with the exception of BRP, which is always 0 with the NI-CAN Baud Rate Calculator?  Thank you!! for the use of the VI; I appreciate it.  I haven't taken the time to learn how this stuff works; maybe I would end up wasting less time if I were to do so?! 

 

Baud Rate Calulate.png

 

 

0 Kudos
Message 11 of 14
(2,347 Views)

NI-XNET is much better than NI-CAN, so I am sorry to see that you changed.

 

Both NI-CAN and NI-XNET allow you to set manual baud rates. The utility to calculate the manual baud rate for NI-CAN in MAX is similar to the VI that I provided, but it is probably more polished to show you what you want. It would be nice for the NI-XNET team to figure out a way to incorporate that information in a cleaner way.

 

FYI, BRP will be different as the two pieces of hardware have different base clocks (BRP is the divisor for the base clock to divide it to the slower bus clock. Once it is divided to the granular period you want, you then subdivide your bit time in a fixed quantity of time quanta (the base clock frequency).

0 Kudos
Message 12 of 14
(2,345 Views)

GPIB_Guru,

 

I was finally able to get to the point where I could really try out your caluclator.  I put the original card back in so I could use N-XNET.  I used the CAN Frame Input Stream.vi example to prove it worked.  (Because I have a sharp learning curve, it took me a while to get to this point!) 

 

Now the first hurdle is over, but now I have to get the XCP workig.

 

Thanks again!! 

0 Kudos
Message 13 of 14
(2,289 Views)

@GPIB_Guru wrote:

 

I attached the VI that I used. It was something I wrote for my own use, so it really hasn't been polished for consumption. I have had a few versions of this over the years, and I don't have any hardware readily available so I cannot guarantee that it produces the correct results. You should probably validate that the shifts match the manual..

 


This is a really cool VI and I'll be attempting to incorporate it into my application so sample points can be changed at runtime.  I plan on using this for CAN FD with two baud rates.  I did notice this is using the 32 bit Baud settings, and because of this when I try to match it to the Custom Baudrate XNet Bus Monitor, or XNet Database Editor, the values aren't the same.  Has this tool been updated to support the 64 bit baud mode?  And is there really any time when the 32 bit one won't be able to have the same settings as the 64 bit one?  I'm also curious about the High Precision baud mode and if there is a time you'd recommend not using it.  Thanks.

0 Kudos
Message 14 of 14
(707 Views)