Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

ndOpenDiagnostic take long time to execute

Hello everybody,

 

I'm facing a problem with Automotive Diagnostic Command Set (again).
calling ndOpenDiagnostic take a very loooong time (more than 8 secondes) with
the configuration below.

 

Same Base hardware AEEON BOXER
Intel Core 2 T500 1.66GHz
2 Go Ram
Windows XP SP3

 

First test:

 

SoftWare:
LabWindows/CVI  9.1.0
NI Automotive Diagnostic Command Set 1.0.3
LabView Run-Time 8.2.1
LabView Run-Time 8.5.1
LabView Run-Time 9.0
NI-CAN 2.7
NI-XNET 1.0

 

HardWare:
NI PCI 8512/2

 

12:12:46.187 : ==================================================================
12:12:46.265 : program start ...
12:12:46.343 : Initialisation sequence, please wait ...
12:12:46.390 : Start init OPC Link
12:12:46.531 : End init OPC Link
12:12:46.593 : Start init diagnostic interface...
12:12:55.125 : End init diagnostic interface...
12:12:55.203 : Start init CAN interface
12:12:55.437 : starting vehicule signal thread ...
12:12:55.515 : End init CAN interface
12:12:55.546 : starting CycleThread ...
12:12:55.593 : Initialisation completed.
12:12:55.656 : ==================================================================

 

Diag_Init() : 8.532 secondes

 

With this other configuration, ndOpenDiagnostic  take under one secondes

 

Seconde test:

 

SoftWare:
LabWindows/CVI  9.1.0
NI Automotive Diagnostic Command Set 1.0.0
LabView Run-Time 8.0
LabView Run-Time 8.2
LabView Run-Time 8.5
LabView Run-Time 9.0
Labview Run-Time 10.0
NI-CAN 2.6

 

HardWare:
NI PCI CAN-HS Serie 2

 

13:49:22.734 : ==================================================================
13:49:22.734 : program start ...
13:49:22.734 : Initialisation sequence, please wait ...
13:49:22.734 : Start init OPC Link
13:49:22.828 : End init OPC Link
13:49:22.828 : Start init diagnostic interface...
13:49:23.562 : End init diagnostic interface...
13:49:23.562 : Start init CAN interface
13:49:24.359 : starting vehicule signal thread ...
13:49:24.359 : End init CAN interface
13:49:24.359 : starting CycleThread ...
13:49:24.359 : Initialisation completed.
13:49:24.359 : ==================================================================

 

Diag_Init() : 0.734 secondes

Any idea why higher software version give such  bad results ?

 

0 Kudos
Message 1 of 14
(7,762 Views)

Can you run this with NI-Spy. Preferably with NI-Spy directly logging to a .spy file.

(It newer versions it is call NI-IOTrace).

 

I highly recommend you upgrade to NI-XNET 1.4 instead of 1.0. I don't know of any major changes between the versions that could change that timing, but 1.0 is a really old release.

0 Kudos
Message 2 of 14
(7,758 Views)

Thank you for your answer , but it look like most of the time is waist before the first call to CAN interface

 

16:01:32.949 : ==================================================================
16:01:32.949 : program start ...
16:01:32.950 : Initialisation sequence, please wait ...
16:01:32.950 : Start init OPC Link
16:01:33.042 : End init OPC Link
16:01:33.042 : Start init diagnostic interface...
16:01:42.479 : End init diagnostic interface...
16:01:42.479 : Start init CAN interface
16:01:43.405 : starting vehicule signal thread ...
16:01:43.406 : End init CAN interface
16:01:43.406 : starting CycleThread ...
16:01:43.407 : Initialisation completed.
16:01:43.407 : ==================================================================

 

1.  ncConfig ("CAN1", 11, {0x80000007,0x80000006,...}, {0x0007A120,0x00000001,...})
ID de processus : 0x00001330         ID de thread : 0x000003A4
Temps de début : 16:01:42.403       Durée de l'appel 00:00:00.055
État : 0 (VI_SUCCESS)

2.  ncOpenObject ("CAN1", 17)
ID de processus : 0x00001330         ID de thread : 0x000003A4
Temps de début : 16:01:42.458       Durée de l'appel 00:00:00.009
État : 0 (VI_SUCCESS)

3.  ncReadMult (17, 2200, 0x0E5EF6C8, 0)
ID de processus : 0x00001330         ID de thread : 0x00001BA8
Temps de début : 16:01:42.469       Durée de l'appel 00:00:00.001
État : 0 (VI_SUCCESS)

4.  ncReadMult (17, 2200, 0x0E5EF6C8, 0)
ID de processus : 0x00001330         ID de thread : 0x00001BA8
Temps de début : 16:01:42.472       Durée de l'appel 00:00:00.000
État : 0 (VI_SUCCESS)

5.  ncReadMult (17, 2200, 0x0E5EF6C8, 0)
ID de processus : 0x00001330         ID de thread : 0x00001BA8
Temps de début : 16:01:42.474       Durée de l'appel 00:00:00.000
État : 0 (VI_SUCCESS)

6.  ncReadMult (17, 2200, 0x0E5EF6C8, 0)
ID de processus : 0x00001330         ID de thread : 0x00001BA8
Temps de début : 16:01:42.476       Durée de l'appel 00:00:00.000
État : 0 (VI_SUCCESS)

