Hello,
we have a discrepancy in busload measurements: PCAN-USB X6 busload varies a lot between 40 and 80% while an external Trace Tool (non-PEAK) says steady 40%.
Bus ist 250 kBit/s
Messages are CAN 2.0 with extended identifiers
intervals between messages range from 0.5 to 5.5 milliseconds
Error Counters stay 0
Busload is read every 5 ms via CANAPI 4 on Windows System. Busload Records are disabled (the rate was too high, therefore it is polled).
What should I change to improve the measurement? In other words: How does the hardware determine the busload? And how and how often should I ask it for it?
Kind Regards
Martin
Busload discrepancies
Re: Busload discrepancies
Hello,
the PCAN FD hardware calculates the busload in an internal interval of (clock freq/prescaler)*8 and each 4095 intervalls a busload frame is generated. To get the best precision, you have to use each busload frame and build an average over all. If you only poll the busload, you may miss some busload frames, which could cause a differnt result. To check the result of your busload application, you could use PCAN-View and cross check the given results.
regards
Michael
the PCAN FD hardware calculates the busload in an internal interval of (clock freq/prescaler)*8 and each 4095 intervalls a busload frame is generated. To get the best precision, you have to use each busload frame and build an average over all. If you only poll the busload, you may miss some busload frames, which could cause a differnt result. To check the result of your busload application, you could use PCAN-View and cross check the given results.
regards
Michael
Re: Busload discrepancies
Hello,
thank you for the explanation. I initially used the busload frames (records) of the CANAPI 4, but it caused significant CPU load as we are utilizing all 6 interfaces of the PCAN-USB X6 at high bit rates. I observed processing of 6 x 2000 = 12000 busload records per second and did not want to sacrifice CPU power.
I will re-evaluate your proposed solution and in case of bad performance fall back to calculate the busload based on the number of received bits and an approximation of stuff-bits.
Kind Regards
Martin
thank you for the explanation. I initially used the busload frames (records) of the CANAPI 4, but it caused significant CPU load as we are utilizing all 6 interfaces of the PCAN-USB X6 at high bit rates. I observed processing of 6 x 2000 = 12000 busload records per second and did not want to sacrifice CPU power.
I will re-evaluate your proposed solution and in case of bad performance fall back to calculate the busload based on the number of received bits and an approximation of stuff-bits.
Kind Regards
Martin