LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET : Custom baud Rate Vector CAN to XNET CAN

Hello,

 

I have CAN settings from the customer which he has given me from Vector CAN.

 

Arbitrationphase: Sample Point 80% BTL: 160 TSEG1: 127 TSEG2: 32 JumpW: 32
Dataphase: SamplePoint 70%  BTL: 40 TSEG1: 27 TSEG2: 12 JumpW: 12

 

I have to do this setting in the XNET monitor, I know I should (-1) from each of the settings above to put it in the XNET CAN settings.

 

In database setting > BaudRate > Custom, i could able to achieve the exact values and don't find where is BTL(bit timing cycle).

 

If you could help me that would be great 🙂

 

Thanks in advance!!

-
Amit
CLAD
0 Kudos
Message 1 of 5
(3,981 Views)

I'm pretty sure the "bit timing cycle"(Vector's language) is the same thing as the "Time quantum"(NI's language).

Looks like there may be some limitations though since 40 and 160 don't look like they can be programmed exactly using XNET.

 

What's the intended application? Normally just having the nominal baud rate is enough to get a good configuration.

 

0 Kudos
Message 2 of 5
(3,950 Views)

Thanks for the feedback , yes 40 and 160 can not achieve in the XNET.

 

Intended application is to receive CAN FD signal and at the same time there are CAN HS signal present but it seems those configurations are not achievable in XNET.

 

We successfully did this for other project where this values where achievable. 

 

Any further suggestion would be appreciated.

 

Thanks in advacne

 

 

-
Amit
CLAD
0 Kudos
Message 3 of 5
(3,937 Views)

At this point, your best bet is probably to get a hold of someone in NI Applications Engineering with a support request.

 

If it were me, I might try using 50 and 150 just to see if the behavior is close enough. I don't know your application though and whether that would be acceptable or not. Most of the CAN applications I deal with use a standard baud rate where the NI defaults work fine.

0 Kudos
Message 4 of 5
(3,927 Views)

Hi,

 

I have been working with this a little bit and found that the BTL cycles (Bit Time Logic) is TSEG1+TSEG2+SYNC_SEG (fixed at 1). There you will have the Vektor BTL cycles. It seems NI does not use it but is just additional information from vektor.

 

Using the information from this application note BTL means time quantum. Also I asume that both NI and Vektor do not take PROP_SEG into account. or merge it with TSEG1.

 

https://www.infineon.com/dgdl/Ap2900010_C166_C500_CAN.pdf?fileId=db3a304412b407950112b41975592877

 

So I would say that you can achieve the same using TSEG1: 127, TSEG2: 31 and the right BRP (Baud Rate Prescaler).

 

This one also differs from NI. I use a USB CAN 8502 and it seems it runs at 40Mhz Oscillator Frequency, Vektor tools use 80 Mhz.

 

I calculated this from 

 

http://zone.ni.com/reference/en-XX/help/372841T-01/nixnet/nxpropsession_intfbaudrate64/

 

You did not publish the Vektor prescaller but for example a customer requested 500 kBaud at 81.3 sample point.

 

Vektor required:

BTL Cycles: 80

TSEG1: 64

TSEG2: 15

Prescaler: 2

Sync Jump Width: 12

 

NI XNet

TSEG1: 63

TSEG2: 14

Prescaler: 0

Sync Jump Width: 11

 

I also achieved this second example 

 

Vektor required:

BTL Cycles: 16

TSEG1: 12

TSEG2: 3

Prescaler: 10

Sync Jump Width: 12

 

NI XNet

TSEG1: 11

TSEG2: 2

Prescaler: 4

Sync Jump Width: 11

 

And there are another two configurations that could not be achieved with NI's hardware due to the difference in the Clock Frequency.

 

Vektor required:

BTL Cycles: 32

TSEG1: 25

TSEG2: 6

Prescaler: 5

Sync Jump Width: 12

 

Vektor required:

BTL Cycles: 160

TSEG1: 129

TSEG2: 30

Prescaler: 1

Sync Jump Width: 12

 

Following the previous logic the sampling point can be achieved but since the clock frequency is smaller the possible prescaler values to get the requested speed cannot be reached.

 

I hope this helps you and I think is a good ideafor NI to al least match or offer higher speeds to match Vektor since it is standard to many companies.

 

Regards,

Juan Navarro

Juan Navarro
Message 5 of 5
(3,723 Views)