I need to deploy long-term logging of CAN messages with the Komodo CAN Duo Interface. Also, I need to make sure that the messages are not lost if something happens, such as the computer losing power or performing an automatic Windows update.
Is it possible to set up the Komodo CAN interface and the Data Center Software to continuously save the logged CAN messages?
I am aware that I can log the messages into the software buffer of the Komodo CAN interface and then manually save them. However, for long-term data collection, I need a more robust method that does not require my personal attention.
Response from Technical Support:Thanks for your question! We have an effective recommendation for you. It requires two more tools that are readily available: a remote console and a script.
With the remote console, you can use a telnet terminal for other applications or computers to connect to and control the software. The following options are available when running the Data Center Software from the command line:
-b FILE run the given file in batch mode -c create a command line interface -m minimized start in a minimized state -r PORT create a remote console on the given TCP port
Here is an article that could be useful for you: Data Center Software Series: Using the Command Line. It provides a good introduction to using the Command Line feature.
To make it even better, you can automate your task with a script.
You can use a script to automate your task; an example is provided below. What the script performs automatically:
Here is the example in Python:
import timeimport telnetlib
# Connect to the remote telnet port of Data Center. This requires
# Data Center to be started with the "-r 6000" command line
# argument.
tn = telnetlib.Telnet('localhost', 6000)
def send (cmd, ret, timeout=10):
# Send the command
tn.write("%s\n" % cmd)
# Wait for the return value
tn.read_until(ret, timeout)
# Additional delay - prevents strange behavior
time.sleep(1)
SAVE = "save(u'/tmp/output%d.tdc', {'no_timing': False, 'filtered_only': False}, True)"
index = 0
while 1:
send('run', 'started')
time.sleep(3)
send('stop', 'stopped')
send(SAVE % index, 'saved')
send('clear_all(True)', 'cleared')
index += 1
Just in case your data reveals a problem, this video illustrates working with real-time CAN data: Analyze and Capture CAN Traffic Using the Komodo CAN Interface.
We hope this answers your questions. 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.