Poll

Github repository worthy?

Github?
0 (0%)
Nope
0 (0%)
A fast peek
0 (0%)
Something I would like to explore
3 (42.9%)
Something I would probably enhance to suite my personal needs
4 (57.1%)

Total Members Voted: 7

Author Topic: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI  (Read 6493 times)

0 Members and 1 Guest are viewing this topic.

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Hi,

Before the Siglent I used an entry level Pico scoop, and one thing I liked was the ease of making good looking screenshots.

Sometimes it is just nicer to have a white background and darker traces. I know the Siglent can sort of invert too, but then the traces become hard to see.
First I got a normal screenshot working via SCPI, where I worked out how to get binary data.

Then I enhanced my script to take the waveform and write it to an XML file. In this way one can export tables to Excel (I think it can be multiple) but also combine them with single fields. So a solid way to pass data to Excel, much better than CSV. In the current setting I use one file for one trace. This way the time axis is also independent between traces.
Excel can handle many files with ease and show them in a single graph. In Excel it is also possible to configurate two vertical axis’s.

What really nice is, is that via a cut ‘n paste to Visio and then an export to a SVG file the graph is now in a scalable image format. I like those SVG files for my schematics as well, because these allow high quality zooming. Which really works nice on a iPad for instance.

To bad this forum does not support the format.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 
The following users thanked this post: luma

Offline tautech

  • Super Contributor
  • ***
  • Posts: 31185
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #1 on: February 04, 2019, 10:02:00 pm »
Hi,

Before the Siglent I used an entry level Pico scoop, and one thing I liked was the ease of making good looking screenshots.

Sometimes it is just nicer to have a white background and darker traces. I know the Siglent can sort of invert too, but then the traces become hard to see.
Well yes, but as they say there is more than one way to skin a cat.

To use the features within the scope....and there are a few  ;) .... first enter the Display menu and adjust Intensity and Graticule higher, especially Graticule for them to show up well in screenshots.
Within the Save/Recall menu rather than just use the blue button Print, we can select various picture and data formats and with any of the picture formats any good image editor can scale them to suit your needs.

A couple of quick examples using Save/Recall PNG and Invert, the first with default Intensity and Graticule settings and second with those both set to maximum.







Further, there are additional features in the Webserver that I urge everyone to experiment with and a recent similar discussion with further info and a link to a Siglent video is here:
https://www.eevblog.com/forum/testgear/siglent-sds-1104x-e-what-to-do-with-waveform-files/msg2175023/#new
« Last Edit: February 04, 2019, 10:07:38 pm by tautech »
Avid Rabid Hobbyist.
On holiday, very limited support available......
 
The following users thanked this post: HendriXML

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #2 on: February 04, 2019, 10:19:42 pm »
Well yes, but as they say there is more than one way to skin a cat.
While it is still acceptable, I wonder who of the Siglent developpers thought it was a good idea to use yellow on white...

I will dive into the link.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 
The following users thanked this post: tubularnut

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #3 on: February 04, 2019, 10:29:09 pm »
Within the Save/Recall menu rather than just use the blue button Print, we can select various picture and data formats and with any of the picture formats any good image editor can scale them to suit your needs.

When you scale (especially low res) bitmaps files they become blurry/unsharp.

With SVG files text and lines don’t get pixelated. They also print very crisp.
https://en.wikipedia.org/wiki/Scalable_Vector_Graphics

I wonder if a fft spectrum graph can be created this way as well, that would be nice as well.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #4 on: February 04, 2019, 10:43:03 pm »
I followed the link. What I did was read the “bin” data via VISA and parsed and converted it myself to XML.

(The binary data is not hard to understand. Just a header and 8 bit samples.)

No manual step required. The script runs in less than a second, and then Excel can be refreshed and the new graph is constructed.

As said: via XML (user editable text file) also other parameters can be passed through as well. Like for example date time, scope settings, etc. These can then also be processed by Excel.

So it provides lots of possibilities extra.
« Last Edit: February 04, 2019, 10:45:37 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #5 on: February 04, 2019, 11:34:50 pm »
I saw the Siglent video in the link. Maybe my feedback can be of use.

In Excel it is possible to have tables, these are a bit different than normal ranges of cells.

Handy because you can adress them in graphs  this way: TableName[ColumnName]

No beginning and ending specified, so Excel will always use all the data, whether it grows or shrinks. It also grows/shrinks added calculated columns as well. (Very powerfull)

Because Siglents CSV file places label,value fields before the actual table data, this technique probably cannot be used.
So I’m not a big fan of mixing tabular data with field data this way.

Processing such a mixed CSV via other tools might also be troublesome.
« Last Edit: February 05, 2019, 04:22:33 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 5388
  • Country: Earth
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #6 on: February 04, 2019, 11:56:25 pm »
here is C# code which you can use to execute SCPI commands, get screenshots, waveform data and control oscilloscope through ethernet with no need to install a bunch of NI VISA drivers. It connects directly to the oscilloscope with no need for drivers.

https://www.eevblog.com/forum/testgear/siglent-sds1000x-how-to-make-direct-ethernet-connection/msg1650191/#msg1650191

The code allows you to get screenshot as an example, but you can get any data from oscilloscope in such way.
I tried to use it in order to implement realtime spectrum analyzer from oscilloscope, but unfortunately the transfer speed is not so high and take 14 megapoint binary record takes for about minute or even more. But for small dumps and screenshots it works pretty fast
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 31185
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #7 on: February 05, 2019, 12:00:23 am »
I saw the Siglent video in the link. Maybe my feedback can be of use.

In Excel it is possible to have tables, these are a bit different than normal ranges of cells.

