Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN XCP cannot connect to ECU

Dears,

our customer is trying to connect to real ECU using NI MC Toolkit.

ECU communication with Vector CANApe works properly.

However, when they try to run XCP communication with LabVIEW MC Toolkit they received constant "-301096 Timeout Error"

On NI-XET Bus monitor they can see the communication between ECU and CANApe.

CAN timing which they set in MAX settings should be correct.

 

Any ideas?

 

 

 

0 Kudos
Message 1 of 14
(4,346 Views)

See the attachment in Troubleshooting XCP or CCP Master Custom Device in VeriStand for some possible steps that you can do with that timeout error.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 14
(4,337 Views)

From Capture2 it looks like there is no response to the CONNECT command from the ECU. Probably something wrong with the communication parameters?

0 Kudos
Message 3 of 14
(4,320 Views)

Hi Sir,

 

I do not have experience for can bus control, so for below diagram, we need extra installation for labview ?

such as third-party lib?

Thanks.

 

Brzhou_0-1687184704618.png

 

Learning from other people
0 Kudos
Message 4 of 14
(4,161 Views)

I would start with checking the baudrate parameters and compare them to Vector. The values in Demo.vi use custom baud rate parameters described in XNET (In LabVIEW: Help / NI-XNET Help). You could also use the XNET Database Editor to edit the custom baudrate as CAN Cluster properties.

0 Kudos
Message 5 of 14
(4,150 Views)

>for below diagram, we need extra installation for labview ?

 

You need NI-XNET and ECUMC toolkit. Obviously you have both already installed as otherwise you would see another error message than timeout.

 

0 Kudos
Message 6 of 14
(4,147 Views)

For NI-XNET and ECUMC toolkit, I have not installed yet, because I just copy the snapshot of others.

So this is the standard installation for CAN bus control, right ?

Thanks.

Learning from other people
0 Kudos
Message 7 of 14
(4,133 Views)

NI-XNET is required for CAN communication

ECUMC is required for XCP. ECUMC is using NI-XNET for CAN communication.

0 Kudos
Message 8 of 14
(4,075 Views)

Hi WaldemarM,

 

Thanks for the info, so the XNET database is to define the frame format, right ?

For the hardware, USB-8502, around 1k USD, any cheap solution ?

Thanks.

 

Learning from other people
0 Kudos
Message 9 of 14
(4,064 Views)

@Brzhou wrote:

 

Thanks for the info, so the XNET database is to define the frame format, right ?

For the hardware, USB-8502, around 1k USD, any cheap solution ?


That is the cheap solution.  Vector sells a similar two port device for around $6k, then closer to $10k depending on software options.

 

If you just want to read raw frames there are cheaper options but they are less industrial grade.  It is hard to find a price but I think Intrepid's Value CAN starts around $500.  There are LabVIEW drivers for reading and writing frames but could use some clean up, and have a harder time working on 64-bit LabVIEW.

 

The cheap-CHEAP route is probably something like a Teensy 4.0 which is round $25, then buy the raw CAN transceiver like the MCP2515, and then write the firmware for the microcontroller to read and write frames, then send it back to LabVIEW using VISA.

 

Doing XCP on any of these device is yet another software layer you'd need to write for.  For an example of this you can look at my G implementation of the ISO 15765 and UDS in Part 8 of my CAN blog.  It is a large challenge and requires knowledge of the protocol and various specification documents.  I've started a similar project for XCP but lost motivation, because the need for me to do XCP isn't something that comes up often.  Going from a raw microcontroller, to getting XCP in LabVIEW would probably take me a few months working full time on it.  Someone with little knowledge of the workings of CAN would take substantially longer, which is why I stick with NI hardware and software when possible.

 

XNet does more then just manage the database, but it does do that.  You define the frames, but also the scaling of the signals underneath it.  Part 5 of my CAN blog goes over this.  XNet also handles the API for retransmit functions and reading.  Part 6 goes into detail a bit more.

Message 10 of 14
(4,057 Views)