Making scalable oscilloscope graphs with a Siglent SDS1104X-E via SCPI - Page 1
Forum section: electronics / testgear

author: HendriXML
author_rank: Super Contributor
timestamp: February 04, 2019, 09:22:42 pm
content: 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.

author: tautech
author_rank: Super Contributor
timestamp: February 04, 2019, 10:02:00 pm
content: Quote from: HendriXML on February 04, 2019, 09:22:42 pmWell 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

author: HendriXML
author_rank: Super Contributor
timestamp: February 04, 2019, 10:19:42 pm
content: Quote from: tautech on February 04, 2019, 10:02:00 pmWhile 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.

author: HendriXML
author_rank: Super Contributor
timestamp: February 04, 2019, 10:29:09 pm
content: Quote from: tautech on February 04, 2019, 10:02:00 pmWhen 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_GraphicsI wonder if a fft spectrum graph can be created this way as well, that would be nice as well.

author: HendriXML
author_rank: Super Contributor
timestamp: February 04, 2019, 10:43:03 pm
content: 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.

author: HendriXML
author_rank: Super Contributor
timestamp: February 04, 2019, 11:34:50 pm
content: 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: TableNameNo 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.

author: radiolistener
author_rank: Super Contributor
timestamp: February 04, 2019, 11:56:25 pm
content: 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/#msg1650191The 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

author: tautech
author_rank: Super Contributor
timestamp: February 05, 2019, 12:00:23 am
content: Quote from: HendriXML on February 04, 2019, 11:34:50 pmUnderstood.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.Quote from: radiolistener on February 04, 2019, 11:56:25 pmThere's also the LXI tool set and the Webserver already mentioned and videos on each here:https://www.siglentamerica.com/videos/sds1000x-e-series/

author: HendriXML
author_rank: Super Contributor
timestamp: February 05, 2019, 12:27:38 am
content: Quote from: radiolistener on February 04, 2019, 11:56:25 pmI 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.

author: HendriXML
author_rank: Super Contributor
timestamp: February 05, 2019, 12:20:59 pm
content: 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.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)

author: Performa01
author_rank: Super Contributor
timestamp: February 05, 2019, 12:48:57 pm
content: Quote from: HendriXML on February 05, 2019, 12:20:59 pmI'm not sure, but that "minute" might be related to the older SDS1000X series. The SDS1000/2000X-E are more modern and powerful.

author: HendriXML
author_rank: Super Contributor
timestamp: February 05, 2019, 01:18:24 pm
content: Forgot they’re that different. With the Siglent power supply -e means constrained version.The Siglent people like to keep the naming obscure.

author: Performa01
author_rank: Super Contributor
timestamp: February 05, 2019, 01:44:03 pm
content: 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.

author: HendriXML
author_rank: Super Contributor
timestamp: February 05, 2019, 03:07:07 pm
content: Quote from: Performa01 on February 05, 2019, 01:44:03 pmYou need to know that. My first thought was that -E was more EnhancedThe SDS1104X-E is the constrained version of the SDS1204X-E and could therefore also be named SDS1104XI find it still a bit confusing when reminding device capabilities. I like the 02 and 04 though.

author: HendriXML
author_rank: Super Contributor
timestamp: February 05, 2019, 03:13:49 pm
content: 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.

author: Ben7128
author_rank: Contributor
timestamp: June 12, 2022, 07:42:14 am
content: Siglent Binary File Viewer for Windows. Seehttps://www.eevblog.com/forum/testgear/siglent-binary-viewer-for-windows/msg4233250/#msg4233250

author: Ben7128
author_rank: Contributor
timestamp: June 12, 2022, 07:43:10 am
content: Siglent Binary Viewer for Windows seehttps://www.eevblog.com/forum/testgear/siglent-binary-viewer-for-windows/msg4233250/#msg4233250