09-06-2005 10:35 AM
I am currently developing a CVI (7.0) application to download some software to a module via a Series 2 CAN card (NI CAN Driver 2.2f) and have noticed the following.When running under the CVI debugger the CAN interface will sometimes respond with the error code -1074388991 receive timeout when I try to communicate with the module after the download process. In all cases the first of two CAN frames is received and the second is lost. If I start / open NI MAX and run the application, the error disappears. Increasing the timeout period does not cure the issue.Furthermore if I compile the release executable and run it, the execution time is ~6 Seconds faster if NI MAX is open. When NI MAX is closed the execution time reverts to the original (longer) time. (This appears to be repeatable.)The above error does not occur when running the release executable.Does anyone know why NI MAX appears to have this affect on the CAN Interface ?Aid
11-01-2005 03:54 PM
Hi Aid,
That sounds interesting. what else are you doing in your Application? Any other hardware calls?
DirkW
01-03-2006 12:42 PM
08-24-2017 06:33 AM
I'm also seeing speed differences.
When executing my CVI can appl when NI-max is opended it is faster.
Also when I open the CAN bus monitor it is faster.
NI-CAN15
NI-XNET16.1
CVI RTE2015 SP1
01-28-2021 07:03 AM
too bad we didn't get any info on the differnce in speed for CAN XNET execution related to opening/closing NI-Max.
This doesn't seem to be the case in WIN10. Now it is always slow.. even slower than before..
01-28-2021 07:28 AM
Hmm, maybe it could have something to do with the Windows timer resolution setting? It could be that other applications running in parallel (MAX, LV Runtime in case of XNET Bus Monitor) might increase this timer frequency.
You can find documentation on the web on this topic on how to monitor or even set this using external tools or code in your application.
01-28-2021 10:09 AM - edited 01-28-2021 10:19 AM
@kayfh, Setting the Windows Timer resolution to 0.5 in Win7 does not give me the same execution speed as when NI Max is opened.
Applying the same settings in Win10 increases execution speed, but still 1sec slower for sending 1000 bytes compared to Win7 with Max open. <damn..>
01-28-2021 10:32 AM - edited 01-28-2021 10:43 AM
Nice!
You could also try to change the power config if the system is not in High Performance mode.
I think with Win10 there were some changes to the Windows timers changing their performance characteristics (dynamic tick etc.).
I think there are some options you could try out using the bcdedit tool, but I don't know if they will make a difference here.
02-02-2021 08:52 AM
@kayfh, changing the settings with bcdedit made the Win10 pc 2x as fast as the Win7 pc before.
tscsyncpolicy Legacy
useplatformclock Yes
disabledynamictick No
We have our self-made XCP driver that is sending directly can-frames over XNET.
Sending 1000 frames (500kbs):
Win7 64bit = 2sec
Win10 64bit = 950ms
So, low-level it certainly is possible to tweak Win10 to behave fast.
(thanks for your help)
Unfortunatly, we also use the Ecu Meas and Calibration toolkit.
mcMeasurementWrite (1000 times)
Win7 64bit = 2sec
Win10 64bit = 4sec
So, there is something in the toolkit?