How Do I Send CAN Messages, Access and Store Data with a CAN Interface?

Question from the Customer:

I am using your Komodo CAN Duo Interface and I see there is a batch script window in the Komodo GUI Software. Is there a way I can use Komodo Software API in that window to send CAN messages, as well as capture and then store data in a file? If so, do you have any API python code examples that I could use?

Response from Technical Support:

Thanks for your questions! The Komodo CAN Solo Interface and the Komodo CAN Duo Interface, used with the Komodo GUI in batch mode, allow you to send messages to the target device; however, this application does not support capturing data. To capture and then store data, you can use the Total Phase Data Center Software. For more information, please refer to section 3.4 of the Komodo GUI User Manual and section 4 of the Data Center Software User Manual.

Note - the Komodo Duo Interface can simultaneously transmit messages and capture data; transmitting messages and capturing data must be done separately with the Komodo Solo Interface.

The Komodo CAN Duo Interface can simultaneously transmit messages and capture data Figure 1: Komodo CAN Duo Interface

The Komodo GUI batch script window is separate from the Komodo Software API. Komodo API python examples can be executed from the command line; they cannot be executed from the Komodo GUI batch mode window.

The Komodo Software API is used to control the Komodo interface and allows you to write custom programs to your specifications. API supports multiple operating systems (Windows, Linux, and Mac) and multiple languages (C, Python, Net, and C#). The following code examples are provided with the API:

  • detect: Detect Komodo devices attached to the system.
  • async: Uses the asynchronous interface to send packets on CAN channel A.
  • gpio: Performs simple GPIO operations with a Komodo interface, including monitoring the pins for voltage changes.
  • loopback: Demonstrates how to open ports, acquire features, write and read data. This example requires CAN channels A and B to be connected together with a properly-terminated cable. (This example only applies to CAN Duo interfaces.)
  • monitor: Monitors CAN bus and GPIO activity. This program prints out timestamps, status messages, errors messages, and data.
  • request: Requests data from specified CAN ID and prints the received data.

Note - the Python API allows you to modify the examples for your system requirements. The examples do not currently include a program that takes data from the received CAN messages and then store that data in a file. For additional information about API, please refer to section 5 of the Komodo CAN Interface User Manual.

More information is available in the following resources:

We hope this answers your questions. If you have other questions about our CAN interfaces or other Total Phase products, feel free to email us at sales@totalphase.com, or if you already own one of our devices and have a technical question, please submit a request for technical support.

Leave a Reply