Export csv via Socket API: args

Hi,
I am calling saleae via Python and am using the export-data2() function to export a capture with all digital cahnnels. In Logic in the csv settings i can select “Output one column for every bit” but I can’t find any documentation how to set that when calling export_data2().
Is that possible?
Best regards

Sorry the documentation for the export data 2 function is basically non-existent.

The short answer is that you can replace the keyword “COMBINED” with the keyword “SEPARATE”, and that will produce 1 column for every bit.

When using SEPARATE instead of COMBINED, the display radix should be skipped, since it no longer applies. The export file will just have 0 or 1 in each column.

Our C# examples of the export command is the best source for exploring all options of the export data 2 command. You can see multiple examples of where one column per bit is used, including this one:

If you’re using the community python API, you can find the export_data2 function here:

Note, to support this, you need to provide the argument display_base='separate'. Their export2 function has a special case for this for digital csv exports.

Feel free to post your source code and we can help out.

One last thing. I recommend running the Logic software from the terminal, and make sure you’re using the last release of 1.x, 1.2.40. When the software returns a NAK, the terminal will print out some information as to why the command failed.

1 Like

Ok, thank you for that fast and helpful information and also the advice with the respnse when using the terminal!
It did exactly what I wanted :slight_smile:

We’ve just launched a preview of the new automation API for the Logic 2 software! You can find everything you need to get started here: Saleae Logic 2 Automation API

1 Like