Flush transmit queue

I am troubleshooting a new setup programmed with Labview, and even with no obvious errors the system after a minute or so will report “Transmit Queue Full”. This then locks up the labview program almost every time, and periodically crashes my PC. I have tried slowing the transmission down immensely (2 seconds between messages), and the fault just takes longer to occur. Is there a command or set of commands to just flush the transmit buffer, so that I will not have to deal with these crashes while I troubleshoot the communications?

Hi Charles,

I am looking into options to clearing the queue. Looking at the documentation I am not immediately seeing and option.

Do you know how busy the can bus is? I am suspecting this is happening due to how busy the CAN bus is preventing the driver/CAN device from ever sending a message onto the BUS. You might be able to increase the bus speed to allow for more messages.


To the human eye, it is pretty busy. But there are only 4 devices. Two actuators broadcasting status every 100mS. A ‘heartbeat’ every 5mS. Miscellaneous messages every few mS from the other 2 devices. All on top of each other, it works out to 1 or 2 messages each mS for stretches; with 10 - 20 mS between messages in between those stretches. The bus speed is 250 kBPS.

Additional information:
Two of the devices use ‘extended frames’ and speak J1939. I am able to command those without issue. The other two use CANopen, and messages sent to them go nowhere and eventually cause my problem.

Using the ‘post message’ command instead of ‘send message’ eliminates the crashing. That function will just set a flag when the buffer is full, instead of crashing the system. Also, I figured out why the messages were not going anywhere: since I have both J1939 Extended frames and CANopen Standard frames I need to be sure my program checks and unchecks that flag in the messages I am sending.

There would still be a use to be able to flush the buffer, but at this time it is no longer holding me up.

  1. The “Transmit Queue Full” can occur
    if the application try to send more CAN messages
    as the CAN controller can send to the CAN bus.

  2. The bus speed is 250kBd

    The 250kBd can have about 2500 msg/sec (with DLC=8).

  3. Two actuators broadcasting status every 100mS: + 20msg/sec.
    A “heartbeat” every 5mS: + 200msg/sec.
    1 or 2 messages each mS (1000 or 2000): +2000msg/sec.

    The 2220 Msg/Sec is almost 88% CAN bus load using 250kBd.

  4. Usually we recommend maximum 40% CAN bus load
    using for the industrial application.
    I would recommend to reduce the CAN bus load.

  5. PS: Unfortunately there are no functions for the empting the TxQueue.
    The messages should be transmitted or
    the application should close the CAN channel and CAN controll unit and
    create a new CAN channel and new CAN control unit.