Author Topic: Siglent SDG1000 arbitrary CSV file format?  (Read 4868 times)

0 Members and 2 Guests are viewing this topic.

Offline nctnicoTopic starter

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Siglent SDG1000 arbitrary CSV file format?
« on: November 29, 2016, 04:05:50 pm »
Does anyone know what kind of CSV files the Siglent SDG1000 function generator can read? Ofcourse it isn't documented in the manual and it would be too much to expect the Eayswave software to run standalone without the VISA crap installed.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 4105
  • Country: fi
  • Born in Finland with DLL21 in hand
Re: Siglent SDG1000 arbitrary CSV file format?
« Reply #1 on: November 29, 2016, 05:42:38 pm »
Somewhere in this forum it is better explained if I remember right but at this time I can not find it.

But here is attached example.
Just remove .txt and it is ok .csv.

Fun is that there can also use data point instead of "time"

just something like
0,0.00000
1,0.03835
2,0.07670
3,0.11505
....
16383,-0.03835

and before data, header 127bytes.
(including errors..)




But here real EasyWave generated

Quote
data lenth,16384
frequency,1000.000000000
amp,20.000000000
offset,0.000000000
phase,0.000000000







xpos,value
[ continue with data pairs ]


Header in HEX (bold)
64 61 74 61 20 6c 65 6e 74 68 2c 31 36 33 38 34
0d 0a 66 72 65 71 75 65 6e 63 79 2c 31 30 30 30
2e 30 30 30 30 30 30 30 30 30 0d 0a 61 6d 70 2c
32 30 2e 30 30 30 30 30 30 30 30 30 0d 0a 6f 66
66 73 65 74 2c 30 2e 30 30 30 30 30 30 30 30 30
0d 0a 70 68 61 73 65 2c 30 2e 30 30 30 30 30 30
30 30 30 0d 0a 0d 0a 0d 0a 0d 0a 0d 0a 0d 0a 0d
0a 0d 0a 78 70 6f 73 2c 76 61 6c 75 65 0d 0a


And just continue with data first 5 xpos,value (blue)

30 2e 30 30 30 30 30 30 65 2b 30 30 30 2c 30 2e
30 30 30 30 30 0d 0a 36 2e 31 30 33 35 31 36 65
2d 30 30 38 2c 30 2e 30 30 37 36 37 0d 0a 31 2e
32 32 30 37 30 33 65 2d 30 30 37 2c 30 2e 30 31
35 33 34 0d 0a 31 2e 38 33 31 30 35 35 65 2d 30
30 37 2c 30 2e 30 32 33 30 31 0d 0a 32 2e 34 34
31 34 30 36 65 2d 30 30 37 2c 30 2e 30 33 30 36
38 0d 0a


(0.000000e+000,0.00000
6.103516e-008,0.00767
1.220703e-007,0.01534
1.831055e-007,0.02301
2.441406e-007,0.03068)


No need care freq. When use wfm just set what want. Same about voltage level. This is for -10 to +10 (20)
And it is good to know that when it reads .csv it also can scale it. If there is just less data points in taable or if voltage limits are not used then it do scaling for defined V range.


Attached file is two cycle of sine. (if run 1MHz arb freq out is 2MHz)

This .csv is just made using EasyWave.
After then added .txt so that forum can accept it.




« Last Edit: November 29, 2016, 05:59:31 pm by rf-loop »
I drive a LEC (low el. consumption) BEV car. Smoke exhaust pipes - go to museum. In Finland quite all electric power is made using nuclear, wind, solar and water.

Wises must compel the mad barbarians to stop their crimes against humanity. Where have the wises gone?
 

Offline nctnicoTopic starter

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Siglent SDG1000 arbitrary CSV file format?
« Reply #2 on: November 29, 2016, 05:53:50 pm »
I ended up creating a blank CSV file with Easywave and then copy & paste the data from the oscilloscope into it. It would have been so nice if the generator could read generic CSV files and just skip the header.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 4105
  • Country: fi
  • Born in Finland with DLL21 in hand
Re: Siglent SDG1000 arbitrary CSV file format?
« Reply #3 on: November 29, 2016, 06:03:46 pm »
I ended up creating a blank CSV file with Easywave and then copy & paste the data from the oscilloscope into it. It would have been so nice if the generator could read generic CSV files and just skip the header.

You can make text file using notepad what have this header and after then copy just data and copypaste this all to USB and to gen..

 
I drive a LEC (low el. consumption) BEV car. Smoke exhaust pipes - go to museum. In Finland quite all electric power is made using nuclear, wind, solar and water.

Wises must compel the mad barbarians to stop their crimes against humanity. Where have the wises gone?
 

Offline nctnicoTopic starter

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Siglent SDG1000 arbitrary CSV file format?
« Reply #4 on: November 29, 2016, 06:15:03 pm »
Now I know but if the generator's own CSV file reading algorithm was smarter I would not have needed to waste an hour to install NI VISA and mess around with Easywave. How difficult is it to skip the first lines with text and then read the numbers until there are no more numbers? This would allow direct CSV input from every oscilloscope which can write CSV files.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2300
  • Country: gb
Re: Siglent SDG1000 arbitrary CSV file format?
« Reply #5 on: November 18, 2018, 01:18:42 pm »
This is a long dead thread but thought it was a reasonable place to dump this script for GNU Octave (and maybe it's clone called MATLAB?).

It generates a simple sine wave and saves the datapoints to CSV file in a format suitable for opening in Easywave or directly by Siglent Arb Gens (SDG2042X tested) via USB stick.

Modify as you like to save your own custom waveforms to Siglent CSV.

Edit:
Beware of a potential issue with the SDG2042X; according to this message
https://www.eevblog.com/forum/testgear/the-siglent-sdg2042x-thread/msg2435634/#msg2435634
loading an arb wave with zero datapoints might lock up the unit. Maybe that's just when using LAN connection rather than CSV on USB stick but thought I'd mention it anyway.
« Last Edit: May 25, 2019, 01:12:25 pm by voltsandjolts »
 
The following users thanked this post: egonotto, 2N3055


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf