python QOVERRUN
Posted: Tue 14. May 2024, 14:57
Hi,
I'm trying to develop a CAN monitoring application in python.
I tried using the provided classes but I have the problem that if the bus is loaded after a while the device goes in read overrun error.
I checked online and I found that python is not very well suited to manage thread priorities.
I tried to manage the problem building a dll in c based on PCANBasic dll: in my dll I create the thread that frees the PCAN device internal queue and copies the data in a larger queue.
Even this solution goes in overrun. I built the c dll as a standalone exe and it runs fine without any problem.
I checked online and as far as I understood launching the dll from python affects the priority and execution of the thread I create so it doens't work.
Do you have any suggestion?
thanks
Michele
I'm trying to develop a CAN monitoring application in python.
I tried using the provided classes but I have the problem that if the bus is loaded after a while the device goes in read overrun error.
I checked online and I found that python is not very well suited to manage thread priorities.
I tried to manage the problem building a dll in c based on PCANBasic dll: in my dll I create the thread that frees the PCAN device internal queue and copies the data in a larger queue.
Even this solution goes in overrun. I built the c dll as a standalone exe and it runs fine without any problem.
I checked online and as far as I understood launching the dll from python affects the priority and execution of the thread I create so it doens't work.
Do you have any suggestion?
thanks
Michele