LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN bus - Base and XCP protocol with different baudrates

Hi all,

I'm trying to communicate with a prototype on a CAN bus. The protocols used are the base protocol (DBC -> XNET) and the XCP protocol (A2L -> ECUMC). This last one is used to set specific parameters.

 

I succeeded in getting communication using the base protocol only. The problems arrived when I tried to use the both at the same time. After few unsuccessful tests with errors, I asked the colleagues and discovered that the two protocols use differents communication settings:

 

1. base protocol -> mode CAN-FD, baudrate 500000 Bd, FD-baudrate 2000000 Bd 

2. XCP protocol -> CAN-HS, baudrate 500000 Bd

 

When I tried to use these settings in my driver, the VI "MC ECU Connect" raises the -1074384742 error (something like the interface was already initialized with different settings).

 

Question 1: can base protocol and XCP protocol cohabit while using different communication settings?

 

I thought about a workaround consisting in using the base protocol on the NI CAN-FD interface and the XCP protocol on a Vector CAN-HS interface. These two interfaces are on the same CAN bus with a third interface: the one of the prototype. All the tests we did in this configuration were unsuccessful.

 

Question 2: when a "DBC session" is open on a NI interface, is it possible to open a "A2L session" on a Vector interface, knowing that the communication parameters are different?

 

Thanks! See you

 

 

0 Kudos
Message 1 of 3
(2,459 Views)

⬆️ !Please help! ⬆️

0 Kudos
Message 2 of 3
(2,385 Views)

Hi aRCo,

 

a single CAN interface can share multiple and different sessions (i.e.: XNET CAN sessions, ECUMC XCP/CCP sessions, ADCS UDS sessions), the caveats are:

 

Error -1074384742 is a signal that the logic you have implemented to guarantee the access to the same CAN interface from different sessions is not correct: have a look at the "CAN Frame Input Output Same Port Single Point.vi" LV example in order to understand the logic.

Also, notice that the same error may be arised when running the "NI XNET Bus Monitor" on parallel with your LV application: if that's the case, check that the "Run Mode" of your Bus Monitor Session is set to "Subordinate".

 

 

 

 

0 Kudos
Message 3 of 3
(2,342 Views)