01-23-2020 12:44 AM - edited 01-23-2020 12:47 AM
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.
01-23-2020 07:42 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-23-2020 08:24 AM
My observation is that
nxWriteFrame() function (NI-XNET)
is taking more time compared to
ncWrite() of (NI-CAN).
01-23-2020 09:16 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-23-2020 11:14 PM
It is not using compatibility layer.
We developed the code in Visual C++.
01-24-2020 05:59 AM
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
01-24-2020 10:25 AM
Sorry I can't help any further, hopefully someone from NI can give some other suggestions.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord