[Automation API] Data exported from analyzer is incorrect format

Hi,
So I’m using getting started example in Getting Started — Saleae 1.0.6 documentation.
I set up my SPI analyzer and I’m seeing decoded data in user interface time graph as well as data table on the right as hex:


But once I export the data as in example

    # Export analyzer data to a CSV file
    analyzer_export_filepath = os.path.join(output_dir, 'spi_export.csv')
    capture.export_data_table(
        filepath=analyzer_export_filepath,
        analyzers=[spi_analyzer]
    )

I’m noticing that miso/mosi data is no longer hex but I think bytes (but csv only support strings)?
image
If I’m exporting the same analyzer using “Export Table” option in user interface I’m seeing the same table but miso/mosi signals are now formatted correctly as hex.
image

My questions are:

  1. Can I use automation tool and export analyzer output to hex or any other easily readable format and get similar result as using user interface?
  2. Is there a way to read miso/mosi (byte?) information from csv file using Python? I tried but was not able to

@baltaspopieriauslapa Sorry for the trouble with that! For the analyzers parameters, you can pass a DataTableExportConfiguration object which has a radix setting inside of it. It looks like it’s being exported as ASCII by default.

You can take a look at the example in the link below for specifyng HEXADECIMAL as the radix type.

I hope that helps!

1 Like

Hello timreyes,
Thank you so much, it works!

1 Like