Here is source code. You can use it as a base for your custom remote control tool for oscilloscope
This is awesome, thanks!
I have the Siglent SDS-1202X-E. I've been working with a friend on a project and need to send screenshots. I've been getting screen captures into a thumb drive, but the 'scope gives them empty created/modified datestamps (probably a zero Windows epoch time), which sent me on a quest of how to set the date & time on the 'scope, if that's even possible. I found a couple helpful links that got me started.
1)
https://www.eevblog.com/forum/testgear/setting-date-and-time-on-siglent-sds/2)
https://hackaday.com/2016/11/16/how-to-control-your-instruments-from-a-computer-its-easier-than-you-think/I got Python working in Visual Studio Code, loaded the NI libraries (
), loaded the Python VISA stuff, and got that working. One can get the device IDN and set the date & time, and when a "Save" request on the 'scope is made to the thumb drive, the file now has the correct date stamp. I'm sure it'll do other stuff but I haven't dug very far into it.
Since I'm a C# guy and not really into Python, I wanted to see if this could be done with straight TCP. I wasn't aware of SCPI or VXI-11 protocols until I ran a Wireshark capture on what this Python program was doing, and sure enough, those protocols are listed by name, along with RPC (which everyone's heard of, right?).
I tried using the NI stuff but I couldn't get their .Net libraries to be recognized in Visual Studio, not to mention it's a huge load of bloatware, IMO.
I spent a good day or so working on a C# program, using an older TCP comms stack I had written. It's not nearly as sophisticated as radiolistener's code, and being able to grab screenshots directly from the PC would be awesome. I can at least now do what I was doing with Python w/o any of the NI or PyVISA requirements. I want to be able to send a program to other people with DSOs that doesn't require a ton of overhead to run. I will now review radiolistener's code and see where that leads me.
I also use port 111 to issue the GETPORT call, and in all cases so far I get 911 back instead of 9009, FWIW. The protocol is VXI-11 inside RPC, running over TCP.