I am using a Komodo CAN Duo Interface with the LabVIEW software and Komodo LabView Drivers (VI). I write a packet, and when I read the bus, the packet I am looking for has already been sent by the other node - I miss reading it. The loop works fine for two iterations before this fault occurs.
This behavior suggests a buffer is overloaded and needs to be cleared. How do I clear the buffer?
Thanks for the question! There is buffering within the Komodo DLL, on a per-device basis, which helps capture asynchronous messages. For example, in the case of the Komodo interface receiving CAN messages asynchronously:
- If the application calls the function to change the state of a GPIO while unprocessed asynchronous messages are pending, the Komodo interface will modify the GPIO pin but will also save any pending CAN messages internally.
- The messages are then held until the appropriate API function is called.
For more information please refer to section 3.8.1 of the Komodo Interface User Manual.

An overflow can occur when the Komodo device receives asynchronous messages faster than the rate that they are processed - the receive link is "saturated". This condition can affect other synchronous communication with the Komodo interface.
Solutions to clear a saturated receiving buffer: There are two methods to address a saturated buffer.- One option is to reduce the amount of traffic that is sent by all CAN nodes between calls to the Komodo API. This requires the ability to reconfigure the offending CAN device(s).
- The other option is to poll the CAN channel to collect pending messages more frequently. For more information, please refer to section 3.8.2 of the Komodo Interface User Manual.
To decrease the possibility of buffer saturation, the following steps can be taken:
- Ensure the CAN bus is properly terminated; otherwise the Komodo is saturated with CAN errors.
- Use only one port on the Komodo device.
- Use only one CAN channel on the Komodo device.
- Use a lower CAN bitrate.
For more information about CAN API functions, please refer to section 5.6.1 of the Komodo Interface User Manual.
For additional information, please refer to the following:
We hope this answers your question. If you have other questions about our host adapters or other Total Phase products, feel free to email us at sales@totalphase.com or submit a request for technical support.