What's the meaning of PCAN_ERROR_QOVERRUN ?

CAN FD and LIN Interface for High-Speed USB 2.0
Post Reply
emmanuelvendesaft
Posts: 1
Joined: Tue 31. Jan 2017, 21:41

What's the meaning of PCAN_ERROR_QOVERRUN ?

Post by emmanuelvendesaft » Tue 31. Jan 2017, 22:14

Hi all
I'm currently spying a CAN network through USB PEAK PCAN-USB Pro FD interface. I developed a custom Python 3.x application that relies on the PCANBasic.dll library under Windows 10. I log all the CAN traffic that occurs on bus by polling (250 kbits/sec, 2 nodes). The bus is not heavy loaded.
In my log I keep the timestamp of each message as given by the API ie : 1) milliseconds, 2) "milliseconds overflow", and 3) microseconds.
- milliseconds overflow is always 0...
- most of the time I can log all messages. According to the timestamps given by the PCAN-USB Pro FD I can even log 2 messages separated only by ~230 microseconds.

BUT it happens sometimes that I get the PCAN_ERROR_QOVERRUN error. In API code it's commented as "Receive queue was read too late".

So I have the 2 following questions :

1. What is exactly the meaning of PCAN_ERROR_QOVERRUN ? Receive queue was read too late => OK, but by who? By the embedded FPGA into the PCAN-USB Pro FD device? By the Windows driver of the device (ie the dll, so by my app...)?
Cause I suppose I miss some messages, but I don't know if it comes from possible hardware limitation of PCAN-USB Pro FD device or from my app.

2. What exactly represent "milliseconds overflow" ?

Thanks in advance for your replies !

Emmanuel

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: What's the meaning of PCAN_ERROR_QOVERRUN ?

Post by M.Maidhof » Wed 1. Feb 2017, 11:44

Hi,

PCAN_ERROR_QOVERRUN means your application did not read the queue of the driver fast enough. Best solution will be to use the read event, to be as fast as possible. When you use a timer for the CAN_Read(), please always read several times, until CAN_Read() will return QRCVEMPTY back.

Milisoverflow will increase as soon as the 32bit value of millis will overflow! This will take some days :D

regards

Michael

Post Reply