Sign in

How can I extract recorded data using the Socket API.

Follow

The Saleae Logic software's scripting API was designed to allow developers to automate different operations in the Logic software.

Unfortunately, it does not provide a nice interface for reading and manipulating captured data out of the box.

To develop an application where you wish to automatically capture data, and then access it from your custom application, the following process has to be used.

  1. Capture data using the CAPTURE or CAPTURETOFILE commands.
  2. export the data using the EXPORTDATA2 or EXPORTANALYER commands.
  3. Load the exported data from disk separately into your application
  4. Parse the data into a useable format.

In the case of exporting analyzer results (such as I2C packets, serial data, etc) step 3 can be skipped, using an optional parameter which will stream the contents of the file over the socket as part of the response. However, the file still needs to be saved to disk, and the response still needs to be parsed, since it is still in a text format.

More information about the socket API can be found here:

http://support.saleae.com/hc/en-us/articles/210245643-Socket-API

The first two steps listed above can easily be accomplished by using the sample code provided by the socket API.

The Saleae software contains a number of different export options. A basic overview of export can be found in the user's manual here:

http://support.saleae.com/hc/en-us/articles/210244533-Saving-Loading-and-Exporting-Data

Basic information about exporting the protocol analyzer results can be found in the user's guide here:

http://support.saleae.com/hc/en-us/articles/208666806-Using-Protocol-Analyzers

For more information about the export format of protocol analyzers, which are protocol-specific, and have no options, please take a look at this article:

http://support.saleae.com/hc/en-us/articles/115001880066-File-Format-Description-for-Exporting-Protocol-Analyzer-Results

For more information about the binary export format, please see these two articles:

http://support.saleae.com/hc/en-us/articles/208667306-Binary-data-export-format-description http://support.saleae.com/hc/en-us/articles/208667606-Data-Export-Format-Analog-Binary

For more information about the MATLAB export format, please see this article:

http://support.saleae.com/hc/en-us/articles/210244923-MATLAB-data-export-format-description

The CSV export option, although it has the most settings, is usually the simplest export format to use, since the results can easily be viewed in Excel.

The software has one other raw data export format for digital captures, VCD (Value Change Dump). Wikipedia and several other sites have good descriptions of this format.

Once you have selected an export format, you will need to learn how that format works, and then write code to load the newly saved export file, and parse out the information you need.

We are happy to provide support for this if you run into any trouble parsing the export formats. Just contact support if you have any questions.


trello ID: 5910ff86c5f3149fd10de910
Have more questions? Submit a request

Comments

Powered by Zendesk