Page 1 of 1

PCANBasic .NET Assembly

Posted: Fri 8. Jan 2021, 20:47
by dcorley@prattmiller.com
I have integrated the new assembly into my application (.Net Core), however I still get TPCANStatus.PCAN_ERROR_QXMTFULL errors when sending data via PCANBasic.Write(). I can start a continuous send routine which will run for about 4 minutes and then I get this error.

If I re-initialize (un-initialize and initialize) the adapter this error is cleared and I can transmit again for a few minutes. (sending 4 standard CAN messages LC 8 bytes at 20 msec cyclic.)

This only occurs when I do NOT have hardware connected to the CAN bus. I am using the Peak USB CAN adapter. I have the adapter installed on my development PC, nothing attached and running PCAN-View along with my application in debug mode.

Any idea why I get this error?

Thanks
D.Corley

Re: PCANBasic .NET Assembly

Posted: Sat 9. Jan 2021, 18:18
by PEAK-Support
Keep in mind that you write always first into the driver queue - and after the size of the sending queue is full and if the Hardware could not send the CAN Frames on the real CAN Bus you have a problem.
Looks like you run your Application with a Hardware in a non working (ACK) CAN Bus - this is not possible.
The Hardware need always a ACK when sending a CAN Frame. Oherwise the first Frame will be send again and again ... all other Frame in the queue will NEVER send! - and after a while the queue is full - see your Error!
If you want to develop a CAN API based Application try to use a real environment - you simple need a 2nd CAN node that is active, use the same Bitrate and could ACK.
For example a second PC CAN Channel, a litle IO CAN Module etc.

Re: PCANBasic .NET Assembly

Posted: Mon 11. Jan 2021, 15:44
by dcorley@prattmiller.com
Thank you for the quick response, your answer was correct, not sure why I thought I could run without a receiving node, works fine when I have another node plugged into the bus.

Thanks!

Re: PCANBasic .NET Assembly

Posted: Mon 11. Jan 2021, 15:47
by PEAK-Support
solved and closed