Handy because you can adress them in graphs  this way: TableName[ColumnName]

No beginning and ending specified, so Excel will always use all the data, whether it grows or shrinks. It also grows shrinks added calculated columns as well. (Very powerfull)

Because Siglents CSV file places label,value fields before the actual table data, this technique probably cannot be used.
So I’m not a big fan of mixing tabular data with field data this way.

Processing such a mixed CSV via other tools might also be troublesome.
Understood.
In the demo I mentioned done for a customer we captured the data and exported as a BIN then used the file converter utility embedded in the Webserver to create CSV files and done this way there were no labels or fields IIRC, just a long list of data that was copied into Excel in order to build charts.

I guess this has a lot to do with the data management tool a user is comfortable with and has available so because we can extract several types of data from X-E's there should be a method that meets most users needs.

Anyways, thanks for exploring and sharing this.  :-+
here is C# code which you can use to execute SCPI commands, get screenshots, waveform data and control oscilloscope through ethernet with no need to install a bunch of NI VISA drivers. It connects directly to the oscilloscope with no need for drivers.

https://www.eevblog.com/forum/testgear/siglent-sds1000x-how-to-make-direct-ethernet-connection/msg1650191/#msg1650191

The code allows you to get screenshot as an example, but you can get any data from oscilloscope in such way.
I tried to use it in order to implement realtime spectrum analyzer from oscilloscope, but unfortunately the transfer speed is not so high and take 14 megapoint binary record takes for about minute or even more. But for small dumps and screenshots it works pretty fast
There's also the LXI tool set and the Webserver already mentioned and videos on each here:
https://www.siglentamerica.com/videos/sds1000x-e-series/
Avid Rabid Hobbyist.
On holiday, very limited support available......
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #8 on: February 05, 2019, 12:27:38 am »
here is C# code which you can use to execute SCPI commands, get screenshots, waveform data and control oscilloscope through ethernet with no need to install a bunch of NI VISA drivers. It connects directly to the oscilloscope with no need for drivers.

https://www.eevblog.com/forum/testgear/siglent-sds1000x-how-to-make-direct-ethernet-connection/msg1650191/#msg1650191

The code allows you to get screenshot as an example, but you can get any data from oscilloscope in such way.
I tried to use it in order to implement realtime spectrum analyzer from oscilloscope, but unfortunately the transfer speed is not so high and take 14 megapoint binary record takes for about minute or even more. But for small dumps and screenshots it works pretty fast
I saw that thread earlier and even responded under that thread few day ago, but it seams to be gone  :-//.

I said I went for the COM interface and a lot of other smart things, ha ha.

It is very possible that via COM things can go faster than via the socket implementation. From what I have become to understand the COM api is not just a “ASCII socket” wrapper. It is even possible to use the COM api to talk just to a socket via a different connection mode. But I think the instrument mode could be more binary. But that is just a guess. I started with a 14M file and it transferred within 10 seconds, if I remember it correctly.

I did download your code BTW, thanks for sharing.
« Last Edit: February 05, 2019, 12:44:47 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #9 on: February 05, 2019, 12:20:59 pm »
I measured the time it takes to fetch 14M samples:

Read 14000018 bytes in 2,61 seconds (5,12 MB/s)

This deviates a lot from more than a minute, so I guess that the COM way does not need some slow encoding on the oscilloscope. :o

The XML file created is 572MB. So not very practical :).

I measured the time it takes to fetch 1,4M samples:
Read 1400018 bytes in 0,31 seconds (4,30 MB/s)
« Last Edit: February 05, 2019, 12:59:17 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline Performa01

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: at
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #10 on: February 05, 2019, 12:48:57 pm »
I measured the time it takes to fetch 14M samples:

Read 14000018 bytes in 2,61 seconds (5,12 MB/s)

This deviates a lot from more than a minute, so I guess that the COM way does not need some slow encoding on the oscilloscope. :o
I'm not sure, but that "minute" might be related to the older SDS1000X series. The SDS1000/2000X-E are more modern and powerful.

 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #11 on: February 05, 2019, 01:18:24 pm »
Forgot they’re that different. With the Siglent power supply -e means constrained version.

The Siglent people like to keep the naming obscure.
« Last Edit: February 05, 2019, 02:03:18 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline Performa01

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: at
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #12 on: February 05, 2019, 01:44:03 pm »
Nothing obscure. -E means "Economy" - you might call it "constrained".

Siglent just decided to introduce a new platform on the low end models first, so they could gain experience and establish a solid basis. The next X (without -E) scopes will of course be based on the new platform as well, but offer a plus in features and performance, so the proportions will be balanced again.
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #13 on: February 05, 2019, 03:07:07 pm »
Nothing obscure. -E means "Economy" - you might call it "constrained".

Siglent just decided to introduce a new platform on the low end models first, so they could gain experience and establish a solid basis. The next X (without -E) scopes will of course be based on the new platform as well, but offer a plus in features and performance, so the proportions will be balanced again.
You need to know that. My first thought was that -E was more Enhanced :)

The SDS1104X-E is the constrained version of the SDS1204X-E and could therefore also be named  SDS1104X  :-+

I find it still a bit confusing when reminding device capabilities. I like the 02 and 04 though  :-+.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI
« Reply #14 on: February 05, 2019, 03:13:49 pm »
I did some testing today.

14K samples per channel is about the max for making graphs.

Excel could read up to 700K samples, and still make a graph, but pasting it to Visio did not go well.

30K points in a graph should be more than enough. It is always possible to do some calculations/consolidation before importing.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline Ben7128

  • Contributor
  • Posts: 13
  • Country: au
 

Offline Ben7128

  • Contributor
  • Posts: 13
  • Country: au
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf