I am using the Komodo CAN Duo Interface with the Komodo Software API. I am applying the function can_async_submit to submit a command asynchronously. I am using can_async_collect to see the data, but this function does not give me access to the collected DATA. My question - how can I access CAN data that was collected?
Response from Technical Support:Thank you for your question! There are additional commands to apply to access the data. We will describe those commands and provide guidelines about using API commands to improve performance and resolve issues that may occur.
Data can be accessed from the transmitter side as well as the receiver side of the CAN bus.
There are two commands to implement in the order shown:
There is one command to implement for the receiver side:
For more information, please refer to the API documentation section in the Komodo CAN Interface user manual and the API example scripts async, monitor, and loopback provided with the Komodo API package.
This section provides summaries of resolutions for known problems. Links to the original documents are included.
There are two ways to manage data captured by the Komodo CAN Interface: use the batch command with the Komodo GUI Software or create a script with Komodo Software API. For more information, refer to How Do I Send CAN Messages, Access and Store Data with a CAN Interface?
Overflow can be resolved by adding latency to the read function: allow more time for the read function to complete its process. Using km_latency splits the total amount of buffering to a group of smaller sub-buffers. This method does affect the speed of the overall process. For more information, refer to How Can I Resolve Buffer Overflow for Asynchronous CAN Messages.
The two virtual ports of the Komodo CAN interface can be synchronized by wrapping each Komodo API call with a thread-safe locking mechanism. For more information, refer to What are the Available Software API Examples for the Komodo CAN Duo Interface and How Can I Execute Commands on Different Threads?
Latency related to the USB Request Block (URB) for each CAN packet can be set to zero or to a specific duration. Latency from the operating system of the host computer is inherent. Should OS latency become an issue, timeout values can be applied with a Komodo API script. For more information, refer to How Can I Set a Timeout to Minimize OS Latency when Interfacing on the CAN Bus?
Bus speed can be accelerated by using asynchronous messages, as well as avoiding saturation (overflow) and optimizing bus speed. Asynchronous operations allow a CAN channel to receive messages asynchronously on the other channel. Overflow can be managed by reducing traffic between calls to the Komodo Software API. Traffic can be enhanced with polling and using the write command km_can_write, which acts as a wrapper for asynchronous functions. Bus speed can be enhanced in two ways: using shorter cables and software threading. For more information, refer to How Can I Increase CAN Bus Speed and Bandwidth Occupancy?
Case Study - Komodo CAN Duo Interface - AVADirect Custom Computers is a case study that features the Komodo CAN Interface and how it is used to help create a virtual reality forklift simulator for training with advanced equipment. This simulation accelerated real-time training of advanced physical equipment.
We hope this answers your question. Additional resources that you may find helpful include the following:
If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.