Instrument control - Page 1
Forum section: electronics / testgear

author: Joel_l
author_rank: Frequent Contributor
timestamp: March 29, 2019, 02:41:06 pm
content: Over the past couple years I have updated several pieces of my lab bench. Most everything now has Ethernet on it. I have two pieces that do not, one is GPIB, which I can find a GBIB to Ethernet adapter for. The other is USB. I can find USB to Ethernet print servers, has anyone tried one of these to control an instrument ( Siglent SDG 5082 in this case )?Rather than having several different interface types going, I'd like to tidy it all up into one. Ethernet has some advantages to me.Joel

author: luma
author_rank: Regular Contributor
timestamp: March 29, 2019, 03:13:38 pm
content: USB print server devices are almost certainly not going to work, but there are USB-to-Ethernet gateways commercially available, or you could use something like a raspberry pi with usbip or VirtualHere (commercially supported version of usbip).Edit: if your control system is running on Linux usbip can work but also can be a bit of a pain to setup.I wrote up a guide hereon how to get that done which is focused on setting up a Z-Wave radio for home automation but the concept applies generally to any USB2 device.

author: Joel_l
author_rank: Frequent Contributor
timestamp: March 29, 2019, 03:27:43 pm
content: My initial thought was a print server would not work, but then I can't convince myself why. Even for a printer, I don't think they interpret any thing, just pass commands converting from Ethernet to USB and back. So send a setfreq: or something, should just get passed through. Though I have to say, I'm just not sure.

author: luma
author_rank: Regular Contributor
timestamp: March 29, 2019, 03:39:46 pm
content: Quote from: Joel_l on March 29, 2019, 03:27:43 pmLike keyboard/mouse (HID),the USB spec has a specific device class dedicated to printing. A USB print server is almost certainly only going to support USB printers, which is a much easier task than general USB support because you don't have to worry as much about timing. For your use case, you'll need something that provides general USB device support for all device types.

author: Joel_l
author_rank: Frequent Contributor
timestamp: March 29, 2019, 04:38:14 pm
content: So unless the device identifies as a printer class printer class device, the converter might not pass any data or mangle it some how ( not intentionally ). I keep that in mind and look for a more generic device.Thanks

author: macboy
author_rank: Super Contributor
timestamp: March 29, 2019, 04:38:30 pm
content: The SDG5082 will enumerate as a USB Test & Measurement Class device. I doubt any standard print server will support this. A skilled programmer should be able to quickly bang out a simple program to listen on a TCP socket for a connection, then open a connection to the USBTMC device, and then transparently pass data between them (commands and responses are the same for USB, Ethernet, or GPIB ... they are just specially formatted ASCII strings). This could be done in Python with PyVISA on something as simple as a Raspberry Pi costing just a few dollars, or that old WiFi router with USB sitting in your closet, set up with a Linux like OpenWRT. I've done something similar to connect serial/RS232 devices to Ethernet. The SDG programming guide has examples of using python (and other languages) to talk to the instrument over USB and over Ethernet.

author: SWR
author_rank: Regular Contributor
timestamp: March 29, 2019, 07:05:50 pm
content: Another option could be a $3 ESP32 with a GPIB transceiver:https://github.com/sixtemesseven/WGPIB

author: tautech
author_rank: Super Contributor
timestamp: March 29, 2019, 07:28:25 pm
content: Quote from: Joel_l on March 29, 2019, 02:41:06 pmSome SDG5000 connectivity guidance links for you to study:Drivers:https://www.siglentamerica.com/service-and-support/firmware-software/waveform-generators/#sdg5000-serieshttps://www.siglentamerica.com/operating-tip/install-usbtmc-driver/https://www.siglentamerica.com/operating-tip/usb-connectivity-checklist/They ^ can all be found in the SDG5000 Support and Resources pages on the US website.

author: joeqsmith
author_rank: Super Contributor
timestamp: March 29, 2019, 09:04:42 pm
content: Perhaps a cheap tablet for your USB interface, then hang the tablet on the network.I only have one device that requires USB and it requires three. Wish it used Ethernet. IMO, USB doesn't belong on test equipment as a primary connection.

author: tautech
author_rank: Super Contributor
timestamp: March 29, 2019, 10:06:04 pm
content: Quote from: joeqsmith on March 29, 2019, 09:04:42 pm+1The SDG5000 series are from a time when LAN capability was not that common and they were mainly selected for an ARB capable of 80-160 MHz and for their isolated outputs where even today AWG's with isolated outputs are not at all commonplace.In time Siglent may decide to add LAN and update the SDG5000 range to an X series yet I've heard no whispers that this will be the case.