Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG - Page 1
Forum section: electronics / testgear

author: 4x1md
author_rank: Regular Contributor
timestamp: July 17, 2018, 11:07:08 pm
content: At a certain point after getting the SDG1204X-E oscilloscope I started to wonder if it might be possible to use the Bode plot function with a non-Siglent waveform generator. After some hours of researching and reverse engineering I wrote this Python program. It is a small server which emulates Siglent arbitrary waveform generator connected to LAN.While drawing a Bode plot, the oscilloscope sends the commands to PC instead of the AWG and my program is what makes the oscilloscope think that it communicates with a genuine Siglent signal generator. The program extracts the commands sent to the generator, parses them and translates to the commands, which can be understood by the connected to the PC non-Siglent generator.The program is written in Python. I tested it only under Linux. Later I'll test it under Windows too.The source code and the explanations about running it are located here:https://github.com/4x1md/sds1004x_bodeHere is a video which shows how the program works:You are welcome to discuss the program here.

author: bluejedi
author_rank: Contributor
timestamp: July 29, 2018, 03:52:26 pm
content: Quote from: 4x1md on July 17, 2018, 11:07:08 pmDo you have any plans to add support for the MHS-5200A?https://www.eevblog.com/forum/testgear/mhs-5200a-serial-protocol-reverse-engineered/Except for the UI and max. frequency the MHS-5200A looks functionally similar to the JDS6600 (but I'm unaware if their interface command language / format is similar).

author: 4x1md
author_rank: Regular Contributor
timestamp: July 29, 2018, 07:18:24 pm
content: Currently I support only the devices I have. I'll add one more model which is very similar to BK4075.It would be nice to add more generators but currently I have no idea how to do it without having the specific model. Maybe I'll have to work together with somebody who has it and can test my code.

author: xenganier
author_rank: Newbie
timestamp: August 07, 2018, 09:56:57 pm
content: Thanks for doing this. I have it working with an RPi3 running Dietpi and it works well except for a few glitches. Especially on medium and high resolution modes the JDS6600 goes to zero frequency once in awhile, maybe three times on a 20-20k sweep. In your video near the end on high res yours does it too. I tried raising Sleeptime in steps up to 100ms but it didn't seem to make a difference. Any idea what might be going on?

author: 4x1md
author_rank: Regular Contributor
timestamp: August 11, 2018, 09:20:47 pm
content: Quote from: xenganier on August 07, 2018, 09:56:57 pmNo. I'll try to understand when I have free time.

author: ltwin8
author_rank: Contributor
timestamp: November 05, 2018, 07:03:36 pm
content: Would be cool to just add a RPi into the JDS6600 Case and use LAN of it, but without display etc. is that possible? and yes how?I have a RPi B, would it be enough?thanks for the answers

author: Dundarave
author_rank: Regular Contributor
timestamp: November 21, 2018, 03:08:12 am
content: Excellent work making the non-Siglent AWGs work with the SDS1004X-E!It's been fun to play with: I loaded the script up on a Raspberry PI and it worked brilliantly with the scope and my AWG.Following your JDS6600.py driver file as a template, I've managed to modify it to support the FeelTech FY6600 AWG using a copy of the FY6600 comm protocol that I found somewhere on the net. It works pretty well, but I had to crank the inter-command Sleeptime up to 500ms in order to reliably pass your test script: It doesn't seem to affect anything with the actual Bode plotting activity, as the commands from the scope come relatively slowly.I've tested it as much as I could, and I'd now like to make the driver file available to all: Can I email it to you for inclusion in your Git repository? Or is there a better way to make it available? Note - Jan. 27/19: Added fy6600.py & the FY6600 comm protocol here per a reader request.Cheers -

author: tautech
author_rank: Super Contributor
timestamp: November 21, 2018, 04:47:58 am
content: Quote from: Dundarave on November 21, 2018, 03:08:12 amWelcome to the forum.How large is it ? Up to 1 Mb you can attach it to a reply/post even if it's not a permitted file type by just adding .(dot)<permitted type> and mentioning to remove .dot<permitted type>.

author: 4x1md
author_rank: Regular Contributor
timestamp: November 21, 2018, 06:51:01 am
content: Quote from: Dundarave on November 21, 2018, 03:08:12 amMy script is open source. You can open a pull request on GitHub and I'll merge the changes with the main repository. If you don't want to deal with GitHub you can just send me your version of the script and I'll add your changes myself.The only thing I'll ask you is to test your driver as good as possible, because I don't own a FY6600 and therefore I'm not able to test it myself.Thanks for your work.

author: 4x1md
author_rank: Regular Contributor
timestamp: November 21, 2018, 06:54:22 am
content: Quote from: ltwin8 on November 05, 2018, 07:03:36 pmIt seems possible. You'll have to connect its UART to the JDS6600. If you want to work directly with the scope without using the LAN, the RPi must also run a DHCP server. You'll also need a power supply which can provide enough power to both AWG and RPi.

author: ltwin8
author_rank: Contributor
timestamp: November 21, 2018, 07:58:30 pm
content: Can someone post a guide on facebook on how to run this on a raspberry and how to connect? (unidentified AWG, unable to connect to AWG) I dont get my scope to connect to the Raspberry.Maybe someone can upload an image of the SD card for the raspberry? I have no experience in raspberry and linux with respect to this task.Would be very lucky if someone could help me. Thanks

author: 4x1md
author_rank: Regular Contributor
timestamp: January 30, 2019, 10:09:46 pm
content: I uploaded the FY6600 driver to the main repository on GitHub. Sorry for such a long delay.Dundarave, thanks for your contribution.

author: Andreax1985
author_rank: Regular Contributor
timestamp: January 31, 2019, 09:34:26 am
content: Is this good also for FY6800 AWG model?

author: 4x1md
author_rank: Regular Contributor
timestamp: January 31, 2019, 09:39:33 am
content: Quote from: Andreax1985 on January 31, 2019, 09:34:26 amI'm not familiar with FY6800. You can try to run theawg_tests.pyand see if it works.

author: gamerpaddy
author_rank: Regular Contributor
timestamp: February 06, 2019, 01:24:40 pm
content: Could this be ported onto a Microcontroller with networking?Like a Arduino with Network shield or ESP8266/32 over wifi?<i may have asked this a while ago on one of your youtube videos, cant remember>Unfourtainly i lack the skills to do this, but it seems more cost effective than using a raspberry pi.

author: 4x1md
author_rank: Regular Contributor
timestamp: February 07, 2019, 08:51:03 am
content: Quote from: gamerpaddy on February 06, 2019, 01:24:40 pmIt may be possible but I can't say anything about ESP8266/32 because I've never worked with them and I don't know if they have enough ROM and RAM for such program.

author: Rerouter
author_rank: Super Contributor
timestamp: February 07, 2019, 09:02:30 am
content: Defiantly can be emulated, you just need to emulated a few commands, Basicwave, Output and IDNFor the IDN String you can look into the earlier python project for converting the commands for another brand AWG,The scope uses output to turn on the AWG output, then justs broadcasts basicwave with different fixed frequencies for each measurement step.I should also mention you don't need anything as grand as a VI library to deal with SCPI messages, just treat them like standard packets

author: gamerpaddy
author_rank: Regular Contributor
timestamp: February 08, 2019, 07:09:12 am
content: there's certainly enough ram/flash available for this kind of stuff.i tried my best but after 6 hours and headache im only halfway there, but at the most inefficient way possible. i bet this gets the worst code 2019 award.I managed to make the "test connection" thing succeed and the siglent allready sent me some AWG parameters.im using a arduino leonardo with a Ethernet shield, LAN cable directly into the scope.

