Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write Measurements and Characteristics with 16 ECUs with ECU Toolkit - errors and speed

Hello all,

 

I would like to ask you for help with „ECU Toolkit“ and NI PXI 8461/2 card.

 

I use NI PXI chassis with NI PXI 8461 Series 2 card with 2 CAN ports, ECU Toolkit ver. 2.3.1. I have 16 ECUs (8 on one CAN bus, on one CAN port), each ECU on the bus has unique station address (xAD01 - xAD08). The simple block diagram is below.

Read/Write ECU 

Similar setup was used by my colleagues in many testbenches before, so there was no need to change it. But now I want to upgrade it and solve few problems:

1)     Communication is slow (for example for ten ECU’s variables it takes 180ms-250ms for one ECU). If I want to check all ECUs in one time, it takes nearly four seconds.

2)     After few minutes the communication fails with Error 1097 (An exception occurred within the external code called by a Call Library Function Node). This is new for me, this have never been on other testbenches. But this only happens with all 16 ECUs, not with 8 ECUs.

 

For better image of the testbench – it runs in sequences when ignition is periodically turned on and off, so communication is also periodically “lost and find”.

 

Is my example suitable or could it be upgrade it in some way to speed it up?

 

Thanks.

0 Kudos
Message 1 of 4
(6,696 Views)

I don't use or have the ECU Toolkit and I'm not particularly familiar with CCP, but do work with CAN and UDS, so... maybe this will help:

 

It looks like on each iteration of your for loop, you're opening a reference to your CAN hardware, configuring it, getting a some kind of reading(s) back from the current ECU and then closing that reference.  

 

1) a) It _may_ be faster if you move the open and close references outside of the while loop.  I'm not sure if this is feasible with the toolkit.  You might have to re-open the interface on a power cycle.  Wire up the error terminals, and at the end of each iteration, if there is an error, reinitialize (find the specific error this causes and test for it... not just any error). b) (Obvious) Buy more CAN interfaces so you can run more in parallel.  c) Profile the code to find which VIs are taking the longest time to execute, try to reduce calls to those VIs.

 

2)   Error 1097 is a problem with calling an external DLL (this is obviously happening inside the ECU Toolkit VIs).  There are two causes that come to mind: a) VI needs to pass a buffer of appropriate size to the DLL, and the buffer is not big enough causing an exception (I'm guessing its not this, because it doesn't look like any of those VIs need to write to a string or array buffer) or b) the DLL is not threadsafe.  You can test the second idea... does it happen with 2 ECU's, one connected to each channel?

0 Kudos
Message 2 of 4
(6,683 Views)

Thanks.

 

1) Open and close references moved and it helps. It is maybe 2x faster.

2) Error was probably caused by fast periodical calling dll - this was solved with the first problem. The application ran 30min without problems.

 

Thank you for your help.

 

Petr Bláha

Robert Bosch s r. o.

CZ

0 Kudos
Message 3 of 4
(6,658 Views)

Hello again,

 

I would like to report another problem with reading from ECUs. I turn on all 8 ECUs on one bus, every ECU has different station address. On the beginning I establish connection with MC ECU Select.vi and then follows For Loop (8 cycles) with MC Set Property.vi (setting the station address) and other VIs (Read, Write, ...). In every frame of For Loop is set different station address. MC ECU Deselect.vi follows after finishing For Loop. In my opinion it is correct.

 

When I start the application, there are mistakes in acquired data. It looks like there are "crosstalks" between ECUs. But this is not possible, because every ECU has different station address and I communicate only with one ECU in one time. You can look at recorded data from one ECU. The first line is OK and then the fourth line is not correct. These values are on other ECUs.

 

Can anybody give me a hint?

 

 

1.4.2014 12:36:12 4 15 5058 26,5 0 0 0 0
1.4.2014 12:36:12 4 15 5048 26,6 0 0 0 0
1.4.2014 12:36:13 4 15 5042 26,6 0 0 0 0
1.4.2014 12:36:14 6 11 0 0 232 239 224 0
1.4.2014 12:36:15 4 15 5027 26,6 0 0 0 0
1.4.2014 12:36:15 4 15 5027 26,6 0 0 0 0
1.4.2014 12:36:16 6 11 0 0 232 239 224 0
1.4.2014 12:36:17 4 15 5022 26,5 0 0 0 0
1.4.2014 12:36:18 4 15 5012 26,6 0 0 0 0
1.4.2014 12:36:18 4 15 5015 26,6 0 0 0 0
1.4.2014 12:36:19 4 15 5013 26,6 0 0 0 0
1.4.2014 12:36:20 6 11 0 0 232 239 224 0
1.4.2014 12:36:21 4 15 5010 26,6 0 0 0 0
1.4.2014 12:36:21 4 15 5006 26,6 0 0 0 0
1.4.2014 12:36:22 6 11 0 0 232 239 224 0
1.4.2014 12:36:23 4 15 5006 26,6 0 0 0 0
1.4.2014 12:36:24 6 11 0 0 232 239 224 0
0 Kudos
Message 4 of 4
(6,523 Views)