7.  ncReadMult (17, 2200, 0x0E5EF6C8, 0)
ID de processus : 0x00001330         ID de thread : 0x00001BA8
Temps de début : 16:01:42.478       Durée de l'appel 00:00:00.000
État : 0 (VI_SUCCESS)

8.  ncReset ("CAN0", 0)
ID de processus : 0x00001330         ID de thread : 0x000003A4
Temps de début : 16:01:42.479       Durée de l'appel 00:00:00.099
État : 0 (VI_SUCCESS)

 

0 Kudos
Message 3 of 14
(7,756 Views)

Back again,

 

I've installed NI-XNET 1.4 and run my program again.

No change about timing, still 10 secondes lost at diagnostic initialisation.

 

Attached log file and NI I/O trace file.

 

Any Idea ?

Download All
0 Kudos
Message 4 of 14
(7,740 Views)

I wanted ti try adcs 1.0 with Xnet 1.4 ( NI-CAN 2.7.3) but it wont work.

 

So my conclusion is :

 

NI-CAN 2.6 + ADCS 1.0 : ndOpenDiagnostic  0.7 secondes

NI-XNET 1.4 (NI-CAN 2.7.3) + ADCS 1.0.3 : ndOpenDiagnostic 10 secondes.

 

Any explainations ?

 

I've used sysinternal process monitor, and i've seen that there is Process Profiling event during 10 secondes.

 

here under my log file :

 

16:37:48.222 : Initialisation sequence, please wait ...
16:37:48.224 : Start init OPC Link
16:37:48.452 : End init OPC Link
16:37:48.452 : Start init diagnostic interface...
16:38:00.566 : End init diagnostic interface...
16:38:00.566 : Start init CAN interface
16:38:01.439 : Opening IS_Dyn_CMM_208_Tx (object handle : 18)
16:38:01.446 : Opening IS_Dyn_ABR_38D_Tx (object handle : 19)
16:38:01.454 : Opening IS_Dyn2_CMM_348_Tx (object handle : 20)

 

Init diag start at 16:37:48,452 and in the attached screen shot , profiling event begin at 16:37:49,815 and end at 16:38:00,259 just before returning

from init diag at 16:38:00,566.

 

Strange ? isn't it ?

 

 

0 Kudos
Message 5 of 14
(7,732 Views)

in your Spy/IO Trace log I see in line (8) this output:

8.  ncReset ("CAN0", 0)

 

the Diag Init seems to occur on CAN1, the ncReset on CAN0

as far as I know ADCS does not use any ncReset call at all.

I there a chance that you do this call on your own?

 

If so

1. why do you use that call at all, this call is?

2. I think ncReset is not supported on NIXNET hardware over the Compatibilty layer

3. you should use the interface name syntax for XNET in the DiagInit call when using a XNET device. Should name like this: CAN1@ni_genie_nixnet

this would direct the command set to use native XNET calls instead of NI-CAN via XCL (XNET Compatibilty Layer) internaly.

 

refer to the manual for further information:

NI-XNET
By default, the Automotive Diagnostic Command Set uses NI-CAN for
CAN communication. This means you must define an NI-CAN interface
for your NI-XNET hardware (NI-CAN compatibility mode) to use your
XNET hardware for CAN communication. However, to use your NI-XNET
interface in the native NI-XNET mode (meaning it does not use the
NI-XNET Compatibility Layer), you must define your interface
under NI-XNET Devices in MAX and pass the NI-XNET interface
name that the Automotive Diagnostic Command Set will use. To do
this, add @ni_genie_nixnet to the protocol string (for example,
CAN1@ni_genie_nixnet). The interface name is related to the NI-XNET
hardware naming under Devices and Interfaces in MAX.

 

Let me know if that helps

0 Kudos
Message 6 of 14
(7,565 Views)

Dear Gibson,

 

Thank you for your support.

 

In fact 'm using CAN1 interface for diagnostic com with ECU and CAN0 to send vehicule signals and ccp com.

 

I've try CAN2@ni_genie_nixnet  instead of CAN1 ( NI-CAN:CAN0 --> X-NET:CAN1,  NI-CAN:CAN1 --> X-NET:CAN2) but no change

in ndOpenDiagnostic execution time (at least 10 secondes ).

 

still under investigation ...

 

Regards

 

0 Kudos
Message 7 of 14
(7,557 Views)

what about the ncReset? do you still need that? what else are you doing in parallel?

0 Kudos
Message 8 of 14
(7,555 Views)

I've removed ncReset, but i don't think it is linked to my problem.

 

As you an see in the attached files in my first post, the call to ndOpenDiagnostic is (indirectly) one of the first instruction in my main function.

 

At this time there is no other threads running, and the execution time of ndOpenDiagnostic is the only issue withe adcs, after init all work fine.

 

I'm not sure that the problem is linked with ni-xnet, but with adcs 1.0.3 vs adcs 1.0.0 ( v1.0.0 rely on labview runtime 8.0 and v1.0.3 on greater version

of labview runtime).

 

I will try NI-CAN 2.6.3 with adcs 1.0.0 and adcs v1.0.3.

 

Regards

0 Kudos
Message 9 of 14
(7,543 Views)

you may send your application to our PSE ? canpse@ni.com

so that we can debug that on our side, if this is possible without the real test hardware

 

 

0 Kudos
Message 10 of 14
(7,540 Views)