author: MrTick
author_rank: Newbie
timestamp: April 23, 2019, 11:26:55 am
content: Hi this is my very first message on eevblog, so hello everybody!I've just recently got my hands on SDS1104X-E and I was looking for the solution to connect it to FY6800 AWG.Thanks4x1mdfor reverse engineering the Siglent communication protocol and your very nice solution.But as I think using pc/raspberry to just translate the messages is an overkill, I've implemented similar code for ESP8266.FY6800 has a nice uart connector on the back, the logic levels are 3,3V, the VCC is 5V however, so you need to find some way to drop it to 3.3V.(I've realized that just when writing this post, fortunately my ESP-01 survived all tests fed directly from 5v. Currently I just soldered yellow LED in series, it seems to be dropping the voltage to ~3.2V)I've used the simplest ESP-01 module.Currently only FY6800 is supported, FY6600 and clones should work also.https://github.com/PanKaczka/espBodeTo compile the code I'm using the standard Arduino-ESP library:https://github.com/esp8266/ArduinoTo use it in your own environment you need to edit esp_config.h, so WiFi mode, network name and password matches your network configuration.

author: tinhead
author_rank: Super Contributor
timestamp: April 23, 2019, 11:44:29 am
content: Quote from: MrTick on April 23, 2019, 11:26:55 amHi hoQuote from: MrTick on April 23, 2019, 11:26:55 amcool, dzieki/thanks Jakub

author: 4x1md
author_rank: Regular Contributor
timestamp: April 23, 2019, 06:09:15 pm
content: Quote from: MrTick on April 23, 2019, 11:26:55 amWelcome and thank you very much for sharing this project.It can be a good idea to develop a small PCB with a simple circuitry for voltage and logic level conversion. It can even be made like a plug which fits the rear connector of the AWG.

author: iMo
author_rank: Super Contributor
timestamp: April 23, 2019, 06:42:23 pm
content: Would it be possible to create following setup:- ESP8266 module- DDS 0-60MHz 2Vpp out, wired to the ESP moduleand use it with 1104X-E as the AWG?

author: 4x1md
author_rank: Regular Contributor
timestamp: April 23, 2019, 06:44:47 pm
content: Quote from: imo on April 23, 2019, 06:42:23 pmI think yes. 2Vpp out must be defined in Bode settings of the oscilloscope.

author: 4x1md
author_rank: Regular Contributor
timestamp: April 23, 2019, 06:46:10 pm
content: The PCB I'm speaking about can be something like this one but with a female header connector which can be plugged directly into FY6600/JDS6600.

author: MikeLud
author_rank: Regular Contributor
timestamp: April 24, 2019, 03:35:52 am
content: I just ordered some ESP-01 and goodies to see if I can get my FY6800 and SDS1104X-E play nice.

author: Old Printer
author_rank: Frequent Contributor
timestamp: April 24, 2019, 03:57:28 pm
content: I have only had my 1104x-e a week now so still feeling my way along. Right now my best AWG is my Analog Discovery 2. While limited in frequency, it's other controls are pretty versatile. This has me wondering about the possibility to interface these two...

author: 4x1md
author_rank: Regular Contributor
timestamp: April 24, 2019, 06:39:47 pm
content: Quote from: Old Printer on April 24, 2019, 03:57:28 pmIt may be possible but I'm not familiar with this device so I can't tell you more.

author: MikeLud
author_rank: Regular Contributor
timestamp: April 27, 2019, 04:18:32 am
content: I modified an ESP-01 Adapter as shown in photos below and I am having issues with communication. It work for about 30 seconds to a minute then I get the error shown in photo below. I tried several delay settings but had no luck. Does anyone know how to get it to work.Thanks in Advance,Mike

author: MikeLud
author_rank: Regular Contributor
timestamp: April 27, 2019, 04:28:07 am
content: MrTickI added a Pull Request to fix a compile issue I had.

author: MikeLud
author_rank: Regular Contributor
timestamp: April 28, 2019, 01:48:20 am
content: I figured out what was causing my communication issues. It was having the scope set to DHCP, once I set the scope to a static IP it works like a charm. Below are some photos of the final setup.4x1md & MrTick,Thanks for all of your hard work on this great non-Siglent AWG hack.Mike

author: 4x1md
author_rank: Regular Contributor
timestamp: June 01, 2019, 05:01:03 pm
content: Has anybody tried my code with Bode Plot II from the new FW 6.1.33?

author: MrTick
author_rank: Newbie
timestamp: June 02, 2019, 09:43:25 am
content: Quote from: 4x1md on June 01, 2019, 05:01:03 pmHi, thanks for the heads up, I've just upgraded my SDS.I've tested only my ESP SW, though it communicates exactly same like your implementation.It still works without any problems, no additional AWG verifications were introducedI'm attaching sample sweep output from a diy 40db attenuator.

author: rf-loop
author_rank: Super Contributor
timestamp: June 02, 2019, 04:07:03 pm
content: Quote from: MrTick on June 02, 2019, 09:43:25 amIf look your image it looks weird. Exept it tell your AWG is working with Siglent what was perhaps main thing.But then, your setup and settings are possible totally mess.What signal goes to reference channel (Ch1)First make sure your signal source (AWG) output go to your DUT (in your case your selfmade attenuator) input and exactly same signal goes to Ch1 (as long as you have not defined other channel for reference).Then your DUT (device under test - your attenuator) output goes to Ch2 (because in your image you have selected it (or it is just as scope default).First it need be sure these signal connections are ok.Then need look about your BodePlot II settings are right if need.Basic signal connections (user can free select channels including what is ref channel)You have measured attenuator but your display show "40 - 60dB" amplifier.In attached image Ch4 is selected for DUT out but scope factory default is Ch2(Ch4 is selected for main DUT out in image related to other things = with 1 in 1 out system can keep 1GHz samplerate but also Ch4 is far from Ch1 so it may crosstalk with strong reference signal bit less than Ch2 if need get all out from dynamic range = in basic works just forget this and happy use Ch1 Ch2 pair)

author: MrTick
author_rank: Newbie
timestamp: June 02, 2019, 06:20:20 pm
content: Quote from: rf-loop on June 02, 2019, 04:07:03 pmYou are totally right.First I've swapped CH1 and CH2, so the reference was connected wrongly to a CH2 instead of CH1.That's why all results should be basically multiplied by -1 (or - better, the connection should be fixed and measurements done again).Second: calling my device a 40dB attenuator is an insult for attenuatorsIt's just bunch metalized resistors soldered together and clamped into a BNC connector, it behaves correctly up till ~10MHz, then it's good only for testing Bode plots

author: aimc
author_rank: Contributor
timestamp: September 03, 2019, 12:51:39 am
content: This looks very interesting. I am wondering though if the scopes communication protocol is the same for serial USB? Did you try to communicate with the Arduino? I am thinking along the line of using one USB (to the scope) and the simple serial connection to the FY6800. The Leonardo (32U4) would be suitable as it has 4 UART's that can be used with the serial(1...n) library. Do you think that is a doable approach? I have worked successfully with asynchronous handshakes between a Leonardo and an ESP, so it would require some changes to your code and of course hardware. Even with USB to the FY6800 (in which case you may need a second MCU for the USB chip) I think this could be a better solution since you don't need to depend on a WiFi connection in your local network. The extra cable and PSU plug pack should not be a problem.Let me know what you think.cheers

author: 4x1md
author_rank: Regular Contributor
timestamp: September 03, 2019, 05:59:12 am
content: Quote from: aimc on September 03, 2019, 12:51:39 amIs may be a good idea. As far, as I know, these Chinese AWGs can provide 5V on their rear header connector. It means that you'll not need an additional PSU for the external USB-AWG connection board. It will be interesting to try but the problem is that I'm not familiar with USB protocols. I'd be happy to work together with somebody on this.

author: MrTick
author_rank: Newbie
timestamp: September 03, 2019, 09:47:03 am
content: Handling the USB using AVR devices was always a tricky issue.USB signals can reach dozens of Mbps that frequently is hard to handle for 16MHz CPUs.https://www.obdev.at/products/vusb/index.htmlis a good place to start.Another thing would be to connect Siglent AWG to PCs USB and see what kind of device shows up. It's possible that it's just another serial-usb COM port, then the direct USB-AWG interface should be doable on a AVR.Another thing, if you don't want to use external WiFi network you may use 8266 in an access-point mode, where the scope would connect directly to the network generated by AWG and no additional routers/networks is necessary.

author: Rerouter
author_rank: Super Contributor
timestamp: September 03, 2019, 09:49:58 am
content: The scope shows up as a test and measure device, the AWG as a class I have not seen before.

author: MrTick
author_rank: Newbie
timestamp: September 03, 2019, 09:57:24 am
content: Quote from: Rerouter on September 03, 2019, 09:49:58 amThat sounds promising. SCPI is basically a text protocol often exchanged via more or less exotic serial implementation. I'll try to connect some arduinos to the scope when I'm back at home.Would it be possible for you to share the USB Vendor/Device IDs of the Siglent AWG? (We'll probably need that to mimic the AWG with Arduino)

author: Rerouter
author_rank: Super Contributor
timestamp: September 03, 2019, 10:06:44 am
content: For the scope itsUSB Test and Measurement DeviceVID: F4ECPID: EE38REV: 9999For the AWG itsUSB Serial Bus DevicesDescription: SAG1021VID: F4EDPID: EE3AREV: 0100Manufacturer: Shenzhen Siglent Co., Ltd.Device Instance Path: USB\VID_F4ED&PID_EE3A\SAG10DAQ1R0000 (zero'd out my serial number)If you need anything else, just ask, as i would be interested in knowing how to drive the thing from windows.

author: aimc
author_rank: Contributor
timestamp: November 04, 2019, 03:28:54 pm
content: I am also thinking along using the build-in USB FTDI of any Arduino board to communicate with the scope. Especially then the simple serial RS232 library could be used. Downside is that debugging via this port is no longer available, but this could be temporarily managed by alternative means (e.g. via a I2C LCD Display). More importantly is the question if this serial <-> USB FTDI can be used on the scope at all, and what parameters (baud rate etc.) are appropriate? Did anyone here experiment with this? The scope's USB accepts any PC connection and WiFi dongle, but what does it do with the FTDI that requires a driver on a PC? Also then the USP could power the Arduino board and all levels to the FeelTech remain 5V TTL. Only concern is the connection of the scope and AWR grounds, that where we all know might be problematic with the FeelTech. But then again this will happen anyways via the grounds of the DUT. Any input is appreciated, thanks in advance

author: aimc
author_rank: Contributor
timestamp: December 07, 2019, 08:14:08 pm
content: Just wanted to let you know that I opened a pull request on your GIT repo - adding the STL's for a enclosure - if you are interested that is... Otherwise the fork is available athttps://github.com/AimcLsc/espBode. (sorry for the crudity, I am new to GIT...)

author: BlackICE
author_rank: Regular Contributor
timestamp: February 25, 2020, 07:26:49 am
content: I want to thank MrTick for the ESP code he put on GitHub. I downloaded to and modified it to work with an ESP32 that I had already. I haven't fully tested it yet. But go it to communicate with the scope and it isn't complaining when I run a fake bode plot without any input or outputs.The ESP32 has 3 serial ports so I used one for debug output and another for talking to the FY6900. I had change some code because a member function availableForWrite() doesn't exist for the ESP32 libraries./* availableForWrite() doesn't exist for esp32 so we do differentlywhile(!client.availableForWrite());client.write((uint8_t*)&response, sizeof(rpcresp_getport));*/changed to:while (sizeof(rpcresp_getport) != client.write((uint8_t*)&response, sizeof(rpcresp_getport)))DEBUG("ERROR: client.write2");;#include <ESP8266WiFi.h>changed to#include <esp_wifi.h>

author: BlackICE
author_rank: Regular Contributor
timestamp: March 25, 2020, 06:11:07 am
content: Just noticed the waveforms were distorted, had jitter in timing and amplitude. Turns out powering an ESP32 from the 5V output on the back is drawing too much current. After I disconnecting the 5V wire the waveforms were now as before.

author: BlackICE
author_rank: Regular Contributor
timestamp: March 30, 2020, 11:30:58 pm
content: Using the bode II stimulus in units other than amplitude (eg. dBV, dBu) doesn't work. I looked at the code and those commands are not being handled. The FY6900 I have doesn't have those units either but it should be strait forward to convert from dB units to amplitude to get the desired results, although the FY6900 display will show volts. Any interest for me to do so and to post the code back to GitHub?

author: ewaller
author_rank: Contributor
timestamp: May 01, 2020, 09:49:24 pm
content: I have been playing with 4x1md's code and have expanded on it quite a bit. And have ported it to Python 3.I now have a full blown CLI program that controls an FY6800 allowing control of both channels for waveform, amplitude, offset and duty cycle. It can control modulation, VCO and counter functions, and can upload wave forms to the instrument. I used 4x1md's code to provide the a server that emulates a Siglent generator so this can be used as an external source for Bode plots (works great, by the way).The major difference is that I use a Raspbery-pi running ser2py to expose the USB-serial instrument to a TCP/IP network to permit streaming via TCP socket.And, still a bit hackish, wrote some code to covert black and white graphic images from raster to vector format, and generate waveform files that can be uploaded to the instrument as X channel and Y channel wave forms that are then displayed on an XY scope.If there is any interest, I can clean this up and put it on Github. I would like to give 4x1md a chance to review it first as well. Here is a screen shot of this morning's hack session:

author: ewaller
author_rank: Contributor
timestamp: May 01, 2020, 09:51:21 pm
content: Another example

author: 4x1md
author_rank: Regular Contributor
timestamp: May 01, 2020, 09:55:47 pm
content: Yes, I'd like to see the improvements and merge them to the master branch. I think, that now, thanks to the coronavirus, I'll have free time for code maintenance.

author: cdc3oo
author_rank: Contributor
timestamp: May 25, 2020, 07:44:06 am
content: Quote from: 4x1md on May 01, 2020, 09:55:47 pmHelloFirst time poster.First of all, I want to warmly thank you for sharing your code.I tried to run master on WIN and had issues with Python 2.7 or 3.7 raising errors. Also, wireshark showed oddities in some RPC replies payload.I decided to fix these, simplified the server code a little bit and worked on the statements giving errors at runtime.Actually connectivity test is working like a charm with 6.1.33 while protocol is OK according to wiresharkI have to check it works well end to end with the Feeltech (no other AWG here) and also to do non-regression tests on a *nix machine.If interested, I can send you the diff once I'm done with this.

author: acugnini
author_rank: Newbie
timestamp: May 26, 2020, 05:51:34 pm
content: Is it possible touploada waveform to the SDS1202X-E? I know downloading is possible, using either EasyScopeX or by opening an IP socket, but what about the reverse? (I want to upload a waveform and then perform an FFT on the data.) --agc

author: cdc3oo
author_rank: Contributor
timestamp: May 27, 2020, 06:00:57 am
content: Quote from: BlackICE on March 30, 2020, 11:30:58 pmHello I missed your post before writing my first one...Unless you already did it, here is the code which should work with others AWGs:elif args == "AMPDBM":self.awg.set_amplitude(channel, 0.77459*2.82843*pow(10,float(args[n+1])/20))n += 2

author: timkoers
author_rank: Contributor
timestamp: June 29, 2020, 01:10:38 pm
content: Hi all!I am planning to buy a AWG that is supported by this awesome hack.Is there any list with (un-)officially supported AWG's, with their development status?At first I looked for the JDS6600 but now I'm leaning towards the FY6800 or FY6900.

author: aljordan
author_rank: Newbie
timestamp: July 26, 2020, 04:31:25 pm
content: Thank you very much for creating this script and making it available. It works great with a Koolertron signal generator, which appears to be a re-branded jds6600 available on Amazon. I first tried running it from my laptop running Manjaro Linux, but the oscilloscope wouldn't connect. Maybe the ports were locked down. Instead I installed pip and pyserial on a Raspberry Pi running Diet Pi and had no issues connecting and running plots.Thanks again.

author: ptype
author_rank: Newbie
timestamp: September 17, 2020, 04:16:46 pm
content: I tried this today with a FY2300 and it worked the first attempt with no problems. Thanks!For those who would rather not open a port as root, there is a built-in way to do internal NAT (port forwarding) in Linux.First open upawg_server.pyand changeRPCBIND_PORT = 111VXI11_PORT = 703toRPCBIND_PORT = 8000VXI11_PORT = 8001next run this at the commandline to set up the port forwardsudo iptables -t nat -A PREROUTING -p tcp --dport 111 -j REDIRECT --to-port 8000Now you can runbode.pyas an unprivileged user (no sudo needed):python bode.py <awg_name> <serial_port> <baud_rate>clean up the port forward at any time with a reboot. There are also iptables commands to delete the port forward but that seemed like TMI for this post.

author: Archades
author_rank: Contributor
timestamp: September 28, 2020, 05:48:37 am
content: Has anyone tried this with a Uni-T UTG962?

author: puterboy
author_rank: Regular Contributor
timestamp: November 11, 2020, 04:28:22 pm
content: Will this work with a FeelTech 6900?I.e. will the code for the 6800 also work for the 6900?

author: puterboy
author_rank: Regular Contributor
timestamp: November 11, 2020, 04:32:18 pm
content: Hi Mike,This is *really* cool.I would love to create such a slick setup for my FeelTech 6900, but I am unsure of the details.Would it be possible to summarize what you did, including:1. What hardware/boards for the microcontroller as well as the UART & WiFi2. What if any hardware hacking was needed?3. What software version you used?4. How you programmed the microcontroller?5. How do I know if it's working?I am a bit of Newbie here so would appreciate any help as it has been hard for me to glean the details from the various posts on this thread.

author: puterboy
author_rank: Regular Contributor
timestamp: November 11, 2020, 04:38:23 pm
content: Quote from: MikeLud on April 28, 2019, 01:48:20 amYes, there seems to be a bug with DHCP on the Siglent 1104/1204-X-E whereby it connects/disconnects intermittently but is rock stable with static IPs.Here is a post on eeVblog where I did some troubleshooting on when/where the error occurs.https://www.eevblog.com/forum/testgear/siglent-sds1104x-e-and-sds1204x-e-bode-plot-with-non-siglent-awg/

author: JamesLynton
author_rank: Contributor
timestamp: November 19, 2020, 02:54:00 am
content: Quote from: Archades on September 28, 2020, 05:48:37 amI'd like to see it done too, got one of these on the way as well as its a nice compact source for debugging stuff on the move; and with a nice ui to boot.Having dug abit in the pc control software manual for it, it uses the USBTMC (USB Test and Measurement Class) protocol for remote control and editing, it shouldn't be too difficult to sniff those usb packets on sending those commands from the software to see exactly what it'd expect to implement similar.Sigrok (the bus sniffer software project) links to the documentation for this standard here:https://sigrok.org/wiki/USBTMCand links to code used for working with the USBTMC SCPI protocol here:https://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=src/scpi/scpi_usbtmc_libusb.c

author: jbaribeault
author_rank: Contributor
timestamp: December 01, 2020, 03:40:16 am
content: I just picked up a UNI-T UTG962E as well. Ready/willing to run anything required to help with the effort - this is a nice little unit and would go AWESOME with my SDS1204X-E....

author: timkoers
author_rank: Contributor
timestamp: December 08, 2020, 07:11:19 pm
content: I updated the code of espBode to include the FY6900. I also opened a merge request but that doesn't seem to get merged any time soon.https://github.com/timkoers/espBode

author: masterx81
author_rank: Frequent Contributor
timestamp: December 08, 2020, 11:17:17 pm
content: Quote from: timkoers on December 08, 2020, 07:11:19 pmThanks! I have ordered my 1104x-e, so now that i can connect it to my fy6900 👍👍

author: jbaribeault
author_rank: Contributor
timestamp: December 14, 2020, 05:19:59 pm
content: How fast does the signal gen need to react to the commands from the scope? Myself and a few others managed to get python sending commands to the UNI-T 962G but the only thing they've implemented is button pushes and on a single one at a time - fastest we seem to be able to set a new waveform is about 0.85 seconds. Is this going to be fast enough or do the waveforms need to change faster than that?

author: masterx81
author_rank: Frequent Contributor
timestamp: December 16, 2020, 12:23:28 am
content: ESP-01 (espbode) + FY6900 works perfectly!Love it!Thanks for your work!In past i've used microchip mcu where you had only few KB of flash and some byte of ram, it's incredible how powerful is this esp-01 little thing 😱

author: masterx81
author_rank: Frequent Contributor
timestamp: December 16, 2020, 09:02:25 pm
content: I think that there must be a bug on the esp code (both forks), I'm trying to set a sweep with center frequency 20MHz, 5MHz wide, and the esp hang, also stop responding to ping (seem stuck in a loop). I've still not attached the logic analyzer to see what's going on...Little question, as i'm not familiar with arduino projects... How can be debugged this thing? The tx/rx pins are connected to the awg so i can't output anything

author: vfxsoup
author_rank: Newbie
timestamp: January 30, 2021, 07:31:44 pm
content: To the OP, this works with the FY6900 just fine* using the FY6600 code.*I had to hack the second channel to turn on alongside channel 1 on the FY6900 (in fy6600.py), as the SDS1104X-E needs a direct connection from the AWG along side the output from the DUT as a reference, otherwise the Bode plot is just a mess of spurious data points. For some reason the scope wasn't requesting channel 2 to switch on, so I just told it to enable channel 2 as per channel 1 and everything worked fine (all other settings are sent to channel 2 of the FY6900).Thanks for writing this code!

author: nichrist
author_rank: Newbie
timestamp: February 07, 2021, 09:39:52 am
content: HiI am considering buying the SDX1204 and I would like to known if it would be possible to use it in conjunction with a Rigol AWG DG1062 which I already have, for drawing Bode plots.Thank you in advance

author: TechieTX
author_rank: Contributor
timestamp: March 07, 2021, 10:15:50 pm
content: I have a FY2300 coming on aslow boat from China(is it a coincidence it's called a Junk?)I'm going to mod the FY2300 board to put switched 5V on the USB connector, and hook it to an ESP8266 D1 Mini clone board. I'll let ya know how it goes,masterx81. From the earlier comment byptype, it's likely to work. I have the programming manual for the 2300 and also for the 6600/6800/6900. They look the same, but there may be a couple of gotchas I can fix.

author: Roman oh
author_rank: Regular Contributor
timestamp: March 25, 2021, 12:02:00 am
content: I've been reading through this thread with interest (thank you everyone who has contributed!), having recently bought a new 1104X-E (and made it into a 1204X-E with all options - thanks also to those people!) and having ordered an FY6900.So I have a simple question, the answer to which is clearly inferable from this thread, but not stated anywhere I can see - which suggests there may be something I am missing.It appears from this thread that communication between the CRO and the FY6900 is via WiFi. My Siglent manual clearly states that the AWG connects via USB, and doesn't suggest any options.What am I missing? Where does the magic happen?

author: rf-loop
author_rank: Super Contributor
timestamp: March 25, 2021, 07:51:36 am
content: Quote from: Roman oh on March 25, 2021, 12:02:00 amWhat are missing. You have missed to read the User manual.Here attached, rest you find yourself.If you have old User manual, first update it.https://www.siglenteu.com/download/10068/

author: Roman oh
author_rank: Regular Contributor
timestamp: March 25, 2021, 08:27:09 am
content: Thanks, rf-loop, the manual you pointed at UM0101E-05A is a lot more comprehensive than the one I downloaded (-03A) from the Siglent site when I received my CRO just three months ago. Never imagined that the versions would move so fast. The old version doesn’t mention this configuration function, but of course the new one does.So now I know ...Thanks again.I love this site and really appreciate all the help you guys give!EDIT: I've spent a bit of time looking more closely at both versions of the manual. The bit about WiFi connection to the AWG is indeed in the "old" manual, in the section called "Bode Plot" (replaced in the "new" manual with a more comprehensive "Bode Plot II"). In both manuals, however, the preamble to the AWG section still refers to USB only. So you were correct, I simply didn't read hard enough!But one significant difference I did find is that the new manual drops the (OT - unrelated to AWG) statement "SDS1000X-E has full BW with all V/div settings including 500uV/div to 2mV/div." Off to look at other threads to see what this is about....Edit#2: Ah, so I was kinda wrong and kinda right after all. It seems that WiFi connection to the AWG is only available for BodeII, and the manual is correct. The "broader" AWG functionality appears to require the AWG connection via USB, otherwise the AWG simply isn't detected and the AWG menu button is greyed out. I guess this is mentioned somewhere above...sorry for the repeat, if so.

author: mTron47
author_rank: Newbie
timestamp: May 07, 2021, 02:47:02 pm
content: This being my first post I say Hi to everyoneAnd many thanks to all contributors to this helpful, inspiring, awesome thread.It did help me connect my time-proven "Synthesized Function Generator" DS345 built by Stanford Research Systems some time in the Nineties to my newly acquired Siglent SDS1104X-E for doing Bode Plots.I used an ESP32 which I am familiar with, and took BlackICE's port (post #97 - Thanks, also to MrTick!) as a starting point. I wrote a class cds345 in which I put all the specifics of the DS345 generator. Some minor modifications to the functionhandleWriteMsg()in file esp_parser.cpp were necessary and the correction of a bug in functionsendReadResponse()in file esp_network.cpp which led to heap corruption from time to time. So everything seems to work now and might be a starting point for other generator types beyond FX6800, FY6900 and DS345.Usually I do controller software development using Platformio which has a much more sophisticated user interface compared to the classic Arduino IDE. The differences in code are minimal - e.g. an additional line#include <Arduino.h>is necessary. So this should not be a significant obstacle to understandability.This said, I want to share my little contribution with you, but I don't know how.I do not have a github account. Any suggestions?

author: DEV001
author_rank: Contributor
timestamp: May 07, 2021, 05:51:48 pm
content: I believe Github would be the best medium to use for sharing your code and it is pretty easy to sign up. Once you sign up, you create a new 'repository' via the + in the right corner of their site and upload the files. You can use their web interface and drag and drop the files into a git repository directly.If you don't want to upload it to Github you can attach a zip archive of the source to a post here as well.https://docs.github.com/en/github/managing-files-in-a-repository/adding-a-file-to-a-repositoryhttps://github.blog/2016-02-18-upload-files-to-your-repositories/

author: mTron47
author_rank: Newbie
timestamp: May 08, 2021, 09:11:16 am
content: @DEV001: Thank you for your help.So here comes a zip-file to the entire project linking an SDS1*04X-E scope to an SRS signal generator DS345. Included is the file platformio.ini defining the build process under Platformio.If you prefer the classic Arduino environment, just copy all files (without platformio.ini) from all subdirectories into a new directory esp32Bode, then rename esp32Bode.cpp into esp32Bode.ino. That's it!

author: Roman oh
author_rank: Regular Contributor
timestamp: May 31, 2021, 02:16:07 pm
content: I am struggling to get the Bode plot thing happening with a Siglent 1104X-E and FY6900. The software is running OK on an ESP8266; CRO reports successful connection to AWG, and pumps out the messages I would expect as observed on the Serial out of the ESP8266 (although it appears to send each message twice??).But the 6900 does not respond to the message stream when it's connected to the Rx pin on the 8 pin connector on the back panel. I can "see" the traffic with a CRO, so it's definitely there. When I send messages manually (using PuTTY) to the 6900 via its USB connector, it responds correctly. When I send those same messages in via the RxD and TxD pins on the back panel (using USB to serial converter) there is no response from the 6900.The circuit diagram appears to show a CH340G with its RxD and TxD lines simply wire-OR'ed with the back panel connections (using limiting resistors) but does not show any connection between this circuit element and the FY6900's "processor" FPGA. Since the USB is working, I guess the CH340 is OK, and beyond that it's just a couple of resistors.Tomorrow I'll open the box - AGAIN! - and check those resistors, but I think it's far more likely to be something trivial I've overlooked.Can anyone help?

author: UniSoft
author_rank: Frequent Contributor
timestamp: May 31, 2021, 06:20:30 pm
content: Quote from: Roman oh on May 31, 2021, 02:16:07 pmI had the similar problem...RxD and TxD goes to MCU (4pin cable)Now they use CH340N, it looks like this shit IC makes LOW level (i.e. ground) on signal pins (when USB not connected)...so you just simple get resistor divider by 2!!!So instead of 3.3V signals there was less than 1.6V, what was not enough for MCU and therefore it not respond.

author: Roman oh
author_rank: Regular Contributor
timestamp: June 01, 2021, 12:26:38 am
content: Thanks, unisoft. I didn’t get that the MCU was actually on the front panel pcb. That helps a lot. I know what to do now, I think. Did you find a fix?

author: UniSoft
author_rank: Frequent Contributor
timestamp: June 02, 2021, 07:34:12 pm
content: Quote from: Roman oh on June 01, 2021, 12:26:38 amI just reduced the resistance of the resistors coming from the TTL connector ...

author: Roman oh
author_rank: Regular Contributor
timestamp: June 03, 2021, 12:02:24 pm
content: Yes, it’s clearly a (nother!) design fault. They have a 2K2 resistor at R20 (unnecessarily) isolating the CH340 Tx pin instead of at R19 isolating the Rx pin, so the input on the TTL connector sees a 300 ohm to 300 ohm divider, instead of a 300 into 2200, which would have worked. The simplest “fix” would be to swap R19 and R20. However, their design also feeds nominal 5V to the 3.3v MCU and appears to rely on the resistors to limit the current into the MCU pin. The MCU has had its ID ground off, so I can’t know whether the inputs are 5V tolerant; the voltage at the pin is about 3.9v which is one diode drop above the 3.3V rail. Don’t know if this is good or bad.I went a bit more complex and made up a simple 4-transistor 3-input gate/level-shifter (I want a 3rd input because I envisage putting the 8266 inside the box, and may want to also “play” with the TTL inputs some time.All working now.

author: Geeboh
author_rank: Newbie
timestamp: October 13, 2021, 09:08:05 pm
content: Hi guys, After following this thread including Mr. tick's esp01 bode plot github code.Problem :When trying to hook up my 1104x-e to fy6900 via ESP01s, my scope will gone completely freeze while attempt connect with the ESP01 and in the same time the ESP01 also will restart in this process.Until now i try so many things get it work even personally pm mr tick through youtube and yet seems that i cant find the solution.Anyone here can guide me on how to connect esp01 with 1104x-e.Thank you in advance

author: duckman
author_rank: Newbie
timestamp: January 11, 2022, 08:16:12 pm
content: I found the cause and solution to the problem.You have to downgrade esp8266 boards library to 2.7.4.I had installed the 3.0.1 library which caused erroneous writing to the esp8266 memory. Now everything works as it should😁

author: cncjerry
author_rank: Unknown
timestamp: January 14, 2022, 05:55:12 pm
content: If I understand the architecture of the code correctly, if I wanted to add an HP GPIB device to the drivers, I would copy one of your drivers, change the serial interface (to the signal generator) to for instance, PYGPIB or VISAPY (can't remember what it is called) and then translate the commands in the class to the correct output over GPIB?I was thinking of just coding the VXI using VISA in VB.net but this would be easier.ThanksJerry

author: cncjerry
author_rank: Unknown
timestamp: January 15, 2022, 09:09:25 am
content: I read thru the code and it looks like I can use PYGPIB and/or PYVISA in the awg driver but I can't get either working on this one machine. I have another exactly like it, in fact I cloned this one to make the other, both are dual socket with 32GB of memory, etc, and it works fine, go figure, this one wont open GPIB devices no matter how many time I reinstall, etc. Looking at the awg driver, I wrote a function in vb.net that sends commands to the HP8904 generator through a console application. So the awg driver will call the console app until I get PYVISA working on this machine.I'd like to note for those following this project that the author wrote a ton of code for this application. The OP did a very complete job, all the class functions seem clean and simple and adding the driver concept so that you can call a specific driver for each external generator makes it expandable.Thanks!Jerry

author: cncjerry
author_rank: Unknown
timestamp: January 16, 2022, 01:07:40 am
content: I wrote the basic driver for the hp8904. I have a few errors, one I bypassed having to do with checking the class of the driver. I thought I set that up correctly in awg_factory.py having followed the example.The code then sits waiting for a bind request from the scope. When I hit run/stop or connection test, the PC code gets the request but then fails:Code:Incoming connection from 192.168.165.128:43969.Traceback (most recent call last):File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\bode.py", line 50, in <module>server.start()File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\awg_server.py", line 104, in startself.main_loop()File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\awg_server.py", line 115, in main_loopres = self.process_rpcbind_request()File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\awg_server.py", line 135, in process_rpcbind_requestprocedure = self.bytes_to_uint(rx_data[0x18:0x1c])File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\awg_server.py", line 353, in bytes_to_uintnum = ord(bytes_seq)TypeError: ord() expected string of length 1, but int foundThe code looks like it is expecting a port address there. I dumped the rx_data and it is port 3 (00000003) as expected. I have a feeling the bytes_to_uint function might be working differently under windows. I also looked at the next statement where it checks if the data is coming from VXI-11 Core (395183) and that data looks correct 0607af. I changed the function instead of (ord( to ord(chr(as in num = ord(chr(bytes_seq)) and got past that error and it is now trying to send the bind response and having the inverse of that problem building the reply into bytes.I could recode it but I don't know python all that well and would hate to have to change everything when one simple config change is all it needs.If there is an interest in fixing this, I'll get the code running for the HP8904 and a few other HP generators that I have. I ordered a 1032x but it would be nice to have the HP8904 running as it is a decent, multichannel generator with a relatively clean output.I think getting past the bind is pretty key. This is running under windows, by the way. I communicate to the 8904 with gpib using a console application that just funnels the translated commands to it.ThanksJerry

author: cncjerry
author_rank: Unknown
timestamp: January 16, 2022, 10:08:18 am
content: For those, if any, whoare interested, this is a great foundation for using non Siglent generators. The primary issue though, is using it on windows and specifically, using python3. Python3 has a number of explicit changes, and in addition to having to change all the print statements, byte arrays and strings that were somewhat the same prior to python3 now throw errors when they are concatenated using the "+" sign. Again, python isnt my first language, but I got it working to the point where it has to reply to the ID request. This is one of the responses that has a string embedded in byte arrays (e.g. the ID of the siglent generator it spoofs) so I have to look at it more closely or just hard code all the responses since after that they are just null.Bottom line is that I havent given up. I figure once i get this HP8904 working it will be a nice setup for audio work. I've used it in the past with my distortion analyzer as they are compatible. I have 4 or 5 HP generators for which I can write gpib drivers.But since the scope is just measuring the voltage during a sweep, one could just as easily send gpib commands to the generator, query the scope and just dump the data into excel. I was impressed with RF-loop's bode dissertation though, enough to order a sdg1032x.More to come.Jerry

author: 2N3055
author_rank: Super Contributor
timestamp: January 16, 2022, 10:46:43 am
content: Quote from: cncjerry on January 16, 2022, 10:08:18 amYeah, FRA from Siglent (the one in the scope that you use with Siglent AWG) isnot only measuring voltage.It's a hell of a lot more complicated than that.So if you can make a gateway device that will make 3rd party gen properly respond to commands from scope and make it properly emulate Siglent AWG then you're good.Otherwise it will be easier just to buy cheapest Siglent AWG than to write proper FRA application..

author: cncjerry
author_rank: Unknown
timestamp: January 16, 2022, 11:38:41 pm
content: so I went back and installed python2.7.18 on my windows machine after playing with linux all day.Test connection is successful and the commands come over when I press run. I just have to clean-up some of the HP8904 command conversions to set the amplitude and frequency.Pretty cool. I wish I would have just install python 2.7 prior to ordering the SDG1032x, ha!I'll post the HP8904 code after I clean it up. Then I am going to do my 8648D, 8350, and a couple others I have as they all use the same gpib format and the commands are close.Jerry

author: cncjerry
author_rank: Unknown
timestamp: January 20, 2022, 05:23:48 am
content: update:I have both the HP8648 and HP8904 working thru gpib. It's a little tricky because I had to use a VP.Net console program to drive the GPIB until I get PYGPIB or PYVISA working on this stupid machine that just refuses to work...I then started thinking about this little AD9910 generator I have that sits on an Arduino Mega2560 as a shield. There are a bunch out there made by "GRA&AFCH" originally. The AD9910 is very clean for a DDS with ≤ −125 dBc/Hz @ 1 kHz offset (400 MHz carrier) and 80dB SFDR. The nice thing about it is that it is small and can run off USB. It only has +4dBm output so it needs an amp on it. I also had to change the code so that it took a 10Mhz reference as an input.I have a 1032x coming and I am going to try to trace the USB setup and commands, most likely it presents as an HID compliant device and I've coded that before. But in the meantime, the AD9910 board I have can connect to the OP's code as a serial device using a VCP. The AD9910 board didn't have serial commands until I just added them. I only added Frequency and Amplitude, On and Off as I think that is pretty much all the scope sends of importance.If anyone is interested in any of this, drop me a PM.Jerry

author: tautech
author_rank: Super Contributor
timestamp: January 20, 2022, 06:38:42 am
content: Quote from: cncjerry on January 20, 2022, 05:23:48 amLooking forward to the comparison Bode plot screenshots from your 4 signal sources.

author: cncjerry
author_rank: Unknown
timestamp: January 20, 2022, 08:20:38 am
content: It will be interesting to see how the much source impacts the plot. I didnt think of running a comparison.The source I`m excited about is that little DDS board. It generates clean signals up to at least 1Gig. I have a few broadband amps I can use after it and then I can make the power adjustment in the driver ( for the amp). I plan to make a box with a splitter in it to have the dual outputs for phase. Sort of like the external box they sell. I'm not suggesting this board as an alternative, but if you have it, I think it will, work great as a source.Jerry

author: cncjerry
author_rank: Unknown
timestamp: January 21, 2022, 06:28:27 pm
content: Here's some interesting findings, at least to me. I was measuring a Microchip SLP-27+ DC low pass filter used on the references for my phase noise measuring system.The AD9910 seems to have a level issue below 10Mhz. I have to look into that. I know it is transformer coupled. So in order to use it for this application it would need to have an amp and lookup table that would be written into the driver. Then again, it only costs around $110, but it is a very clean DDS.I also had to add a 1 second delay between frequency changes, maybe it can be reduced with faster serial settings, I was using 115200.I then ran it using and HP8648C. You can see the output on the low end of the amplitude scale is pretty flat. I tried it with and without a delay in the code, without much change, if any:And with a delay.Sorry, the images are sequentially listed below. Don't know why they didn't insert.My SDS1032x comes tomorrow and I'll try that out as well.

author: cncjerry
author_rank: Unknown
timestamp: January 21, 2022, 06:45:31 pm
content: Here's something I don't understand. If you check above, the image from the 8648c is pretty flat across, slightly above 29dB.I ran it again and now it is displaying as slightly above 26dB yet the voltage, as displayed on the line above the buttons, is roughly the same as the previous run, ~735mv.Any idea what would be causing this? Nothing changed, just went out and back into the Bode plot function.

author: SMB784
author_rank: Frequent Contributor
timestamp: January 21, 2022, 06:54:42 pm
content: Has anyone tried to do Bode plotting with a Rigol DG811/DG992? Is it feasible?

author: puterboy
author_rank: Regular Contributor
timestamp: February 21, 2022, 02:38:19 pm
content: Wondering whether it would be possible to rewrite the code in say bash script and then run the code directly on a rooted Siglent 1104.The reason I say bash is so as not to have to load python and all its libraries and dependencies in the Siglent flash -- and while kludgy, bash is pretty powerful as a scripting language.If so, then presumably the code could be written to Siglent flash, triggered from a web page and then you would just need a USB cable from the Siglent to the external signal generator.This would make it as good (presumably) as the native version that controls a Siglent AWG.

author: 2N3055
author_rank: Super Contributor
timestamp: February 21, 2022, 04:27:35 pm
content: Quote from: puterboy on February 21, 2022, 02:38:19 pmSounds cool but:how do you connect from scope to that internal service? TCP/IP ?Over loopback? On same 111 and 5024 and 5025 ports scope is already using for itself?Why do all that crap to the scope when RaspberyPi is so cheap? It makes no sense to me...

author: puterboy
author_rank: Regular Contributor
timestamp: February 22, 2022, 05:33:15 pm
content: Quote from: 2N3055 on February 21, 2022, 04:27:35 pmI already have a Raspberry Pi Zero connected (and I power it from the my FY6900 signal generator using the pins on the back that give 5v & ground output).Why? Because it would be a cool hack and would eliminate the need for another piece of hardware and cables.

author: masterx81
author_rank: Frequent Contributor
timestamp: February 22, 2022, 05:48:38 pm
content: I'm doing it with an esp01 module placed on the back of the FY6900, powered from the AWG. I think that a Rasp.Pi is a bit an overkill for that task.

author: 2N3055
author_rank: Super Contributor
timestamp: February 22, 2022, 05:58:17 pm
content: Quote from: puterboy on February 22, 2022, 05:33:15 pmYour scope is already using same TCP ports for scope remote control...

author: puterboy
author_rank: Regular Contributor
timestamp: February 23, 2022, 10:52:50 pm
content: Quote from: masterx81 on February 22, 2022, 05:48:38 pmWell I already have a (small) RPI Zero powered off the back of my FY9600 that I use to create a USB over Ethernet -- which allows me to remote control from a distance. So I could use the same RPI to also do Bode plots...

author: ceut
author_rank: Regular Contributor
timestamp: April 22, 2022, 03:18:54 pm
content: Hello everyoneAfter having bought a SDS1104X-E (with some advices from Tautech I thanks) I found this topic.So I have bought an EPS8266 with an USB programmer.I have never used this little card, even never heard of it(in France, I find that we are a little too late with technology, and it is getting worse)So after flashing the ESP Bode, my ESP8266 is connected successfully to my Asus router (merlin fw) in client mode, I have put it in DHCP and get the IP in the AsusBut I was having freezes with my brand new DSO many times, until I saw @duckman post, so I downgrade the library to 2.7.4 and no freeze at all now , thanks !The only problem is that I have a JDS6600, and I think the command translation is not for this AWG..Because my Siglent tries to do some graphics but the JDS doesn't change its outputSo I would like to know if someone has modded the ESPBode to be compatible with the JDS command ?Thanks !

author: ExHamHack
author_rank: Newbie
timestamp: May 12, 2022, 02:33:28 am
content: Hi cent,I have done some work getting this to work with a JDS2800. I suspect it may have a similar command structure to the JDS6600. It is not perfect and my coding ability is not great. I have it working, however I do get a few glitches occasionally. I suspect the JDS2800 gets overrun with the commands some times and misses one every so often, may be local network related too. I Let it run a couple of times and I usually get a clean sweep.In my situation I needed a fixed IP address and a pull up resistor on the ESP8266 module Tx pin.If you point a web browser at the module IP address you should be able to see if it is working and what it is outputting even if its not compatible with your WaveGenI have posted my updates to a Github fork athttps://github.com/Hamhackin/espBode/blob/master/JDS2800.md, it follow work done by others SQ6SFO and TimKoers.

author: ceut
author_rank: Regular Contributor
timestamp: May 15, 2022, 09:25:37 am
content: Quote from: ExHamHack on May 12, 2022, 02:33:28 amHello,Thank you very much for your work !I will try this later this day, as I have removed ESP and all from my JDSEdit: I have compared your "esp_jds2800.cpp" and the JDS6600 Communication Protocol PDF: it seems you have rightAll commands starts with "w" and a number to, then, set the right valueWill post the resultEdit2: It works !My JDS6600 seems to receive the good command, I have checked the voltage in Vpp and Vrms mode, and also frequencyIt seems that this happens at about 1 time per second ?Now I have to learn how to use it correctly and try to check a Focal speaker filterAlso, I have not find any webserver on the ESP IP, so I don't know how to check the output ?

author: ceut
author_rank: Regular Contributor
timestamp: May 17, 2022, 08:38:50 pm
content: Here is my integration on the back of my JDS6600.My router is at about 4 meters, but the signal is weak, the integrated antenna is very small, I think I have to mod that nowMaybe some of you have some (simple) ideas for modding this little PCB antenna ?Edit: I have switched my wifi to channel 13 and I have a lot better response from the ESP now(from the ping cmd)I will check but I think I don't have to mod the antenna now

author: ganevson
author_rank: Contributor
timestamp: November 09, 2022, 07:40:29 pm
content: HelloDoes anyone have experience with a Bode plot between the SDS1104X-E and the PSG9080?Thanks

author: NickKUK
author_rank: Contributor
timestamp: November 10, 2022, 12:38:57 pm
content: Hi,I have used the 1104x-e bode plot with a standard Apple Mac mini phono jack before using a software AWG I wrote as an extension to a GitHub python project. I've dug out the python code and attached to the post. I suspect the same mechanism can be used to connect to any sound card and let the scope control the pitch (sorry no amplitude or other swanky features). On the Mac mini 2019 this worked from 5Hz to 20KHz before the active filters hit the sound.I've since got a SDG1032X hacked to 60MHz so I've not used it for a bit.

author: OsciX
author_rank: Contributor
timestamp: January 17, 2023, 02:06:56 am
content: Do you think that support for the Sony/Tektronix AWG2021 can be added? I understand this is a bit older than some of the generators here, so I'm mainly wondering if it's *technically* possible. I've done a fair bit of SCPI, and I wouldn't mind forking it to add my function generator

author: istvan
author_rank: Newbie
timestamp: April 29, 2023, 06:32:10 pm
content: Hello, I read your post, I also have a jds6600 signal generator, and a siglent sds 2202x-e oscilloscope, I try to write the sketch on esp=01 (esp8266) via usb programmer, but every time a compilation error appears. can you help me, I don't know where I'm going wrong. how did you proceed step by step I'm not familiar with programming and I don't know where I'm going wrong. I followed the steps posted by Timhere is massage: In file included from C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\esp_parser.h:5,from C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\esp_network.cpp:4:C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\esp_fy6800.h:91:8: warning: extra tokens at end of #endif directive [-Wendif-labels]91 | #endif _ESP_FY6800_H_| ^~~~~~~~~~~~~~In file included from C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\espBode.ino:4:C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\esp_fy6800.h:91:8: warning: extra tokens at end of #endif directive [-Wendif-labels]91 | #endif _ESP_FY6800_H_| ^~~~~~~~~~~~~~C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\espBode.ino: In function 'void loop()':C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\espBode.ino:54:43: warning: 'WiFiClient WiFiServer::available(uint8_t*)' is deprecated: Renamed to accept(). [-Wdeprecated-declarations]54 | rpc_client = rpc_server.available();| ^In file included from C:\Users\dell\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WiFi\src/ESP8266WiFi.h:40,from C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\espBode.ino:1:C:\Users\dell\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WiFi\src/WiFiServer.h:85:14: note: declared here85 | WiFiClient available(uint8_t* status = NULL) __attribute__((deprecated("Renamed to accept().")));| ^~~~~~~~~C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\espBode.ino:64:43: warning: 'WiFiClient WiFiServer::available(uint8_t*)' is deprecated: Renamed to accept(). [-Wdeprecated-declarations]64 | lxi_client = lxi_server.available();| ^In file included from C:\Users\dell\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WiFi\src/ESP8266WiFi.h:40,from C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\espBode.ino:1:C:\Users\dell\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WiFi\src/WiFiServer.h:85:14: note: declared here85 | WiFiClient available(uint8_t* status = NULL) __attribute__((deprecated("Renamed to accept().")));| ^~~~~~~~~C:\Users\dell\Downloads\espBode-master (1)\espBode-master\espBode\esp_network.cpp: In function 'uint8_t handleVxi11(uint8_t*, WiFiClient)':esp_network.cpp:222:1: error: control reaches end of non-void function [-Werror=return-type]222 | }| ^cc1plus.exe: some warnings being treated as errorsexit status 1control reaches end of non-void function [-Werror=return-type]

author: jemarro12
author_rank: Contributor
timestamp: October 16, 2023, 07:26:30 pm
content: As some users said previously, i'd like to use RIGOL DG911 as AWG.I know some basic C from the programming course in University but certainly i´m really lost in pthon.Could a more advanced programmer if it will be possible nor difficult to do that?Thanks guys!

author: switchleg
author_rank: Newbie
timestamp: December 06, 2023, 12:32:37 am
content: For anyone using a JDS6600 I have fixed the 0hz bug where the AWG does not take the desired frequency causing spikes in the bode plot. Also supports ESP32 boards.https://github.com/Switchleg1/espBode

author: bigpriap
author_rank: Newbie
timestamp: February 08, 2024, 08:27:09 pm
content: [ Specified attachment is not available ] [ Specified attachment is not available ] If you are like me, attracted by the idea of controlling FY6900-60M with Siglent,, as many succeeded,beware of the new models!bought one SDS1104X-E SW V 6.1.37R10, Uboot-OS V 8.3, FPGA V 2021-11-08 HW V 09-06 and one FeelElec FY6900-60M Version V1 .5 .5 .1. 3.I tried many versions of the espbode codes from Github, none works. Voltage settings are OK but if I set frequency, to say, 28Hz on Siglent the AWG is interpreting as 20 Mhz! So I can only run Bode plots betewwn 1 to 60 MHz., not exactly audio domain 😊I believe is the same problem as I read about FY6900-100M, maybe a frequency digit more that its not backward compatible. I was trying to divide the frequency output on ESP sketch with no results. I am not good enough to modify the software without help but I am ready to test any ideas. Thank you.P.S. Using the code posted in the previous post by by: switchleg decimals works, so maybe THIS IS THE WAY. Thank U @by: switchleg!

author: switchleg
author_rank: Newbie
timestamp: February 28, 2024, 04:16:51 pm
content: You are very welcome. Yes, I fixed multiple bugs and cleaned up the code a bit.

author: bateau020
author_rank: Frequent Contributor
timestamp: May 01, 2024, 02:02:31 pm
content: The SDS800X-HD (SDS804X-HD/SDS814X-HD/SDS824X-HD) changed the initialization phase (uses UDP instead of TCP for the port mapping phase, and requires VXI port changes), and as a result, the original script does not work on that scope.In case you "upgraded" your scope and still want to use the script, see my repohttps://github.com/hb020/sds1004x_bode/I based my fork on the work from Don Becker, and went from there. It includes the following improvements:* Python 3 migration (Python 2 is dead)* AD9910 Arduino Shield (thanks Don Becker)* Rigol DG800/DG900 series AWGs over Ethernet or USB. In theory, you might even be able use this implementation to connect to other Ethernet or USB connected SCPI 1992.0 standard compatible devices.* Unit-T Uni-Trend UTG1000x (thanks alfredfo) (since 2024-06-27)* more Feeltech FY devices (since 2024-08-25), and support for the newer fy6900 models (since 2024-09-14)* multiple small bug repairs* better VISA compliance. Now this script can be used as a VISA compatible front-end to the AWGs (faking a Siglent AWG), independently from a Siglent scope* (much) better logging controlOpened a PR into the original repo.EDIT: updated to latest content, since I got a PR on my fork. Will keep doing so if/when they arrive, and will add dates.

author: Knutselaar
author_rank: Newbie
timestamp: May 25, 2024, 06:06:28 pm
content: Hi All,This is my first post of EEVblog, and I thank everybody for the real work they have done to make this possible.I have only been shopping here, combined all and made some minor changes.I've been struggeling with connecting FY6900 SWVersion 1.5.5.1.3 (delivered nov 2023) to my SDS1104X-E SWVersion 6.1.37R10 (delivered may 2024):The result of my struggle:I use the espBode-master date 08-12-2020I had to add ESP_Telnet to my libraryI use in the Arduino IDE: the library ESP8266 by ESP8266 community version 2.7.4In SDS1104X-E Utility--page2/4--I/O--IP Set-- DHCP DisabledI have discovered that the SDS1104X-E only remembers the first 9 charachters of the WiFi PSK after power down!I use the TL-WN725N WiFi adapter from TP-LINK for my SDA1104X-E, the WiFi signal must be strong, otherwise you have no steady connection!I use a 3V3 regulator in my adapter between the ESP01S and FY6900. The uP in de FY6900 has a 3V3 interface. The CH340 has also a 3V3 interface.In my FY6900 the resistors between CH340 and TTL connector and uP are:R30 and R32 are 300 Ohm between TTL and uP, R19 and R20 are 2k between CH340 an uP, no need to change!In esp_config.h change:*******************************************************************#define WIFI_MODE_AP//#define WIFI_MODE_CLIENT/* WiFi credentials */#define WIFI_SSID "wlan_ssid"#define WIFI_PSK "wlan_key"/* Comment this for DHCP. However you'll need to obtain IP somehow. */#define STATIC_IP*******************************************************************Into*******************************************************************//#define WIFI_MODE_AP#define WIFI_MODE_CLIENT/* WiFi credentials */#define WIFI_SSID "Your_wlan_ssid"#define WIFI_PSK "Your_wlan_key"// no more than 9 charachters, otherwise you have to change your password of your network first/* Comment this for DHCP. However you'll need to obtain IP somehow. *///#define STATIC_IP*******************************************************************The compilerfault:esp_network.cpp:222:1: error: control reaches end of non-void function [-Werror=return-type]222 | }I inserted quick and dirty an extra line with return 0; in the file esp_network.cpp at line 222, and had no problems afterwards.Original code: in file "esp_network.cpp" at end of function: "uint8_t handleVxi11(uint8_t *packet, WiFiClient client)"*******************************************************************client.write((uint8_t*)&write_response, sizeof(rcpresp_devReadWrite));return 0;break;}}*******************************************************************Inserted line with return 0; at line 222:*******************************************************************client.write((uint8_t*)&write_response, sizeof(rcpresp_devReadWrite));return 0;break;}return 0;}*******************************************************************The problem of frequency adjustment in the new FY6900 60MHz mentioned by bigpriap a few posts back:I have changed in esp_fy6900.cpp line 64 and 73 fromsnprintf(command, 19, "WMF%08lu000000\n", frequency);Intosnprintf(command, 19, "WMF%08lu\n", frequency);In order to see the IP adress of your ESP01S you have to remove the slashes on line 56 of esp_config.h//#define DEBUG_PRINTSbecomes:#define DEBUG_PRINTSCompile and write to the ESP01SStart the EPS01S an look at the Serial monitor.After reading and writing down the IP adress (to be used in the bode plot-menu of the SDS1104X-E), put the slashes back://#define DEBUG_PRINTSand compile and write to the ESP01S and the ESP01S is ready to be used.Ik hope that this information helps others to get it working.

author: Knutselaar
author_rank: Newbie
timestamp: May 29, 2024, 08:38:46 pm
content: Some improvements:I have encountered loss of connection on a following day.I checked the IP-adress of the ISP01S and it was different than the day before.So I changed to static IP-adress in the ESP01S in "esp_config.h":The choice for "192.168.0.155" is because the network gives IP-adresses upwards from"192.168.0.100", so 155 is not likely to have double IP's in a home network.****************************************************#define STATIC_IP/* Static ip configuration */#ifdef STATIC_IP#define ESP_IP 192,168,0,155 // 192,168,0,??? is equal to your network#define ESP_MASK 255,255,255,0#define ESP_GW 192,168,0,0 // 192,168,0,??? is equal to your network#endif****************************************************Above changes are implemenred in the new espBode-master.ZIP file below.Also in the SDS1104X-E I swiched DHCP Off and set the static IP-adress to 192.168.0.150I have the Amplitude and Frequency of CH2 coupled to CH1.The SDS1104X-E sends every frequency command twice to CH1, I stopped the second message.I also added the driver for the FY3224S as signal generator for the bode plot.Here are the schematic of the ESP01S coupled to the FY3224S and the source-files espBode-master.

author: Knutselaar
author_rank: Newbie
timestamp: May 29, 2024, 08:43:39 pm
content: Second attempt attatchment espBode-master.zip

author: awakephd
author_rank: Regular Contributor
timestamp: August 29, 2024, 01:27:18 pm
content: I realize this is a very late response, and I may be about to "teach grandma to suck eggs" as the saying goes (tell you what you already know) ... apologies if that is the case.On choosing an IP address - Knutselaar suggests 192.168.0.155, with the idea that 155 is unlikely to be taken. This is probably going to work most of the time, assuming one's wifi router is set to start addresses at 192.168.0.100 ... but there is a better way: Most (nearly all?) wifi routers will allow you to reserve IP addresses, generally by MAC. Once reserved, you can be confident that no other device will receive that IP address from the router.Again, I apologize if I am repeating the obvious / mansplaining / etc.!

author: das_strobel
author_rank: Contributor
timestamp: September 06, 2024, 10:14:43 am
content: Quote from: bateau020 on May 01, 2024, 02:02:31 pmThanks for this work. I cloned your repo and tried it with my brand new SDS1000X HD and my old Rigol DG1062Z (predecessor of the DG800 series) and it works beautifully using "dg800" for the awg parameter. So again: Great work!I few small comments:I'm using Ubuntu 22.04 LTS and the lates Python available from the default repos is 3.11, default is 3.10. You have a few debug strings that use the relaxed f-format syntax from 3.12. This unnecessarily breaks the script for the older versions. I fixed it on my side (it is just replacing a few double quotes with single quotes) and then everything works. I'd suggest you might want to change this to make the script more compatible. I can provide you a PR to your repo if you wish.There is way of running this script without sudo, which enabled me to use the debugger on the script in vscode without running the whole vscode as root:Code:sudo setcap 'CAP_NET_BIND_SERVICE+ep' /bin/python3.10Downside is this enables all python instances to be able to serve privileged ports... But I found this more convenient for debugging.The final comment will probably only apply to very few people but I wanted to share my findings. Maybe it helps somebody. I got this error message when I started the script:Code:Traceback (most recent call last):File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_mainreturn _run_code(code, main_globals, None,File "/usr/lib/python3.10/runpy.py", line 86, in _run_codeexec(code, run_globals)[...]File ".../sds1004x_bode/sds1004x_bode/awg_server.py", line 88, in create_socketsock.bind((host, port))OSError: [Errno 98] Address already in useThis was due to the fact that on my Linux machine rpcbind was running which is needed by nfs.server. After temporarily stopping it using the commandCode:sudo systemctl stop rpcbind.socket rpcbind.servicethe script finally worked. Rpcbind can be started again withCode:sudo systemctl start rpcbind.socket rpcbind.service

author: bateau020
author_rank: Frequent Contributor
timestamp: September 06, 2024, 10:20:47 am
content: Quote from: das_strobel on September 06, 2024, 10:14:43 amThanks for the heads up. I will add the proposed changes and comments to the repo. A PR would be best, but I will try to reproduce, since it seems easy to do.

author: das_strobel
author_rank: Contributor
timestamp: September 06, 2024, 10:52:11 am
content: Quote from: bateau020 on September 06, 2024, 10:20:47 amTo spare you some work here is the git diffCode:$ git diffdiff --git a/sds1004x_bode/awg_server.py b/sds1004x_bode/awg_server.pyindex 59b1958..b8aea46 100644--- a/sds1004x_bode/awg_server.py+++ b/sds1004x_bode/awg_server.py@@ -101,7 +101,7 @@ class AwgServer(object):print("Starting AWG server...")print(f"Listening on {self.host}")- print(f"RPCBIND on {"UDP" if self.portmap_on_udp else "TCP"} port {self.rpcbind_port}")+ print(f"RPCBIND on {'UDP' if self.portmap_on_udp else 'TCP'} port {self.rpcbind_port}")print(f"VXI-11 on TCP port {self.vxi11_port}")print("Creating sockets...")diff --git a/sds1004x_bode/awgdrivers/dg800.py b/sds1004x_bode/awgdrivers/dg800.pyindex 0db9c19..3b60f0e 100644--- a/sds1004x_bode/awgdrivers/dg800.py+++ b/sds1004x_bode/awgdrivers/dg800.py@@ -26,6 +26,7 @@ WAVEFORM_COMMANDS = {# Default AWG settingsDEFAULT_LOAD = 50DEFAULT_OUTPUT_ON = False+DEBUG_OUT = Trueclass RigolDG800(BaseAWG):@@ -100,7 +101,7 @@ class RigolDG800(BaseAWG):self.enable_output(2, on)else:self.channel_on[channel - 1] = on- self._send_command(f":OUTPUT{channel}:STATE {"ON" if on else "OFF"}")+ self._send_command(f":OUTPUT{channel}:STATE {'ON' if on else 'OFF'}")def set_frequency(self, channel: int, freq: float):if DEBUG_OUT:diff --git a/sds1004x_bode/awgdrivers/utg1000x.py b/sds1004x_bode/awgdrivers/utg1000x.pyindex b0437be..96af648 100644--- a/sds1004x_bode/awgdrivers/utg1000x.py+++ b/sds1004x_bode/awgdrivers/utg1000x.py@@ -100,7 +100,7 @@ class UTG1000x(BaseAWG):self.enable_output(2, on)else:self.channel_on[channel - 1] = on- self._send_command(f":CHAN{channel}:OUTPUT {"ON" if on else "OFF"}")+ self._send_command(f":CHAN{channel}:OUTPUT {'ON' if on else 'OFF'}")def set_frequency(self, channel: int, freq: float):if DEBUG_OUT:

author: bateau020
author_rank: Frequent Contributor
timestamp: September 06, 2024, 11:25:28 am
content: Done. Added some better debugging in the port opening. Tested under Python 3.8. and later.

author: awakephd
author_rank: Regular Contributor
timestamp: September 11, 2024, 10:48:06 pm
content: I have just gotten a FeelTech FY6900-60M (running firmware version 1.5.4), and was eager to try connecting it to my SDS804X-HD scope using either of the methods discussed in this thread. I first tried the espBode route, making a simple adapter board to connect to the TTL power and serial connector on the back. I downloaded Knutselaar's code, as it seemed to be the most recent (and has a recent success) and uploaded it to an ESP-01 using the Arduino IDE with no problems. I then connected it to the FY6900. I am getting the 3.3v power out of my regulator, and the ESP-01 is connecting to my network. I can ping it with no problems. But the scope refuses to recognize it when I set up the wifi to connect to the ESP-01.I tried using telnet to connect to the ESP-01. The connection appeared to be successful. However, I could not generate any response from the FY6900 regardless of the command I tried to send it. I am not at all confident that this approach would work in any case ... or should it?So, I have just now tried the python sds1004x-bode program, the version by bateau020 that adds the ability to talk with the SDS804X. I'm running on Ubuntu 24.04.I was able to start the program, and it appears to connect to the FY6900, or thinks it does ... and the SDS804X can connect successfully. But apparently the FY6900 is not responding to the commands:Code:sudo python3 bode.py fy -udpInitializing AWG...AWG: fyPort: /dev/ttyUSB0IDN: fyAWG initialized.Starting AWG server...Listening on 0.0.0.0RPCBIND on UDP port 111VXI-11 on TCP port 9010Creating sockets...Waiting for connection request...Incoming connection from 192.168.0.201:809.VXI-11 CREATE_LINK, SCPI command: inst0VXI-11 DEVICE_WRITE, SCPI command: IDN-SGLT-PRI?VXI-11 DEVICE_READ, SCPI command: NoneVXI-11 DESTROY_LINK, SCPI command: NoneVXI-11 moving to TCP port 9011Waiting for connection request...Incoming connection from 192.168.0.201:809.VXI-11 CREATE_LINK, SCPI command: inst0VXI-11 DEVICE_WRITE, SCPI command: IDN-SGLT-PRI?VXI-11 DEVICE_READ, SCPI command: NoneVXI-11 DESTROY_LINK, SCPI command: NoneVXI-11 moving to TCP port 9012Waiting for connection request...Incoming connection from 192.168.0.201:809.VXI-11 CREATE_LINK, SCPI command: inst0VXI-11 DEVICE_WRITE, SCPI command: C1:OUTP LOAD,50;BSWV WVTP,SINE,PHSE,0,FRQ,15000,AMP,2,OFST,0;OUTP ONC1:OUTP LOAD,50;BSWV WVTP,SINE,PHSE,0,FRQ,15000,AMP,2,OFST,0;OUTP ONWarning: WMF00015000000000 did not produce an expected response after 2 retriesTraceback (most recent call last):File "/home/uwake/Software/FY6900/sds1004x_bode-master/sds1004x_bode/bode.py", line 45, in <module>server.start()File "/home/uwake/Software/FY6900/sds1004x_bode-master/sds1004x_bode/awg_server.py", line 120, in startself.main_loop()File "/home/uwake/Software/FY6900/sds1004x_bode-master/sds1004x_bode/awg_server.py", line 140, in main_loopself.process_lxi_requests()File "/home/uwake/Software/FY6900/sds1004x_bode-master/sds1004x_bode/awg_server.py", line 244, in process_lxi_requestsself.parser.parse_scpi_command(scpi_command)File "/home/uwake/Software/FY6900/sds1004x_bode-master/sds1004x_bode/command_parser.py", line 49, in parse_scpi_commandself.parse_bswv(args, channel)File "/home/uwake/Software/FY6900/sds1004x_bode-master/sds1004x_bode/command_parser.py", line 80, in parse_bswvself.awg.set_amplitude(channel, ampl)File "/home/uwake/Software/FY6900/sds1004x_bode-master/sds1004x_bode/awgdrivers/base_awg.py", line 42, in set_amplituderaise NotImplementedError()NotImplementedErrorSome additional information in case it is relevant:Ubuntu "sees" the scope, connecting to it as /dev/ttyUSB0. This port is in the dialout group, of which I am a member - but shouldn't matter in any case since this is being run under sudo.I tried running the FY6900 software via wine. It runs ... but no matter what I do, I can't get it to recognize the FY6900. I tried running the software in a Windows 10 VirtualBox, enabling the USB device. And ... it runs just fine, controlling the FY6900. So apparently the FY6900 USB port is operating correctly, at least with Windows.I thought about trying to run the python program under Windows, but the README.md file only seems to reference a Linux environment, so I was unsure whether that was possible. And in any case, I don't particularly want to have to run this through a VirtualBox instance. For that matter, my ultimate goal is to run it via the ESP-01.Help! Does anyone have any suggestions, tricks, or helpful questions to offer?The FY6900 is the 60M version, running version 1.5.4

author: awakephd
author_rank: Regular Contributor
timestamp: September 11, 2024, 11:20:09 pm
content: A bit more data: I was able to connect to the scope attached with USB via a terminal program (putty, gtkterm) both in Windows and in Linux - I can type in a command and see the change on the FY6900. So I do have connectivity, at least through USB. For the ESP-01, perhaps I am running into the issue of needing to adjust the resistor(s) feeding the TX and/or RX lines? Is there any way to do this on my adapter board, rather than inside the unit? I am not completely opposed to opening it up, but I would prefer to hold off until I am sure that I will keep the unit.But that still would not explain why the sds1004x_bode program does not work. Again, any help will be most appreciated!

author: bateau020
author_rank: Frequent Contributor
timestamp: September 12, 2024, 04:54:26 am
content: Can you test the other fy driver: fy6600?That "fy" driver is really new, and I haven't been able to test it (don't have a FY AWG), and this is indeed a bug.Also, this is better for discussions in github than here. I have created an issue in github and will do some debugging in the coming days by mocking the fy AWG.Can you set "VERBOSE = True" (instead of "VERBOSE = False" as it is now) in the fy or the fy6600 driver? That can help debugging.About Windows, it should work, but that is unlikely to solve the issue. Absolutely no need for virtualbox. This is really basic, in theory it should even run in a raspi.I avoid WiFi as much as I can in the lab, so I haven't looked at ESP-01, but I will be able to help porting it. I am just not sure which fork to get, there are multiple forks and I see nothing that regroups all efforts.EDIT: found a stupid bug (missing one letter in a function name). The "fy" driver should be better now. Tell me if it works. Still willing to work on ESP-01, but what fork should I start from?

author: awakephd
author_rank: Regular Contributor
timestamp: September 12, 2024, 12:45:48 pm
content: bateau020, you are not only a gentleman and a scholar but also a saint to take this on! Many thanks. I am away from my "lab" (aka, desk piled with things in a corner of my house) at the moment, but will check out both the updated fy and the fy6600 drivers. I will also check on how to respond on Github.On the ESP-01 code, I used the link provided by Knutselaar about 10 posts back in this thread. As best I can tell, his tweaks have not been ported back to Github, and I maybe shouldn't have started with that code - my thinking was that this represented a recent successful attempt.What I missed until now is that he is using an SDS1104X, and that is what the code is set for. As I was digging through the espBode code last night I realized that 1) it does not include the UDP adjustment that you made to the python code, and 2) the code could use some improvement - at least in my ever-so-humble opinion. Currently, the code is essentially C, even though written in a C++ environment. I think it could be made much less confusing with judicious use of some C++ classes - for example, a class that "automaticaly" handles the endian-swap needed to go between the network and the ESP, rather than having to call the swap routine at various points on various pieces of the data. And don't get me started on theuint8_t **dataparameter that is passed into the receiveRpcPacket function ... which then uses malloc to create a memory blockwithout checking to see if it succeeds, which is then passed back to the calling function, which has to remember to free it ... even if it wasn't actually created. Yikes!All that to say, I have already been thinking about taking on an update of the espBode code, both to include the SDS804X, and to make it easier to use going forward. Any interest in collaboration? I have to confess that I have never collaborated on something like this before, so I don't know how it would work, and I certainly won't be offended if you'd rather not.

author: bateau020
author_rank: Frequent Contributor
timestamp: September 12, 2024, 01:01:05 pm
content: Quote from: awakephd on September 12, 2024, 12:45:48 pmSure, no problem. Collaborating is easy with github.One of the problems I have is that I cannot test all of the code, as I only have 1 AWG. Collaboration will help here.Another problem is that I no longer have my SDS1000 (non-HD). I ported the python code when I had both scopes. Am thinking about making the code really VXI compliant (opening both UDP and TCP ports), and my lack of test subjects is really hampering. Collaboration will again help here.I will take a look at the existing forks do an assessment of where to start from.

author: awakephd
author_rank: Regular Contributor
timestamp: September 12, 2024, 02:28:37 pm
content: Excellent!

author: das_strobel
author_rank: Contributor
timestamp: September 12, 2024, 02:49:50 pm
content: Quote from: bateau020 on September 12, 2024, 01:01:05 pmYou have a pull request from me regarding the support of Rigol DG800/900/1000Z siggens. Let me know if it works for you. Thanks!PS: I've sent the PR to this repohttps://github.com/hb020/sds1004x_bode. I hope it is the right one?

author: bateau020
author_rank: Frequent Contributor
timestamp: September 13, 2024, 05:51:44 am
content: Great! I knew there was something wrong with that correction, but hadn't taken the time yet to check it. Thanks.Merged.

author: Knutselaar
author_rank: Newbie
timestamp: September 13, 2024, 05:51:05 pm
content: Best awakephd,Did you change on line 12 of esp_config.h:#define AWG FY3200in#define AWG FY6900The last compiling I did was with the FY3200.Knutselaar

author: bateau020
author_rank: Frequent Contributor
timestamp: September 13, 2024, 06:46:26 pm
content: @Knutselaar: the problem is that the espbode code uses TCP for both `rpc_server` and `lxi_server`. This works with the SDS1000 (non HD) series, but does not work with the newer HD series (SDS800 HD or SDS1000 HD), that awakephd has.These newer scopes require UDP for `rpc_server`, and require dynamic changes to the port assigned to `lxi_server`. This is not really a big surprise: many other LXI/VXI devices have the RPC portmap service listening on TCP and UDP.It however means that a rather serious adaptation of the espBode network code is needed in order to make it compatible with the HD series scopes.Now I can help with that, the code is not that complicated. But this would need to be a group effort, as I no longer have a SDS1000 (non HD) series scope, and I do not have a serially controlled AWG (although all of that can be simulated). As a result, I really prefer to do so via github, not via zip files.

author: awakephd
author_rank: Regular Contributor
timestamp: September 13, 2024, 09:05:38 pm
content: Quote from: Knutselaar on September 13, 2024, 05:51:05 pmYes, I did change it to #define AWG FY6900, but as bateau020 says, the problem seems to be the need for the UDP connection.However, your fix for the FY6900 in an earlier post, or something like it, seems to be needed in the sds1004x_bode python code:Quote from: Knutselaar on May 25, 2024, 06:06:28 pm

author: awakephd
author_rank: Regular Contributor
timestamp: September 13, 2024, 09:21:14 pm
content: Quote from: bateau020 on September 12, 2024, 04:54:26 ambateau, the python code works better now with the fy driver, in that it does not crash, and it does attempt to respond to the settings coming from the SDS804X oscilloscope. However, as I alluded to in the post just above, the version of the FY6900-60M that I have (firmware 1.5.4) does not recognize the frequency setting as it is currently formatted:Code:Waiting for connection request...Incoming connection from 192.168.0.201:810.VXI-11 CREATE_LINK, SCPI command: inst0VXI-11 DEVICE_WRITE, SCPI command: C1:BSWV?VXI-11 DEVICE_READ, SCPI command: NoneVXI-11 DESTROY_LINK, SCPI command: NoneVXI-11 moving to TCP port 9014Waiting for connection request...Incoming connection from 192.168.0.201:810.VXI-11 CREATE_LINK, SCPI command: inst0VXI-11 DEVICE_WRITE, SCPI command: C1:BSWV FRQ,2234.4898C1:BSWV FRQ,2234.4898Warning: WMF00002234489800 did not produce an expected response after 2 retriesVXI-11 DESTROY_LINK, SCPI command: NoneVXI-11 moving to TCP port 9015If I try sending the FY6900 the command as WMF2234.4898\n it works perfectly - yes, with the decimal point, no leading or trailing zeros. When it gets something like WMF00002234489800\n it sets the frequency to 60 MHz.I note also in the fragment above that the oscilloscope appears to be asking for some feedback - where it issues the command C1:BSWV? - I can't tell whether the program is giving it the desired feedback, or simply ignoring this, and I don't know if it matters. I forgot to run it with VERBOSE = True, so I will report back when I have a chance to do that in case that gives more information.I also tried it with the fy6600 driver. It produced similar results, i.e, unsuccessful results - one difference being that it did not report back whether the frequency setting was successful, but as I watched the FY6900 screen, it clearly was not successful. I'm guessing it uses the same formatting as the fy driver does. Here is a bit of the output:Code:Waiting for connection request...Incoming connection from 192.168.0.201:810.VXI-11 CREATE_LINK, SCPI command: inst0VXI-11 DEVICE_WRITE, SCPI command: C1:BSWV?VXI-11 DEVICE_READ, SCPI command: NoneVXI-11 DESTROY_LINK, SCPI command: NoneVXI-11 moving to TCP port 9018Waiting for connection request...Incoming connection from 192.168.0.201:810.VXI-11 CREATE_LINK, SCPI command: inst0VXI-11 DEVICE_WRITE, SCPI command: C1:BSWV FRQ,4295.71429C1:BSWV FRQ,4295.71429VXI-11 DESTROY_LINK, SCPI command: NoneVXI-11 moving to TCP port 9019I have worked my way through the espBode code, but have only begun on the sds1004x_bode code; however, I feel like the combination of UDP fix from the latter plus frequency format fix from the former may prove successful!

author: bateau020
author_rank: Frequent Contributor
timestamp: September 13, 2024, 10:14:57 pm
content: Uploaded a new version with a specific fy6900 driver. Tell me how it works.About C1:BSWV?: it is indeed not implemented right now, as it seems to be ignored by the scope.

author: awakephd
author_rank: Regular Contributor
timestamp: September 14, 2024, 12:34:33 am
content: Many thanks! I may have jumped the gun - I tried making one change in the set_frequency method of the FYgenAWG class:previous version:"%014u" % uhz,my change:"%.6f" % freq,and ... drum roll ... it works!I was going to attach a screenshot ... but I can't seem to get it to attach.

author: awakephd
author_rank: Regular Contributor
timestamp: September 14, 2024, 12:37:59 am
content: Ah, got it - I was misunderstanding the way the forum handled the image attachment. Here it is! Simple low-pass RC filter (330Ω resistor, 10nF capacitor).

author: awakephd
author_rank: Regular Contributor
timestamp: September 14, 2024, 12:59:07 am
content: Quote from: bateau020 on September 13, 2024, 10:14:57 pmHaven't had a chance to try the new FY6900 driver yet, but took a quick look at it. Looks like you did something similar to what I have above. I am not overly familiar with python, but I'm curious about the format specification you used - "%08.6f" - doesn't this mean a total of 8 characters wide, with 6 digits after the decimal? What happens if the frequency is 100Hz or higher - does python "override" the width specification to allow additional digits before the decimal? Or have I totally misunderstood (highly likely given how little I know python!)?

author: awakephd
author_rank: Regular Contributor
timestamp: September 14, 2024, 01:06:19 am
content: Well, now that this is working, I have two things to work on:#1 - get the espBode version to work, and#2 - figure out why my plot shows the phase starting out flat at around -7° when I was expecting it to be at or close to 0°. Other than that, the plots look exactly like what I predicted based on the component values. Equipment error?? An error in the way I set it up / measured / something??Sorry for so many posts in a row. Can you tell that I am very excited to see this working?

author: tautech
author_rank: Super Contributor
timestamp: September 14, 2024, 01:17:57 am
content: Quote from: awakephd on September 14, 2024, 01:06:19 amYep, congrats.More can be learnt here:https://www.eevblog.com/forum/testgear/siglent-sds1x04x-e-bodeplot-ii-(sfra)-features-and-testing-(coming)/

author: awakephd
author_rank: Regular Contributor
timestamp: September 14, 2024, 11:34:37 pm
content: Thanks, Rob. I've started looking at that thread. Clearly the UI for the Bode plot on the 1000x-e is quite different than the one for the 804x, so that has been a bit confusing, but I shall persevere ...

author: awakephd
author_rank: Regular Contributor
timestamp: September 15, 2024, 12:19:41 am
content: A bit of progress and a request ...---------------First, the request: As described below, I have done some work on the espBode code ... but only on my local copy ... because I am a git / github neophyte. I have known how to do a "git clone" for years, but have never ventured beyond that. I did watch a couple of tutorials last night, but am still not entirely sure how to use it to create a fork from one of the existing github repositories - I am thinking a fork is the best approach, as what I am envisioning, and have done so far, is a pretty thorough rewrite from the current C code to take advantage of C++ classes. I'd also like to incorporate, or at least allow for, the greater functionality of the sds1004x_bode python program as updated by bateau020.Of course, yet another question is which repository to start from - there are at least 5:https://github.com/sq6sfo/espBodelast commit was 5 years ago; includes only FY6800; does not include telnet; only for ESP8266https://github.com/timkoers/espBodeforked from sq6sfo; last commit was 4 years ago; adds FY6600, FY6900https://github.com/Hamhackin/espBodeforked from timkoers; last commit was 3 years ago; adds JDS2800; adds telnethttps://github.com/hankst69/espBodeforked from Hamhackin; last commit was 1 year ago; no added features, but code cleaned uphttps://github.com/Switchleg1/espBodeforked from sq6sfo; last commit was 9 months ago; adds FY6600; allows ESP32 or ESP8266As the list above shows, sq6sfo seems to be the originator, but there are two separate "families" - the one leading to hankst69, and the one by Switchleg, which has had much more recent activity, but leaves out the additions made by timkoers, Hamhackin, and hankst69.And then there are the tweaks that Knutselaar added, but I haven't found a github repository for those, and I can't tell which version he started from - presumably either Hamhackin or hankst69, since he includes telnet.I propose forking from hankst69, adding in the tweaks from Knutselaar, and seeing if Switchleg caught any bugs that the others missed. Now I just need to figure out how to create the fork. I have set up a github account. I'd prefer to do the editing on my local machine. I know there is some way to link the local git directory to the github repository, but I am still confused about which variation of command(s) to use. If anyone has a simple, 1-2-3 guide to point me to, I would be most, most appreciative!----------------Now, the progress: Before I get too far down the road of re-writing the espBode code to use UDP, I wanted to be sure that my ESP-01 plus the adapter I made (to regulate the 5v to 3.3v and route the serial lines) were actually communicating with the FY6900. I reworked the .ino file of the espBode project to add a selectable "passthrough" mode via the telnet connection. In the process, I reworked the loop function to use a simple state variable, thus allowing the telnet processing to continue to work even while it is waiting for a connection from the scope. I have attached the result to this post.I compiled and uploaded this (along with the rest of the existing espBode project), and after a few rounds of debugging, it works beautifully - and more importantly, I can now verify that the ESP-01 is successfully communicating with the FY6900. I connect to the ESP-01 via telnet, enter passthrough mode by sending the word passthrough, and then I can issue the various commands, such as WMF1000 or RMF or so on. It seems to work flawlessly! Sending the word passthrough again turns off passthrough mode, and it is ready to listen for the oscilloscope. But of course, before it can "hear" the SDS804X, I need to implement a UDP option. And that leads back to the request above ...-------------On edit: I've made a fork from hankst69 in github:https://github.com/awakephd/espBode. Now if I can just figure out how to coordinate that with my local editing ...

author: bateau020
author_rank: Frequent Contributor
timestamp: September 15, 2024, 05:13:11 am
content: Quote from: awakephd on September 15, 2024, 12:19:41 amEasy. github is just a remote repo with a web interface added. But it remains a regular git repo.Steps:* add your ssh public key to your github profile setting (https://github.com/settings/keys)* clone the repo to your PC: git clone git@github.com:awakephd/espBode.git (from the green "code" button top right in your repo)* edit and test locally* when done, git commit and git push, as usual. If you've never done git, sorry, the learning curve is steep, but there are loads of tutorials.* If you use vscode with platformio (recommended) an extension like "Git History" can be helpful.

author: awakephd
author_rank: Regular Contributor
timestamp: September 16, 2024, 12:42:44 pm
content: Knutselaar, where did you get the code base you started from?The question comes from re-thinking my plan. I more-or-less have github and git sorted out, at least enough to get going. But I am still puzzled by the various forks and revisions of code. I had wanted to start with the code base that Knutselaar used. Why? Because his report of success is the most recent I've seen. However, I can't find the repo from which it seems to have been drawn. None of the ones listed in my recent post above include the FY3200, but the code that Knutselaar used did include that. Obviously there's some other code out there, either not in the github repos, or (equally likely) I haven't figured out how to find it.I did find one other repo:https://github.com/AgentLintZeal/espBode- this repo does not indicate the origin from which it forked, but appears to stem from the same starting point as all the rest. However, it has shifted to platform.io, and seems to be targeting only the jds8000.Meanwhile, my re-thinking has led me to the conclusion that it makes more sense to do a start-over rather than attempting to edit and update the existing code. Obviously the start-over would depend on both espBode and sds1004x_bode, but the former is in C and the latter is in python, and my goal is to write a C++ version ... mostly because that is where I am most comfortable. (Though it has been 40 years since I wrote software for a living, in the years since I have occasionally taken on an in-house, single-developer project, and nearly all of that has been C++.)So, now I have a question about etiquette. If I do a complete do-over, essentially starting from scratch even while drawing on the insights from the former versions ... what is the best way to represent that in github? Should I start a new repo, with a title such as espBode2.0 or something like that, and refer back to the earlier efforts in the README without actually forking from any of them? Or is it better to stay with the espBode name, fork from a previous repo, and then create a new branch? Yes, clearly I am still learning my way around github and so on. As I said, all of my coding up to now has been single-developer - me! - and not something that could or should be shared.Another part of the puzzle: before I do the start-over version 2, I am greatly inclined to see if I can tweak Knutselaar's version just enough to get the UDP communication working. That would definitely seem to be best done in the context of a forked version of espBode ... but once again, I can't figure out where Knutselaar's version was forked from. Knutselaar, any help you can give to point me in the right direction will be most appreciated!

author: shabaz
author_rank: Frequent Contributor
timestamp: September 16, 2024, 12:53:26 pm
content: Unless you're using that feature every day wouldn't it be easier/cleaner to simply use a PC and automate if from there? This is what SCPI programmability is intended for. Then you can precisely tailor the behavior and the output to the task at hand, and tweak as required.I don't understand how programming an ESP to act as a sort of translator (if my understanding is correct) is more flexible or convenient.

author: awakephd
author_rank: Regular Contributor
timestamp: September 16, 2024, 01:52:56 pm
content: Shabaz, a fair question. Here is my understanding, which may be flawed, as I am still new to both the Siglent SDS804X and to the FY6900 AWG.1) The Siglent does not recognize the FY6900, and the FY6900 does not speak SCPI. Therefore, though it would be possible to connect them physically via USB cable, it is not natively possible to have the Siglent generate an automatic Bode plot.2) The FY6900 does not have any wifi or LAN connection. It can be connected to a PC or other device via USB, and will respond to a fairly simple text-based command set sent via a terminal program such as PuTTY. While this works flawlessly, it is not particularly convenient to have yet another cable to organize; simply for the sake of controlling the AWG from the PC, it would be far more convenient to have a wifi connection.3) The FY6900 includes a connector with TTL-level serial plus 5V and GND; connecting to this bypasses the USB but allows the same communication with the AWG. This begins to answer your question - at the most basic level, use of an inexpensive ESP-01 board plus a small interface board (to convert the 5V to the 3.3V needed by the ESP8266) allows one to outfit the FY6900 with a wireless interface. That's a nice upgrade, for the grand cost of about $2!4) Some years ago, work began on the sds1004x_bode project. This is a python program intended to run on a PC, which will connect to a Siglent scope via wifi, then connect to any of several inexpensive AWGs including the FY600 via USB (more strictly speaking, via a serial connection). This program is indeed, just as you suggest, a translator. It listens for connection requests from the Siglent scope and responds to its ID request in such a way that the Siglent thinks it has connected to a Siglent AWG. The Siglent then can send out the SCPI commands to control the AWG in order to generate a Bode plot; the sds1004x_bode program translates these commands into the commands that the FY6900 (or other AWG) can understand. Voila! Now the Siglent scope can generate a Bode plot using a non-Siglent AWG.5) Put 3 and 4 together: while the sds1004x_bode program works beautifully, it is not particularly convenient - not only must one (once again) use a USB cable, but now one must also find a place for the PC. Surely the relatively simple task of translation could be handled by a small microcontroller? Yes indeed - and now we get to the espBode project. This will allow the Siglent to connect to the FY6900 (or other) via wifi, thinking it has connected to a Siglent AWG, and it can generate a Bode plot without having to manage an additional cable (for the USB) or find a place for the PC.

author: shabaz
author_rank: Frequent Contributor
timestamp: September 16, 2024, 02:14:36 pm
content: I see.. I think I understand now. I didn't realize the sig-gen didn't natively support SCPI.If the sig-gen were to look like a SCPI device (e.g. via an ESP32 configured to have SCPI one side, and appropriate UART protocol on the other end), then both the 'scope and the sig-gen (through that SCPI adapter) could be controlled via (say) labVIEW, or Python, and then a bode-plot program could be executed on the PC, i.e. no need for messages to pass through the 'scope to a sig-gen.Example screenshot below was created using a different 'scope and sig-gen, both of which support SCPI, just to show an example of the benefit of that. Since it is entirely under PC control, I could tweak the script to meet exact needs (e.g. only test at specific frequencies, or display with larger text and so on).However if the ESP is required anyway to do the conversion to SCPI, then I can also see why one may as well try to set it so that the 'scope handles the communication and leave the PC out.

author: awakephd
author_rank: Regular Contributor
timestamp: September 16, 2024, 04:23:56 pm
content: Ah, that makes sense. If / as this revision develops, it would be interesting to see how far we could go to offer generic SCPI control.

author: awakephd
author_rank: Regular Contributor
timestamp: September 16, 2024, 07:46:35 pm
content: Quick update: I have moved forward with the github repo (https://github.com/awakephd/espBode). I went back and forked it from the Hamhackin version, rather than the newer hankst69 - I concluded that it would be easier to proceed down the path I have planned starting from there. I have now updated that code base with a new commit, incorporating the changes that Knutselaar made (and the FY3200 code that his version included) as well as my own updates. Most of what I have done is to add a passthrough command to the telnet interface, and in the process reorganize the logic of the loop() function. Some other minor tweaks and updates as well. At this point, I will try to do a quick-and-dirty implementatiion of the UDP connection needed for the SDS804X and verify that it works. Once that is done, I will create a new development branch and start work on a complete rewrite.

author: bateau020
author_rank: Frequent Contributor
timestamp: September 17, 2024, 04:46:16 am
content: In order to make espbode (or the python script) into a siglent emulating SCPI frontend for any AWG, that respects at least some of the standards, 3 loops/threads/processes are needed:1 that does portmap on UDP (this part is used for broadcasts/discovery and by the HD scopes)1 that does portmap on TCP (this part is used by direct VISA communication, as with the non-HD scopes1 that does the VXI-11 communication (on TCP)The latter should switch to a new port after every LINK_DESTROY, and communicate the new port to the port mappers.Made this work in the python version, in today's commit. Previously it only ran 1 of those loops at a time, which messed up communication with other SCPI tools.Haven't really looked yet at how espbode does it.

author: Knutselaar
author_rank: Newbie
timestamp: September 17, 2024, 08:44:48 am
content: Hi awakephd,Before my first post I have searched all corners of the internet and found a espbode-master with date 8 december 2020, I think from Github.I am sorry, I did search today, and I can not repoduce the origin of espbode-master I have used.I think I have used Youtube:Text under this video:************************************Vastgezet door Tim's Electronics Lab@TimsElectronicsLab3 jaar geleden (translation: 3 years ago)I have created a pull-request on GitHub (https://github.com/sq6sfo/espBode/pull/4) that enables the full FY6900 instruction set. It hasn't been merged yet, so feel free to clone my repo (https://github.com/timkoers/espBode) until it is merged.************************************I think that I used one of these links, but they dont exist any more.I took the espbode-master that worked with the old FY6900.In my first post reply #112 I explained the path I followed.Because I also own a FY3224S I took the working driver of the FY6900 and adapt it for my FY3224S.In the espbode-master attached at reply #113 I made a different solution of the frequency send to the FY6900 than described in post #112.Maybe it is best, to be complete, to include also the driver for the old version of the FY6900 for those who have the old FY6900.attatchment: old FY6900 driver:

author: awakephd
author_rank: Regular Contributor
timestamp: September 17, 2024, 01:45:41 pm
content: Thank you, Knutselaar. I think I have generated a repository that does a reasonable job of incorporating the elements that were in the base you used, along with your updates plus mine. I agree that we should have the old FY6900 as an option; thanks for sending it! timkoer's repository is one of those that I looked at, but as best I recall it does not include the FY3200 as an option. At this point I can't determine where that code came from.

author: awakephd
author_rank: Regular Contributor
timestamp: September 17, 2024, 01:54:42 pm
content: Quote from: bateau020 on September 17, 2024, 04:46:16 amThanks, bateau. The espBode code assumes a sequential process, and of course at the moment, does not correctly respond to the HD scopes. It does not change ports, and it does not check the AWG to be sure the command succeeded. (At least for the FY6900 driver, it checks only for the newline character that is returned whenever a command is issued.) There is an interesting quirk in the code where it sends some commands twice, "because the AWG doesn't always respond the first time," and yet at the same time it also has some code to avoid repeating the same command when it has been issued by the scope - a comment says that the 1000-series scopes repeat some commands. All of this, and much, much more, is why this code is overdue for a complete rewrite.I did have a chance last night to do a q&d test of UPD communication, just enough to verify that I can receive the expected 56-bye packet. Hopefully later today I'll have time to work up the rest of code to respond, change ports, etc.I look forward to reviewing the changes you've made to the python code to allow the various loops to occur in tandem, rather than sequentially - and again, thank you for your tremendous help and work on this project!

author: Knutselaar
author_rank: Newbie
timestamp: September 17, 2024, 07:40:42 pm
content: Hi awakephd,I made the driver for the FY3200.

author: awakephd
author_rank: Regular Contributor
timestamp: September 18, 2024, 03:30:09 pm
content: Thanks! I will include that in my "history" of the program.

author: awakephd
author_rank: Regular Contributor
timestamp: September 19, 2024, 12:29:33 am
content: bateau,I have been working on a q&d implementation of the espBode code that will handle a UDP bind request. I think I am almost there, using your python code as a reference. But I am not understanding the next-to-last line of your process_rpcbind_request_udp method:self.rpcbind_socket.sendto(resp_data, address)Does this send back to the originating IP and port? How does it get the data length? I would have thought the format would be sendto(buffer, length) - but "address" doesn't sound like a length.For that matter, I am confused by the line near the start of the method where you set address as follows:address = bytesAddressPairThis would seem to set address to equal the address of the buffer + 1 byte (maybe??).As is probably obvious, some of my confusion has to do with minimal knowledge of python. Any help you can give will be most appreciated!By the way, I tried to figure out if there was a way to contact you via the github repository, but I could not figure out how to do that.

author: bateau020
author_rank: Frequent Contributor
timestamp: September 19, 2024, 05:25:54 am
content: PM sent.

author: Reemuson
author_rank: Newbie
timestamp: October 02, 2024, 01:28:47 am
content: Hey, first time post and I thought it was important.If you're using any version of ESPBode, please note that for the ESP-01 non S the inbuilt LED is sharing the pin with TX. So you'll need to comment out any LED related code in order to get serial communication.I unfortunately didn't realise thisand spent a long time re-writing code trying to figure out why nothing was communicating thinking it was a driver issue. (At least I have some tidier code and have a deeper understanding of what's going on in the code base)

author: awakephd
author_rank: Regular Contributor
timestamp: October 08, 2024, 01:03:09 pm
content: Reemuson,Many thanks for this information! I do have the S version, and was not aware of the potential problem. I'll add that to my code so that people can leave out the LED if they have the -S version.Meanwhile, if anyone is interested in seeing where I am taking the espBode project, I'd welcome comments and suggestions. My repo is here:https://github.com/awakephd/espBode/tree/version-2.0Note that this is the version-2.0 branch, not the master. The master branch in the repo is only slightly edited from the hamhackin fork, enough to try to consolidate the changes that were made by Knutselaar and to rig up a rudimentary test of UDP binding.The version-2.0 branch is essentially a rewrite from the ground up. It draws on the previous espBode versions and on the insights provided by bateau020 in his sds1004x_bode python version, but very, very little of the original code will make it into this new version. This version attempts to take advantage of C++, but without incurring significant overhead. An example of the latter is that I am avoiding the use of C++ strings, except where required by a couple of libraries - though the Arduino libraries have worked hard to reduce overhead in their String implementation, I am trying to avoid it altogether.The current (and only) commit to the version-2.0 branch contains the overall structure up to the point of successfully communicating with the oscilloscope. I'm now working on parsing the SCPI commands and translating them for the non-Siglent AWGs. Thus, still a ways from a fully working product, but more than enough to see where I am going with it. Again, should anyone be interested in taking a look, I welcome suggestions, corrections, gentle ridicule, or other helpful comments!

author: awakephd
author_rank: Regular Contributor
timestamp: October 09, 2024, 08:33:59 pm
content: More progress on espBode version 2 - I have just committed changes that implement parsing of the SCPI commands from the oscilloscope. The "only" thing left is to set up the AWG base class, then create the specific implementations for the various AWG versions.

author: awakephd
author_rank: Regular Contributor
timestamp: October 14, 2024, 01:01:31 am
content: I am pleased to announce that espBode 2.0 is now working! This represents a complete rewrite from the ground up. While it definitely owes a debt to the earlier espBode versions, this is not simply an edit of those; it is an entirely new program, written to take advantage of C++, and hopefully much more robust.So far, I only have the code for the FY6900 with recent firmware, but the way I have implemented the code, it should be trivial to add any other FY models.The key difference among these models seems to be the format and magnitude of the value they send and receive for the various parameters. For the FY6900 that I have, with firmware 1.5, it takes a floating point value to set frequency (in Hz), amplitude (Vpp), offset (V), and phase (°). For example, to set the frequency on channel 1 to 103.27 Hz, one sends the command "WMF103.27".It would make way too much sense for it to return the same sort of value when reading parameters. And indeed, it does return the frequency as a floating point number (in Hz): Send the command "RMF" to the FY6900 (read main-channel frequency), and it returns 00000103.270000 - zero-filled before and after, but as noted above, the zero-fill is not required when setting the value.Unfortunately, reading amplitude, phase, and degrees does not return the value in a floating-point format, but rather as an integer ... and the magnitude is not consistent. it returns amplitude as an integer that equals the Vpp * 1000, but it returns both offset and phase as integers that equal the value * 1000. Go figure! (I have not looked to see what duty cycle or other such commands do, since those are not used in the Bode plot, but I am guessing there are other delightful inconsistencies there.)My implementation uses a "translation table" that tells the software what sort of value to send and to receive, and how it needs to be adjusted for magnitude. Thus, changing from the current FY6900 to, say, a FY6600 requires only determining the format of the send and receive values, and filling in the table accordingly.I should add that, while I have tested this version (and gotten a beautiful Bode plot of a single-transistor Class A amplifier, attached below), I have not yet tested this exhaustively. Moreover, bateau020 has been giving extraordinarily helpful feedback, particularly with respect to things that are going on at the network level (e.g., responses that might "work" but are ultimately in danger of crashing the wifi); there may be more tweaks needed in response to that feedback. And beyond all of that, there is still work to be done to document everything - I have included a lot of comments, but there is some code that still needs comments, and I need to revise all of the comments to be a more standard format.Still ... I am beyond delighted to have a working version, and I would very much welcome any input, suggestions, questions, etc. Github repository is here:https://github.com/awakephd/espBode/tree/version-2.0.

author: sp9bsl
author_rank: Contributor
timestamp: October 27, 2024, 10:26:21 pm
content: Thank you Andy and the rest for your work and sharing it here!I'd like to inform you that it worked for me. My SDS1204X HD works now with FY6900 without problems. One minor issue is the include file for credentials.You should change in main .ino file in the 6th line:Code:#include "credentials.h"toCode:#include "credentials_format.h"

author: sp9bsl
author_rank: Contributor
timestamp: October 31, 2024, 07:28:33 pm
content: Andy, one more thing: I had to change the frequency exponent from 0 to 1 in pt6900 array. In my case frequencies synthetized by FY6900 were 10 times lower.

author: awakephd
author_rank: Regular Contributor
timestamp: November 02, 2024, 02:16:28 pm
content: sp9, thank you so much for this feedback! I am especially delighted that it works with the SDS1204X, since I do not have a way to test with anything other than my SDS804X.Can you tell me what firmware your FY6900 is running? I have been aware that there are different versions of the FY6900, and have been debating how to account for all of them. One though I have had is to work up a "setup" routine that could be accessed via telnet, which would lead the user through setting and verifying results, then write the correct pt6900 array out to eeprom.On the include file - I was trying to set up a system where I could have my private credentials in a file that I could set to be ignored by git - but still show how the credentials file should be set up. My idea was that people would copy the credentials_format.h file over to credentials.h with the proper login credentials. I would welcome a better way to do this - I have scratched my head over it, and done a fair bit of searching on the internet, but this is the best I have come up with so far.If any others use this code, I will greatly welcome additional feedback, especially for how to configure it for various FY models!

author: sp9bsl
author_rank: Contributor
timestamp: November 02, 2024, 06:34:54 pm
content: Hello Andy,my FY6900 has firmware v1.3 installed, I bought it over 5 years ago. It is sad that Feeltech doesn't allow firmware upgrade but I knew it at the moment of buy.This would be great if settings could be changed without removing ESP from FY, reprogram and then put it back. Although, in my case I did it twice and everything works fine now.Regarding the credentials file, your idea is ok I didn't think this way. I think you should move branch version-2.0 to master and write info about credentials file to readme.md just to save other initial problem with build.Anyway, thank you for your work, now I can set sweep frequency above the limit of 25MHz which original stuff has. In my case I can work up to 40Mhz, for some reason ESP hangs above this frequency loosing connection with oscilloscope.

author: awakephd
author_rank: Regular Contributor
timestamp: November 02, 2024, 07:19:53 pm
content: Hmm, interesting on the problem above 40MHz. I haven't tried anything going that high - mostly I need up to 10MHz or so. I'm guessing there is some problem with EMD at the higher frequencies. I have thought about going ahead and sending the simple interface board that I built using toner-transfer over to JLCPCB and have some "real" boards printed ... maybe some better shielding on the board would help? (High speed noise is definitely getting into the territory where I don't actually know what I'm doing ...)Based on what others have said in this and other threads, I think they must have changed the interface slightly between 1.3 and 1.4. If you looked at my comments, you will see that the interface on 1.5 is very inconsistent, and I'm guessing it may be equally but differently inconsistent on 1.3 and earlier as well.Have you tried the "passthrough" mode? If you telnet into the ESP-01 when it is connected to your FY6900, you can type passthrough and it will toggle the passthrough mode. When passthrough is on, you can type into the telnet interface and it will relay it to the serial port, and vice versa - in other words, you can telnet directly into the serial interface. In this mode, if you type WMW123456.12345678 and hit Enter, what does your FY6900 show as the set frequency? And if you then type in RMF, what does it send back?Based on what you have said, it appears that firmware 1.3 is shifting by a factor of 10 ... but is it catching all of the decimal places? On mine, I can set, e.g., 12345678.12345678 and it will show up as 12,345,678.123456 Hz - six digits after the decimal, up to eight digits before. From what I have read, it sounds like some units need to have the value sent as an integer scaled by 1000, so that sending WMW123456789 becomes 123,456.789 Hz. The "translation table" should be able to take care of anything like that - or at least that was my goal. I would love to get several others with various models testing this, so that I have a better understanding of whether my code will work "universally" (with the right settings in the translation table) or whether there are still some bugs in there.

author: awakephd
author_rank: Regular Contributor
timestamp: November 11, 2024, 12:07:47 am
content: New developments on the new espBode2.0:Merged the version-2.0 branch into masterRenamed the repository as espBode2.0 (https://github.com/awakephd/espBode2.0.git)Extensive documentation including doxygen tagsAdded doxygen documentation in docs/htmlOn edit: off-line conversation with bateau020 helped me see that it is better to leave the repository as espBode and instead use a version tag. As soon as this reaches a point where I am ready to consider it "done for now," I'll generate a release and tag it as v2.0. Thus, the repository remainshttps://github.com/awakephd/espBode.git

author: lololo
author_rank: Contributor
timestamp: November 17, 2024, 05:25:55 pm
content: hello, nice job!I have a jds2900 and i would like to know if espbode is compatible? Apparently, it is the same as the jds6600, there is just the case that changes. Inside there is a connector that i could use with a level shifter to put an esp.

author: awakephd
author_rank: Regular Contributor
timestamp: November 18, 2024, 01:16:16 am
content: Quote from: lololo on November 17, 2024, 05:25:55 pmThanks! And yes, it should be possible to set up the jds2900 to work with espBode. The key is getting hold of the Serial/USB protocol. I tried to find a manual on-line, but thus far the only thing I've found wants to charge me to download it. The little bit I could see without paying looks like it uses a different protocol than the FY series - different, but shouldn't be any trouble to work with once I know what it is!Do you have a copy of the communication codes / USB protocol / programming guide / whatever it is called? If so, if you could scan and send it to me (or send an electronic copy), that would be super helpful!

author: bateau020
author_rank: Frequent Contributor
timestamp: November 18, 2024, 07:30:08 am
content: JDS6600 has an implementation in the python version (https://github.com/hb020/sds1004x_bode), so that might be a start. That device uses quite different commands from the fy devices. Example: ":w23=25786,0." sets the output frequency of channel 1 to 257.86Hz.

author: lololo
author_rank: Contributor
timestamp: November 18, 2024, 08:56:24 am
content: Thanks for your answer, I will try the python version. (I confused JDS and FY 🤦‍♂️)Here is the pdf of the protocol just in case :-DHave a nice day.

author: bateau020
author_rank: Frequent Contributor
timestamp: November 18, 2024, 01:19:49 pm
content: First glance tells me it is rather similar to the JDS6600, so that driver might work. Let me know if you find any issues.

author: lololo
author_rank: Contributor
timestamp: November 18, 2024, 01:27:56 pm
content: Yes, Thanks !

author: awakephd
author_rank: Regular Contributor
timestamp: November 20, 2024, 01:03:08 am
content: Thanks for the protocol .pdf; that will help. It does look like it is similar if not identical to the JDS6600 protocol. Bateau, I took a quick peek at the Python code for the JDS6600, and figured I'd start with that.Currently in the midst of improving the asynchronous interaction, so that a failed serial command can be cancelled by a DESTROY_LINK command. When I get that sorted, I will start working on implementing other scopes, e.g., the JDS2900.

author: mario sanz
author_rank: Newbie
timestamp: January 29, 2025, 11:59:55 am
content: Quote from: awakephd on November 02, 2024, 07:19:53 pmHello everyone,I am new here and first of all, thank you very much for sharing this wonderful project.I have installed Andy´s espBode 2.0 with succes, I get nice Bode plots but have a little issue, I will explain this later.First the test Andy asked for:1) FY6900 Firmware Ver. 1.5.42) Ch 01 of my FY6900 is in Sinus Waveform with 10 kHz3) I telnet into the ESP-01 when it is connected to my FY69004) I type "passthrough" in telnet and I get the message "passthrough mode is on"5) I type "WMW123456.12345678"6) my FY6900 change to Waveform ARB29 but the frequency does not change, it keeps on 10kHz7) I type "RMF" and get back "00010000.000000" => see the attached screenshotI do not know why the frequenzy doesn´t change with the WMW command, however in the Bode plot it works correct.Now I come to my little problem in the Bode plot:In the first run, I have always some peaks in the amplitude (see attached pic´s).In the second run, they are corrected but sometimes, new ones appear on other places of the curve.I have to do at least two runs to get a clean curve.Does anyone know why this happen?Thank you very much in advance.Br.Mario

author: tonio976
author_rank: Newbie
timestamp: January 31, 2025, 08:47:27 am
content: Hello everybody, it is my first post here.I just bought a siglent 1104. So, after two days, i manage to get bode plot working with my picoscope 2204 used as awg. To do, i adapted the python script"sds1004x_bode_python" to work with python3 (it was not the most easy task for a noob programmer as me) and made a new driver for my picoscope using the picoscope api and a computer (links by ethernet cable to my scope).If someone is interested i can share my driver but i think i will need some help to make my script look like a ''professional" script as you do !I attached a picture of my win ! thanks every body that work on such open source project that free our electronic stuff .So congratulation for your work that permits me to achieve this project fastly.Antoine

author: bateau020
author_rank: Frequent Contributor
timestamp: January 31, 2025, 09:49:23 am
content: sure, happy to add that tohttps://github.com/hb020/sds1004x_bode. Where is your code?You mention a migration to python3. That is somewhat unfortunate, you probably started from a very old version and were not aware that there are a couple of versions out there that are already on python 3 since some time. Anyway, if you send me the code, I'll be happy to include it in my repo (next week)

author: mario sanz
author_rank: Newbie
timestamp: January 31, 2025, 04:02:43 pm
content: hello everyone,So, no one has any advise for my problem?Nobody has these peaks in the Bode Plot?Probably, I missunderstand how the Bode Plot works and it is normal, that I have to wait for several sweeps.I have seen a few videos in youtube, doing the Bode Plot with original Siglent gear and it seems to me, they just do one sweep over the frequency range to get the plot.Just a short advise would help.Thank you very much

author: 2N3055
author_rank: Super Contributor
timestamp: January 31, 2025, 06:00:51 pm
content: Quote from: mario sanz on January 31, 2025, 04:02:43 pmSince you compared to Bode plotting with original Siglent AWG, let me commentWith Siglent AWG there are no problems.If I were to speculate, you probably have a timing problem with either code/CPU that does translation (provided it does translate commands properly) or AWG you are using is not responding to commands in timely fashion.So after scope sends for a frequency step, output of AWG does not jump and settle it's signal in time before scope starts measuring data for that point.This additional abstraction layer that does Siglent -> XYZ AWG command translation needs to be low latency, and AWG used has to have command response time low enough for this to work.Combined latencies from:Command sent by scope -> command received-> translated-> translated command sent to XYZ AWG -> XYZ AWG interprets command and sets new frequency -> Output of AWG settles to stable outputneed to be less that wait time of the scope for that datapoint.

author: awakephd
author_rank: Regular Contributor
timestamp: February 13, 2025, 11:01:50 pm
content: Mario, I am so sorry that I have not responded before now. I have been buried in work for my real job, and have not been able toplay withwork on (or even look at) this.I am not sure where the peaks are coming from; you are not doing a fast sweep, so I wouldn't think timing would be an issue. How secure are your connections - any chance that some noise is entering from the test setup?With regard to what you got from the WMW command ... you mentioned that you have an FY6900, but did not indicate the specific model in terms of maximum frequency. That said, any of the models should be able to generate a 123kHz output. Have you tried some other variations in the command? For example, if you enter WMW1000, what do you get?

author: mario sanz
author_rank: Newbie
timestamp: February 23, 2025, 11:29:05 am
content: hello @awakephd,I understand that work often doesn't leave time for things like this, as you see, my response is late as well...Regarding my FY6900 model, I have the 60MHz Version with Firmware Ver. 1.5.4. and it is Dominty branded.I have tried the WMW1000 command, as you asked me for, but nothing happens, no change at all in the FY6900 Display.Here more examples:WMW123456.12345678 => waveform jumps to ARB29WMF123456.12345678 => frequency change to 123.456´123´456KHzRMF => 00123456.123456WMF12345678.12345678 => frequency change to 12´345.678´123´456KHzRMF => 12345678.123456In the Telnet monitor I found the following meassages:"VXI connection established on port 9011CREATE LINK request from "inst0" on port 9011WRITE DATA on port 9011 = C1:BSWV FRQ,2458.97959Unable to verify FRQDESTROY LINK on port 9011Closing VXI connection on port 9011"I do not know if the "unable to verify FRQ" message could be an issue.Regarding the possible noise in my setup, I have connected channel 1 of the AWG direct to channel 1 of my Siglent scopeand channel 2 of the AWG direct to channel 2 of the scope. So, no DUT in the setup.For the connections, I took two Siglent scope probes (x10/100MHz).Both channels of the FY6900 are set to sync waveform, frequency and amplitude.I guess, this setup should not cause noise peaks of almost +/-20dB, as it appears in my Bode plot.Then I startet the Bode plot and let it run for 10 full sweeps.Even with this Setup I get these peaks!! Please see the attached pics for the first and second sweep.If you take a look at the very first post of this thread, in which "4x1md" has posted a video. (https://youtu.be/7PvueUHAJ78)In this video, it seems, he is getting these peaks as well with the Python code, for example at 1:56 or at 7:50.@Awakephd, if I understand it right, can I assume you are not having these peaks at all?Thank you very much for your help.BrMario

author: awakephd
author_rank: Regular Contributor
timestamp: February 24, 2025, 04:18:21 pm
content: Mario, this is puzzling to be sure! No, I am not seeing the peaks, but we may not yet have the software matched to the particular configuration of your FY6900. Let's unpack the reports you gave:Quote from: mario sanz on February 23, 2025, 11:29:05 amOops - I completely blew it. I meant to say WMF1000, not WMW1000. As you have seen, WMW changes the wave form. The code only ever sets WMW to 0 to select a sine wave. (I guess to be extra sure, you might verify that you do get a sine wave when you issue WMW0.)Quote from: mario sanz on February 23, 2025, 11:29:05 amThis part seems to match the firmware that I have on my FY6900 and the code that I wrote. Variations of the FY6900 firmware handle the request and response differently; some requires the frequency to be given as an integer (representing microHertz); some sets it as a floating point, but reads it as an integer; and so on. If you look at the param_translator structure in the awg_fy6900.cpp file (and the corresponding structure description in awg_fy.h), you will see that for FRQ the parameters are as follows:Code:{ pt_DOUBLE, 0, 6, 0, pt_DOUBLE, 0 }, // FRQThis says that the frequency setting command (WMF) should be provided as follows:pt_DOUBLE -> floating point format0 -> no adjustment of magnitude (i.e., multiply by 10^0)6 -> 6 decimal places0 -> no need for a fixed widthand that the frequency reading command (RMF) should return the value as follows:pt_DOUBLE -> floating point format0 -> no adjustment of magnitude (i.e., multiply by 10^0)Fortunately, this is what your tests are showing. You are asking for a frequency of 123456.12345678; the display shows that it is set to 123.456 123 456 kHz - note the k, so this is equivalent to 123456.123456 Hz. Note also the limit of 6 decimal places (or to say it another way, it allows settings down to 1/100000 of a Hz).Reading back, you are getting 00123456.123456 - the zero fill is ignored, but the value is the same as what was requested.On to the next bit:Quote from: mario sanz on February 23, 2025, 11:29:05 amYes, the fact that it did not succeed in verifying the requested frequencymaybe a problem. Currently the code is set to do 2 retries (see line 132 in espBode.ino) precisely because it doesn't always "take" the first time. Can you capture more of the Telnet debug report, and see if it tries again to set the frequency and does succeed? Perhaps it is "mostly" succeeding within 2 retries, but once in a while it drops the ball and gives you the peak?? (Just guessing here ...) The way to determine this would, unfortunately, be to capture the complete Telnet debug and then go through it to try to match it with the peak frequency in your report. Tedious, but it would provide helpful information - specifically, whether the problem is indeed a matter of not getting the frequency setting, or whether something else is going on.One possibility is that the amplitude, offset, or phase settings are not working as expected. Here is the param_translator in awg_fy6900.cpp as I wrote it:Code:{ pt_DOUBLE, 0, 4, 0, pt_INT, -4 }, // AMP{ pt_DOUBLE, 0, 3, 0, pt_INT, -3 }, // OFST{ pt_DOUBLE, 0, 3, 0, pt_INT, -3 } // PHSEWhat this is showing is that each of these values is sent as a floating point number for the exact amount, limited to either 4 decimal places (amplitude) or 3 decimal places (phase and offset); however the values are returned as integers, and have to be divided by 10,000 (amplitude) or 1,000 (phase and offset). Thus, for example, you send the offset in volts (e.g., WMO1.234) but you get the response back in millivolts (RMO returns 1234).Try sending the following commands via the Telnet PASSTHROUGH and see if the scope settings and responses are as expected:WMA1.2345RMA should return 12345 and scope should show 1.2345V as the amplitudeWMO2.345RMA should return 2345 and scope should show 2.345V as the offsetWMP54.321RMA should return 54321 and scope should show 54.321° as the phaseI definitely want to get back to this. It may be that there are some optional timing delays that could help - i.e., in case the FY6900 is just getting overwhelmed with too much, too fast. I'm still buried in work responsibilities, but the end is in sight - I will partially retire at the end of May, so my time will be a good bit more flexible after that!Andy

author: mario sanz
author_rank: Newbie
timestamp: February 27, 2025, 05:02:39 pm
content: Thank you very much Andy for your detailed response and for helping me to get my problem sorted.My programming skills are low level, therefore I have to get deeper in the topics you have explained.But however, slowly but surely I will understand your code and get into it.Here my responses to what you asked me for:"...(I guess to be extra sure, you might verify that you do get a sine wave when you issue WMW0.)"=> yes, I get a sine wave when I issue WMW0"...Can you capture more of the Telnet debug report, and see if it tries again to set the frequency and does succeed?"=> please see the attached file"...The way to determine this would, unfortunately, be to capture the complete Telnet debug..."=> the attached file is the Telnet for one full sweeps (10Hz-20KHz) and the corresponding screenshot."Try sending the following commands via the Telnet PASSTHROUGH":WMA1.2345 => RMA return is 12345 and scope shows 1.26V (the scope shows only 2 decimals)WMO2.345 => RMO return is 2345 and the scope shows 2.39V (again only 2 decimals)WMP54.321 => RMP return 54321 and scope shows 54,32°I noticed one thing, always when a peak appears, I hear directly afterwards a relay click but not on every relay click appears a peak.I guess the relay clicks and the peaks seems to be related somehow.I have also attached the serial communication protocol which was included in the documentation of my AWG.I hope these is helpfulMario

author: Knutselaar
author_rank: Newbie
timestamp: March 18, 2025, 05:54:25 pm
content: Hi awakephd, mario sanz,When I was experimenting with my FY6900 I have send the frequenty setting to both channels.If I used the channel that receives the setting last, the spikes occured in my plot.The spikes disappear when the plot is done with the first channel that receives the frequenncy setting.So I think that to late sending is maybe the origin of the spikes.Greatings, Rik

author: awakephd
author_rank: Regular Contributor
timestamp: March 19, 2025, 08:16:36 pm
content: Thanks, Rik, this is a helpful data point. I still have been buried in work, and it probably won't get better until June ... but I WILL get back to this when I am able!

author: JohnKr
author_rank: Contributor
timestamp: June 03, 2025, 02:25:34 pm
content: The DG800 driver doesn't work with the DG800/900 Pro. A few changes to the script and the Pro work fine. When the script finishes it doesn't return to the command prompt. In Windows pressing Ctrl+Break returns to the prompt. I haven't looked to see why this happens.]

author: bateau020
author_rank: Frequent Contributor
timestamp: June 03, 2025, 03:18:34 pm
content: Indeed, the script never finishes, as it can be used by multiple runs. Ctrl-C is indeed the best way to end it (for now). I can add a provision for "run-once" and "run-forever".Can you share what you had to change for the DG Pro series? Then I'll add it. You can also go via a PR on github.

author: JohnKr
author_rank: Contributor
timestamp: June 03, 2025, 09:34:31 pm
content: awg_factory.py - added "from awgdrivers.dg800P import RigolDG800P" and "RigolDG800P," entries.Copied the dg800.py driver and renamed it dg800P.py - Renamed both instances of "DG800" to "DG800P". Renamed "class RigolDG800(BaseAWG):" to "class RigolDG800P(BaseAWG):" Changed "self._send_command(f":SOURCE{channel}:VOLT:AMPL {amplitude:.3f}")" to "self._send_command(f":SOURCE{channel}:VOLT {amplitude:.3f}")" and "self._send_command(f":OUTPUT{channel}:IMP {z}")" to "self._send_command(f":OUTPUT{channel}:LOAD {z}")".

author: bateau020
author_rank: Frequent Contributor
timestamp: June 04, 2025, 05:31:26 am
content: Integrated the DG800P driver. Will add the "Run Once" option soon.Edit: added the "Run Once" option.

author: JohnKr
author_rank: Contributor
timestamp: June 04, 2025, 07:32:47 pm
content: Quote from: bateau020 on June 04, 2025, 05:31:26 amWorks fine. Thanks

author: noahmeu
author_rank: Newbie
timestamp: August 05, 2025, 06:15:57 pm
content: Hi everyone, I'm new here.I'm trying to get espBode running on a d1 mini to use my PSG9080 AWG. It's protocol is quite similar to the JSG6600 and I just need some numbers swapped around.That being said, I was too lazy to use awakephd's fork of the original EspBode and add my PSG9080 support there so I settled for the fork made by Switchleg1. Adding the PSG9080 was a matter of a few minutes, however my SDS814X is unable to connect.I verified the ESP's presence in my network, used the correct IP, and so on. The serial monitor also indicates a succesfull connection to the WiFi.This makes me wonder, if anyone tried espBode to work with the SDS800 Series.What are steps I can now take to help/investigate this issue? Buying a Siglent AWG is unfortunately not in my budget.Best regardsNoah

author: bateau020
author_rank: Frequent Contributor
timestamp: August 05, 2025, 07:11:37 pm
content: Had a quick look, and the answer is: no, Switchleg1's fork does not support the SDS800XHD series, as it does not open the port mapper on UDP (and lacks other things). You should use awakephd's fork if you want to use ESP. Or you can use a PC and use my script (link is repeated many times earlier in this thread).

author: noahmeu
author_rank: Newbie
timestamp: August 05, 2025, 08:18:44 pm
content: Thanks for your fast reply. Well that seems to explain why it didn't work. So I guess I'll have to take another (and closer) look at awakephd's fork. Seemed a bit overwhelming at first, but I'm going to give it a try tomorrow.Could anyone give me a nudge in the right direction on how to add support for my PSG9080?Best regards

author: bateau020
author_rank: Frequent Contributor
timestamp: August 05, 2025, 08:58:27 pm
content: Well, indeed the work from awakephd is a bit tough to read at first.The output to the AWG is done via the awg_* files.The code supports 2 types of AWG now: FY general versions, and the newer FY6900 versions. The code is set up in such a way that you can simply define a new AWG and point the startup code to that new version.The cleanest way for you would be to1) create a new class, based on AWG_Server, just like AWG_FY and AWG_FY6900 do (up to you to decide which starting point is best, knowing that FY9600 uses FY underneath, as most stuff is identical)2) then make the new one start up by adapting line 20 in the espBode.ino file:Code:AWG_FY6900 awg; ///< Use the FY6900 variant of the AWG_Server classAlso, use the arduino IDE. The code is not friendly to platformio.

author: noahmeu
author_rank: Newbie
timestamp: August 07, 2025, 10:43:21 am
content: I unfortunately have to admit that I apparently lack the skills required to add my AWG. Perhaps the espBode project could really benefit from some practical documentation on how to add custom support. I'm sure that after explaining how to add support, a lot of other AWGs could be added quickly by other users.

author: bateau020
author_rank: Frequent Contributor
timestamp: August 07, 2025, 11:12:39 am
content: The project has documentation in the doc directory, where it explains how to set up arduino and how to adapt it. It might be improved, but it is a start.You can either do a git clone to your PC and open the documentation locally, or you can see it online:https://htmlpreview.github.io/?https://github.com/awakephd/espBode/blob/master/docs/html/index.htmlBut you will need to understand C++ (in the arduino flavour), and know how to handle the Arduino IDE.If you do not, open an issue on github with an explanation of what the adaptation needs to be. Then either andy or I could give it a shot. But we'll need help from you for testing, as we don't have your AWG model.

author: noahmeu
author_rank: Newbie
timestamp: August 08, 2025, 07:48:09 am
content: I understand C++ (with Arduino Flavor) and I'm able to write simple programs. However, when it comes to working with multiple files and classes I get confused quickly because I lack the routine and long term experience. I'm going to open an issue on the repo so we can further discuss this topic there. Give me some time tough so I can gather the necessary information for the PSG9080. (If we support the 9080, similar models like the JDS6600 will work with some adjustments, too)

author: bateau020
author_rank: Frequent Contributor
timestamp: August 08, 2025, 08:50:42 am
content: my python script already supports JDS6600, so I could go from there.I need the commands and variations thereof (channel number, what values, what units) for:* get_id* set/get output on/off* set/get frequency* set/get phase* set/get wave_type* set/get amplitude* set/get offset* set/get load_impedance (not sure if that is supported though)EDIT: oops, I see awakephd does not allow issues via github. I'll ping him. In the meantime, I don't mind you opening the issue on my repo. I'll just insert any changes into my code as well.

author: noahmeu
author_rank: Newbie
timestamp: August 11, 2025, 06:18:45 pm
content: I managed to add support for the PSG9080. I created a pull request with the necessary changes. Please go easy on meAlso, the PSG9080 does not feature a button for sync on the device itself. Instead, syncing channels can be acomplished with the w25 commandhttps://github.com/poehldaniel/PSG9080/blob/main/PSG%20Communication%20Protocol.pdfWould it be possible to implement a "sync"-option? Not sure about the 1000 series but the 800 series requieres a "feedback-channel" from the AWG and using CH1 for testing and CH2 for measuring would be beneficial.

author: bateau020
author_rank: Frequent Contributor
timestamp: August 11, 2025, 07:12:22 pm
content: Added it. About sync: it may be best to just use the same channel to drive the device under test and the reference signal. There are quite some AWGs that do not handle sync very well, and either let them get out of sync after a few commands, or introduce phase differences between the channels.You mention that it still requires some tests. Know that you can use the tests/awg_test.py file to test the correct workings.Do you want that in espbode as well, and can you give me the go after tests?

author: mawyatt
author_rank: Super Contributor
timestamp: August 11, 2025, 07:38:22 pm
content: Quote from: bateau020 on August 11, 2025, 07:12:22 pmAnother good reason to use the same AWG channel for driving the DUT and used as Reference is the amplitude of Reference may change wrt to another channel (or the other channel changes), either by impedance changes by the DUT and/or output variations from the AWG channel.Using the signal that directly drives the DUT and also as the Reference allows some 1st order corrections for variations in the Bode Plot since the overall Bode Function is Vo/Vref, where Vref becomes Vi of the DUT. Of course this may not be easy as frequency increases due to cable delays/loss and such.Best

author: noahmeu
author_rank: Newbie
timestamp: August 11, 2025, 07:50:39 pm
content: Tests were succesfull! I had to correct the frequency since it was a 1/10th of the desired amount and fix a spelling mistake. Your awg_test script made it a lot easier, I enabled the stepped mode and verified every step. Not sure about the impedance though, no changes on the display.EspBode is nice to have, but I'm also comfortable with setting up a computer (or maybe a Raspi Zero W?) if I need to create a bode plot.I think I burried a BNC splitter somewhere in my drawer - I'm going to create a plot tomorrow and take a look at the end result.Is there anything you'd like me to test in particular?

author: bateau020
author_rank: Frequent Contributor
timestamp: August 11, 2025, 08:39:45 pm
content: Quote from: noahmeu on August 11, 2025, 07:50:39 pmjust let me know if you find anything problematic.About the output impedance: that is best shown when you use 50 or 75 ohm inputs or loads, and is mostly used on higher frequencies with matching coax cables.

author: noahmeu
author_rank: Newbie
timestamp: August 12, 2025, 06:33:21 pm
content: Everything is working perfectly! Used an output splitter and recorded a flat line with a direct connection to the scope. Thanks for your guidance and the work you put into the py script.Cheers!

author: awakephd
author_rank: Regular Contributor
timestamp: August 16, 2025, 08:37:05 pm
content: noahmeu, I am glad you got it working. I apologize that I have been out of touch on the espBode implementation. I had thought my schedule would finally ease up after I stepped down from administrative duties (June 1) ... but instead I have been overwhelmed with backed-up to-do lists.This is definitely a project that I want to return to, so I look forward to seeing how bateau020 implemented it in his python script!