Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

XCP MC ECU Connect code -301096

Solved!
Go to solution

This is a similar problem to

http://forums.ni.com/t5/Automotive-and-Embedded-Networks/XCP-connection-problem/m-p/905869/highlight...

but the solution is not the same.

 

I want to connect to an ECU via XCP.  The XCP communication properties are stored in the a2l file so I did not specify them in my VI.

 

protocol and interface is XCP:CAN0

comm properties are shown here:

comm properties.png

 

I just can't figure out why it will not connect. 

 

versions:

LV 13 SP1

NI-CAN 15.0

ECU M&C 2.3.1

 

Any ideas on what to check or try?

 

Thanks!

0 Kudos
Message 1 of 5
(6,188 Views)

A timeout for a no-response is generally due to a mis-match between communications settings such as baud-rate and CRO/DTO IDs. Assuming those are correct in the A2L file, the next item I would check is termination. Neither the toolkit nor the underlying XNET (or NI-CAN if you are using CAN 0) have the ability to automatically detect and set the proper termination settings. If the physical layer is not terminated properly, the frames may not be received by either the application of the ECU. 

 

1) Verify there is 60 Ohms of termination total.

2) If using XNET, use the bus monitor to check for error frames on the bus indicating poorly formed messages and verify the connect message is being sent to the ECU. The bus monitor will also show if the ECU is responding with the incorrect ID.

 

Jeff L
National Instruments
Message 2 of 5
(6,170 Views)

I have 60 ohms of termination (62.5 ohms exactly)

 

Now I am using the Measurement and Calibration Application vi found in the MCECU library.  I have manually entered the CRO and DTO id as well as the baud rate to ensure they are correct.  I have also tried letting the applicaiton read it from the a2l file.  neither changes anything.

 

My powertrain CAN uses a baud rate of 667k.  The a2l file specifies 500k.  I have tried both and neither seems to change anything. 

 

Because the XNET bus monitor only works with predefined baud rates (667k not being one of them) I am only able to try this when using a 500k baud rate.  However I am uable to use the bus monitor when also using the M&C applicaiton.  The errors -1074384589 "NI-XNET: a cluster with the same name already exists in the database" or error -1074384742 "The interface has already been opened with different cluster settings than the ones specified for this session." occur.

 

I have, however, been able to sniff the line with CANcase and CANalyzer... on the 500k baud- I am getting a few errors such as form/delimiter and "tolerate dominant bit" errors.  My 667k baud is working fine (not sure if this baud has anything to do with XCP? still learning).

 

I hope this covers what you suggested.  I don't even know what I don't know, so it is somewhat difficult to troubleshoot this issue! 

 

One other thought, I am using a trial version of ECUM&C-- I assume this is a fully funcitoning version, but maybe it is limited?  I have a trial because I want to ensure I can do what I need before purchasing...

 

any more suggestions would be greatly appreciated! Thanks

Download All
0 Kudos
Message 3 of 5
(6,149 Views)
Solution
Accepted by topic author bmaki

OK! 

 

It is working.  I hate to admit, but I was on the wrong CAN port.  There are 3 on this ECU: powertrain, diagnostic, and sensor.

 

I did, however, add a 120 ohm resistor to this port, as the initial port had this termination, but the one I actually needed did not.  So thank you JefeL for reiterating; although it was not the solution, it helped to save time. 

 

 

0 Kudos
Message 4 of 5
(6,110 Views)

I'm glad to hear you are up and running. 

 

For future troubleshooting efforts: the XNET Bus Monitor does not have custom baud rates, however,  the CAN Frame Input Stream shipping example can be easily modified to use custom baud rates and act as a bus monitor.

Jeff L
National Instruments
0 Kudos
Message 5 of 5
(6,104 Views)