Dear colleagues,
I've been fiddling with an analog signal processing recently and I needed to import data from DS1074z scope to LTSpice (or similar application) and play with them then.
There are some apps or python scripts but mainly for the older 1052 series and none of them satisfied my needs. Thus I created my own minimalistic (~6 kB) utility in pure C.
Warning: The source code may cause nausea or seizure..
Please take into account that I am not a SW or FW developer. I just use C for my hobby embedded projects.
Description: The utility takes CSV data from Rigol DS1000z series scope, recognizes a header and creates a *.txt file with PWL data for every available channel. It has been tested in Windows 7 and 8.1 x64. The utility also handles even very large CSV files. Conversion of 20 MB CSV takes couple seconds.
License: Code is available for everyone under "I don't care" license. I would be glad if someone considered the utility as useful.
Usage: Simplest way is to copy rigol.exe to the same folder as your CSV data, open a cmd line and execute "rigol.exe mydata.csv". The utility then creates ch1_out.txt, ch2_out.txt etc. Then you can import a text file to LTspice :
http://www.linear.com/solutions/1814You can use "-kt" parameter which sets time "0" to the trigger point.
Modifications: I believe that the code is simple and easy to understand for everyone who is familiar with ANSI C. For modifications you just need a notepad and TCC (Tiny C Compiler) from:
http://bellard.org/tcc/ . You don't need any special tools or libraries. Everything is included in that 400 kB archive and without any installation...
To get started, just put "rigol.c" into TCC folder, open a cmd line and put there "tcc.exe rigol.c". Then you find rigol.exe in the same folder.
Known bugs: (this list will probably grow...)
- When the scope saves data from the "memory" (not from the screen), the increment value is not right and has to be changed manually (Rigol's BUG ?). You must edit CSV file manually and put there sampling rate^-1
All input/comments/suggestions/bug reports welcomed. Jiri
*source code added