Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-XNET takes more time (>5min) to load ROM compared to NI-CAN (30 seconds)

We had a test setup that was using NI-CAN card to program ROM on a system (controller). It used to take around 30 seconds.

 

Recently, we replaced the NI-CAN with NI-XNET card and updated our software with NI-XNET API functions.

 

Now, with NI-XNET, it is taking more than 5 minutes to program ROM.

 

We are not able to figure out on why XNET is taking more time to program ROM.

0 Kudos
Message 1 of 7
(3,599 Views)

We need to have more information.  If I tell my mechanic that my new car is slower than my old one and ask why, all they can do is guess at all the things that would effect performance.

 

Is this flashing over ISO15765?  XCP/CCP?  Is it using any toolkits?  What does the code doing the flashing look like?  I flashed over ISO15765 and after optimizations it is faster than vFlash so the hardware itself isn't the issue but likely the API that uses the hardware.

 

Also you can take a CAN trace with an independent logger and look at the time differences, and see what is taking longer.

0 Kudos
Message 2 of 7
(3,469 Views)

My observation is that

nxWriteFrame() function (NI-XNET)

is taking more time compared to

ncWrite() of (NI-CAN).

0 Kudos
Message 3 of 7
(3,462 Views)

Is this using the compatibility layer software to use XNet hardware with the NI-CAN API?  If so that is likely part of the problem.  NI added the compatibility layer software, but it is just another layer of stuff getting between you and your hardware.  My recommendation is to use as few layers as possible to get the best performance.  This means re-writing large parts of the software, and I can understand why you might not want to do this.

 

You referenced the API commands so I'm guessing this isn't LabVIEW.  Again seeing some code and how it is structured can help understand what is happening.  But as I stated using the XNet API in LabVIEW with XNet hardware has always given me great performance.

0 Kudos
Message 4 of 7
(3,455 Views)

It is not using compatibility layer.

 

We developed the code in Visual C++.

0 Kudos
Message 5 of 7
(3,392 Views)

To be specific,

nxWriteFrame() function is taking 50ms

ncWrite() function is taking 5ms

 

Also, I used below modes while creating the nxCreateSession

// Parameter Mode of function nxCreateSession

#define nxMode_FrameOutQueued 10 // FrameOutQueued

#define nxMode_FrameOutSinglePoint 11 // FrameOutSinglePoint

0 Kudos
Message 6 of 7
(3,315 Views)

Sorry I can't help any further, hopefully someone from NI can give some other suggestions.

0 Kudos
Message 7 of 7
(3,300 Views)