From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add XCP to existing CAN interface based on XNET and 9862 module

I have already developed some code to communicate with an automotive pump controller using the NI-XNET driver and a 9862 C-series module.  I have been asked to add communication with the same device using the XCP protocol, currently performed using a separate laptop with CANape Vector and a PCAN-USB module.  Do I require the ECU Toolkit and can both protocols be run in parallel on the same CAN bus?  Do I have to use a separate CAN port on the device and run the 9862 as existing and use the PCAN-USB for all XCP comms?

0 Kudos
Message 1 of 5
(4,898 Views)

The ECUMC toolkit greatly simplifies working with ECUs using CCP or XCP. Under the hood ECUMC uses stream sessions and XNET allows up to 6 stream sessions on the same interface. Accordingly, an application can be run in parallel with ECUMC so long as it uses the Frame Stream session type for I/O.

 

I have attached a ECUMC shipping example that has been modified to also output a simple frame in parallel. The same concepts can be used for input as well.

 

XNET does not allow other session types to be started on an already running interface. For this reason, once ECUMC starts its internal stream session on the selected interface, we won't be able to start say a parallel Signal session.

Jeff L
National Instruments
0 Kudos
Message 2 of 5
(4,859 Views)

The application architecture has now changed to the following:

Use XNET on 9862 to read standard CAN messages from an accelerometer.

Use a PCAN-USB Pro FD to read and write XCP data to an ECU-type module on 1 port and write standard CAN on the other port.

My question is now: can I use the ECUMC toolkit with a third-party CAN interface?  My guess is that this is impossible.  Unfortunately the PCAN-USB does not have LabVIEW drivers for XCP, only CAN.

One solution would be to buy a 9853 2-port CAN module and the ECUMC toolkit and avoid any third-party hardware.

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

Will the ECUMC Toolkit work with a USB-8502?

0 Kudos
Message 4 of 5
(4,817 Views)

ECUMC only works with NI devices that use the NI-CAN or NI-XNET driver. I would strongly recommend using a 9860 or 2X 9862s in place of the 9853 for several reasons. The 9853 is FPGA only so it is limited to cRIOs and requires FPGA code to bridge the gap between ECUMC and the 9853 APIs. It is much more challenging to setup and maintain in addition to being less performant.

 

The USB-8502 is an excellent choice for an all purpose desktop development device and does work with ECUMC.

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