Tuesday, July 29, 2014

Rigol DS1052D and Open Logic Sniffer

This blog has been moved: http://scholtyssek.org/blog/2014/07/29/rigol-ds1052d-and-open-logic-sniffer/

Today I have tested the logic analyzer of the Rigol DS1052D oscilloscope and I noticed that the LA does not interprete the measured signals. The Rigol DS1052D is a lower priced model, so it is ok that the data is not interpreted by the oscilloscope. But it is possible to export the signals and process them on a PC with the open source tool Open Logic Sniffer. To do so you can export them as a CSV datafile. After an easy converting the data can be read by OLS. The following step describe what you have to do.

1. Save and export the samples

With the "RUN/STOP" button it is possible to freeze the current measurement. Then the samples can be saved on a USB device. For this, you can push the "Storage" button and select the menu entry "External". This entry will only be enabled if a USB device is connected. Now you should select the CSV format and enter a filename (e.g. "samples.csv"). After that you can save the file.

2. convert data

The CSV file can be converted with a simple command:

cat samples.csv | cut -d , -f 2,3 -s | nawk '{print $0"@"FNR}' | 
tr -d '\r' tr -d ',' sed -e "s/ 0 /00/" > samples.ols

This command creates a new file "samples.ols", which has to be converted. For this, you should open the file and remove the first two lines. Afterwards, you should add the parameter Rate and Channels as first two lines. Rate is the bandwidth of the oscilloscope (here 50MHz) and Channels defines the count of used channels (1-16). The file should now look like this:

;Rate: 50000000
;Channels: 2

3. Import data in OLS

Now the file "samples.ols" can be imported in Open Logic Sniffer. Open the file with the menu entry "File -> Open". If everything was correct you should see you data: 

No comments:

Post a Comment