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.
- Capture data using the CAPTURE or CAPTURETOFILE commands.
- export the data using the EXPORTDATA2 or EXPORTANALYER commands.
- Load the exported data from disk separately into your application
- 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:
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:
Basic information about exporting the protocol analyzer results can be found in the user's guide here:
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:
For more information about the binary export format, please see these two articles:
For more information about the MATLAB export format, please see this article:
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