Quick setup guide for Agilent E2050A GPIB Gateway

For the convenience of my customers, I compiled a quickie setup guide so they don’t have the RTFM.

E2050A does not have DHCP. Most likely your network doesn’t have a ancient BOOTP server, so it means you are better off letting E2050A have a static IP address.

The big idea is that you’ll first need to talk to the E2050A, and the only way it can happen is that the computer talking to it has to be on the same subnet (and the corresponding IP address range). Doesn’t matter how you achieve it as long as you keep this in mind. Once you gained access to the router (telnet config screen), you can change the network setting of the E2050A to match whatever network you want to put it on later.

If you don’t know the E2050A’s network configuration, reset it to the default so you have a deterministic starting point and follow the instructions below:

  1. Reset the instrument to factory state by holding down CONFIG PRESET switch while applying power, because you want to know the IP address for sure so you can get into the instrument.
  2. The default static IP address is 192.0.0.192, under subnet mask 255.255.255.0
  3. Most likely your internal network is not 192.0.0.XXX, so you might want to use a computer with a network card (NIC) to talk to the device directly* (point-to-point) first so you can gain entry to the E2050A and change its network configuration.
  4. The NIC on the computer talking to the E2050A must be set to an IP address in the same subnet. This means only the last (rightmost) group of the NIC’s static IP address can be different. An example for the computer’s NIC static IP setting: 192.0.0.190 with subnet 255.255.255.0.
  5. Now you can talk to the E2050A directly by addressing 192.0.0.190. If it’s a dedicated computer for an automation set and you don’t want it to talk to the rest of the network, you are done.

I made up 192.0.0.190. Anything from 192.0.0.1 to 192.0.0.254 works. Thou shalt not use 192.0.0.0 (for it is the network identifier) or 192.0.0.255 (for it is the network broadcast address) or 192.0.0.192 (as it conflicts with the E2050A’s IP).

Most likely you will want to put the E2050A on your home/business network for convenience, unless you want to eliminate network security issues. Then you’ll need to follow a few more steps:

  1. Telnet to the E2050A at 192.0.0.192 to change its static IP address and subnet to fit your network. After saving and rebooting, you must address it with the new IP address you assigned (obviously!).
  2. Note that the default (SICL) interface name on the E2050A is “hpib”, which is different from E5810A’s default “gpib0”. Either change it on the E2050A (it’s called “hpib-name”) or enter the “hpib” for interface name on Agilent’s I/O suite.
  3. You can leave the rest of the settings alone in Agilent I/O suite if you want to simply talk (in its raw, instrument-specific GPIB commands) to the unit without using VISA or SICL layers (standardized syntax).

E2050A has the same software communication interface as E5810A, so you can just select E5810A as the remote interface for the E2050A and remember to enter the correct interface name as discussed above.

Note that E2050A does not work properly (won’t detect) on the redesigned Keysight-branded I/O Suite until version 2019. Please either use version 2019 and after OR the older Agilent branded I/O Suite.

I have E2050A as well as E5810A for sale. Please contact me from my business website (www.humgar.com) or my phone 949-682-8145.


* Unless you are using a very ancient computer, the NIC can auto-negotiate direct connection that you can simply use any regular old straight RJ-45 cable. If you have a really old computer, you’ll need a cross-over cable to do point-to-point ethernet.

Loading

GPIB to Ethernet Gateway (Agilent E2050A or E5810A, NI, Tek, ICS) Don't bother with USB-GPIB adapters. Ethernet-GPIB gateways are cheaper and better.

GPIB gateway is a device that allows you to remotely control / talk-to test instruments (as well as ancient printers/plotters, etc) that uses the most popular protocol. It’s so popular and timeless that even new test instrument finds a way to support it. This protocol just wouldn’t die.

The major downside of USB-GPIB interfaces (cheaper) is that it requires driver support, which is OS dependent. Keysight can choose to drop support at anytime. You can always fire up a virtual machine to use old software talking to a hardware using TCP/IP, but not reliably with USB (sometimes you get glitches and timing issues with virtual machines especially when it streams live data even at kHz range).

It’s usually a good idea to stick with GPIB if you have an automation setup that involves at least ONE piece of test instrument on GPIB. A ethernet port (LXI) on a modern test gear is fine, but you don’t really want to complicate your code managing network connectivity checks for each IP-based instrument and make sure they work together. With GPIB, you can chain 14 instruments with one gateway so you don’t have to worry about network problems if you can connect to any one of the device on the chain.

Here’s a nice GPIB tutorial document if you’d like to get into the nitty-gritty:
http://www.essproducts.com/wp-content/uploads/2015/06/ab48_11.pdf


E2050A is my favorite GPIB gateway due to its compact size. It’s good enough for most purposes, since I don’t really have any instruments that need or support the extra speed from 488.2. The biggest annoyance is that E2050A does not have DHCP, but uses an an ancient BOOTP instead. This means for modern networks, you might as well give it a static IP.

E5810A is the newer revision of E2050A, with the same internal interfaces. That means all software, including Agilent I/O Suite, fully supports E2050A as a E5810A. E5810A comes with a few minor improvements

  • it adds a web interface (not very useful other than upgrading firmware)
  • supports 488.2, which means 9x faster GPIB communication if the instrument supports it
  • DHCP: automatically acquiring IP address

Unfortunately, E5810A is a bigger unit, partly because the power supply is built-in, and it comes with a LCD screen. Nonetheless, I opened up a E5810A and the inside has a lot of empty spaces.

Telnet is supported for both E5810A and E2050A. For E2050A, telnet is the only way you can get inside the unit and change the configuration such as IP address and interface name. Telnet is pretty easy to use, just get the free, open-source Putty if your Windows does not come with command line telnet anymore.


There’s a E5810B, but in my opinion, it’s pointless because all it adds is a USB-over-IP interface and a front switch. This is something most ASUS routers (especially Merlin firmware) has it out of the box or there are some cheap old USB-over-IP modules (<$50) for it.  Basically if you are considering a E2050/E5810, your eyes are on the GPIB instrument base, not the USB instruments that you can put on the network with low cost USB-over-IP. It’s just fluff for Agilent/Keysight to discontinue support for the earlier models to price differentiate from the units circulating in the used market.


I’ve tried other gateways such as NI and Tektronix. There are not many NI gateways floating around and I’ve only encountered even fewer Tek gateways. Unless you have poorly written software that hard-codes to NI or Tek stack, I wouldn’t even bother installing NI/Tek GPIB stack as it can confuse some poorly designed software if the 3 stacks are not configured properly to work together peacefully. Just stick with the GPIB stack from the brand that you can easily get used units for cheap.

Be very careful about NI GPIB-ENET: it does not support anything after Windows XP at all, and there’s no way NI will bother to go back and fix it. For this I wouldn’t even want to touch any GPIB gateways done by NI since they are not as thoughtful about backward compatibility compared to HP/Agilent/Keysight.

ICS was popular a while ago making cheap GPIB controllers/converters. However, they don’t work with Agilent’s I/O suite or NI/Tek stack directly, so you are stuck with using it like a serial port. Given that the price of a used HP/Agilent’s GPIB gateway is cheaper than a new ICS gizmo, there’s no point getting ICS stuff anymore.


I have E2050A as well as E5810A for sale. Please contact me from my business website (www.humgar.com) or my phone 949-682-8145.

Loading

The mess converting decibels to voltages in test instruments (dBm, dBW, W, dbV, V)

Complex conversions between decibels and physical quantity has always been a rich source of confusion. The reason is that dB(something) is actually a loaded word with hidden assumptions:

  • dB always works on base-10
  • dB is always a relative (dimensionless) POWER quantity.
    The POWER quantity can be expressed in terms of non-power quantities (like voltages).
  • the scaling factor is always 10 for power.
    Adding one zero (multiply by 10) to the power ratio means +10dB.
  • dB(something) is always with respect to a quantity (the something), and the reference quantity is often not written in full. Since there is an implicit reference, db(something) can be mapped to absolute quantities.

If you are a diverse multi-disciplinary techie like me (math, electronics, programming, computers), it’d frustrate the hell out of you when you talk to people who has been working exclusively on a narrow field for at least a decade and they have a table of commonly used numbers in their memorized: they act like you are supposed to know how to get the numbers in the dB-variant that they use, than explaining to you what the field-specific assumptions are (likely because they forgot about it).

I hope this post will clear up the confusion by working out an example in test instrumentation, most commonly in RF as well, converting dBm to Volts.


Before I start, I’ll clarify the most common form of beginner confusion in EE and physics: converting between dB and voltages:

\mathrm{dB} = 20\log_{10}(V) = 10\log_{10}(V^2)

This looks like a definition of decibel, except the scaling factor is 20 magically for Volts. It is correct because we always work in power and power can be expressed as voltage-squared (resistances in the divisor cancel out if they are the same). Most people take it as an equivalent definition of decibels, and throw away these important assumptions behind it:

  • the reference is 1V,
  • and the resistance* (common to the voltage of interest and the reference voltage) gets cancelled

and run into troubles when they venture into those dB-variants like dBm. Technically the above should be written as dBV, but I have seen very few people use the clearer term.

The decibel formula for voltage came from

\mathrm{dBV} = 10\log_{10}(\frac{P}{P_{ref}})

where P = \frac{V^2}{R} and P_{ref} = \frac{1^2}{R}, you get

\mathrm{dBV} = 10\log_{10}(\frac{V^2/R}{1^2/R})

The R get cancelled out and you get

\mathrm{dBV} = 10\log_{10}(V^2)

People moved the squaring out and lumped (multiplied) it with the scaling factor 10:

\mathrm{dBV} = 20\log_{10}(V)

So the whole reason why it is 20 instead of 10 is simply because P\propto V^2, and \log(V^2) \equiv 2\log(V).


Now back to the business converting dBm to dBV or Volts.

First of all dBm is dB(mW), NOT dB(mV). The RF/telecom people are just too lazy to write out the most important part: the physical quantity expressly, because nearly all the time, it’s the power that matters to them.

However, I often need to connect a RF generator to a high bandwidth oscilloscope, so the very self-centered RF/telecom nomenclature start to become problematic when people of different fields need to talk to each other. Oscilloscope see everything in volts. RF sees everything in power, often in dB.

Then we get to the (mW) part, which means the reference quantity in the definition is 1mW, which is a physical quantity with dimensions. Then how are we going to convert it to Volts? You cannot jump to the shortcut formula I illustrated above with the 20 factor this time because the reference is in mW and your quantity is in Volts.

You’ll need to convert power to voltages. To do so, you’ll need to know voltages induced by power ‘dissipated’ through a ‘resistance’ across a component (load). The missing gap is that you will need to know the load ‘resistance’ before the conversion. With that, you can use P = V^2/R, or rewritten as V^2 = PR when it’s more convenient.

All RF-related test-instruments and bench function generators typically have a 50Ω output impedance, which means it also assumes a matching 50Ω as mathematically, it provides the maximum power transfer (sadly split evenly between the load and wasted at the instrument’s output impedance). For convenience, the amplitude you see in the instrument control panel refers to the amplitude you see at a 50Ω load, not what the instrument pumps out internally (that’s why you see 2Vpp when your function generator says 1Vpp if you hook it up to a low-end oscilloscope that serves 1MΩ by default).

Since we are dealing with continuous wave (not transient power), all amplitude quantities on RF test instruments are in RMS (power or voltage) unless otherwise specified. So the quantities we have for dBm is

\mathrm{dBm} = 10\log_{10}(\frac{P_{rms}}{1mW})

when written in terms of voltages,

\mathrm{dBm} = 10\log_{10}(\frac{V^{2}_{rms}/50Ω}{1mW})

Instead of splitting it into 3 terms and immediately grouping the constants, I’d like to first convert dBm to dBW:

\mathrm{dBW} = 10\log_{10}(P/1W)

\mathrm{dBm} = 10\log_{10}(P/0.001W) = 10(\log_{10}(P/1W) + \log_{10}(1000))

The linear quantity in dBm is artificially scaled 1000 times bigger than in dbW, to put it in a comfortable scale for us to work with smaller signals. Therefore dBm is always 30dB higher than dbW (the smaller the reference, the bigger the relative numbers look).

So back to the above in dBW, we subtract 30dB to get to dBW:

\mathrm{dBm} = \mathrm{dBW} + 30\mathrm{dB}

where

\mathrm{dBW} = 10\log_{10}(V^{2}_{rms}/50Ω)

We can separate the load and put it on the left hand side

\mathrm{dBW} + 10\log_{10}(50Ω) = 10\log_{10}(V^{2}_{rms})

The right hand side is dBV, and you can think of the load as scaling the power up (inducing) the voltage-squared quantity (V^2 = PR, or \log(V^2) = \log(P) + \log(R)).

10\log_{10}(50Ω) is 16.9897dB, for most purposes I’ll just say the load lift the dBW by 17dB when turning it into dBV.

Having both together,

\mathrm{dBW} + 17\mathrm{dB} = \mathrm{dBV}
\mathrm{dBW} = \mathrm{dBm} - 30\mathrm{dB}

\mathrm{dBm} - 30\mathrm{dB} + 17\mathrm{dB} = \mathrm{dBV}
(This is how you should remember it, so you can replace the +17dB for 50Ω with
10\log_{10}(R) when you work on other applications, like 600Ω, 4Ω, 8Ω for audio.)

Basically:

-30dB to undo the mili- prefix at reference power
(with dBm, the power ratio is bloated by 1000 times, aka by 3 zeros)
+17dB to account for the load inducing the voltage by burning Watts

The end result (for the 50Ω case):

\mathrm{dBV} = \mathrm{dBm} - 13\mathrm{dB}

Then you can convert dBV to V_{rms}:

\mathrm{dBV} = 10\log_{10}(V^2_{rms}/1^2) = 20\log_{10}(V_{rms})

V_{rms} = 10^{\frac{\mathrm{dBV}}{20}}

V_{rms} = 10^{\frac{\mathrm{dBm}-13dB}{20}}

Phew! That’s a lot of steps to get to something this simple. So the moral of the story is that these assumptions cannot be ignored:

  • The quantity is always power in dB, not voltages
  • dB(mW) has a reference of 1mW. The smaller the reference, the bigger the numbers
  • RMS voltages and power are used in RF
  • 50Ω is the load required to convert from power to voltages

Keysight already has a derivation, but it’s just a bunch of equations. The missing gap I want to fill in this blog post is that people find this so confusing they’d rather believe a formula or a table pulled on the internet:  it doesn’t have to be this way after realizing that there’s a bunch of overlooked assumptions.


* Technically I should call it (load) impedance Z, as in RF, capacitive and inductive elements are nearly always involved, but I want to make it appealing to those with high school physics background.

Loading

Newark Electronics’ order fulfillment/invoicing/logistics is deeply broken

It has always been a weird experience dealing with Newark as their order has always come in ridiculously wastefully packed shipments, like ONE standard size jiffy bag FOR EACH pack of 5 resistors (I got like a dozen of jiffy bags after unpacking). It resulted in oversized boxes that could have been expensive to ship as it’s charged dimensional weights. Then they split shipments whenever and whatever way they feel like it without consulting me at all.

I had multiple deliveries of jiffy bags by UPS/Fedex that packs a feather each when Newark could have waited a little and consolidated them in one box/bag. I never complained because the shipping they charged me was as if everything were packed sanely in one shipment. I always wondered if they had deals with Fedex/UPS that will allow them to be this wasteful.

However, after my most recent order (early 2019), I had enough with Newark. Apparently over the years the operations management avoided addressing their messy web order, logistics, fulfilling and invoicing infrastructure and used the savings to cover the overhead losses. This time, they screwed up the invoicing so I got overcharged, and on an unrelated issue, randomly made pay one of their stupidity overheads for the first time.

When I called customer service, they initially said I shouldn’t be charged more for extra shipments caused by Newark breaking the order into a few installments. It’s not special order or back-order or even direct-ship order. It was a pack of zener diodes is from UK warehouse, which Newark stated it’s going to take longer but they won’t charge extra to ship. In fact, I was not charged extra shipping for the other two packs (also from their UK warehouse) that was EACH shipped separately through UPS. Stuff from UK warehouse was never charged extra shipping for my past orders either.

Nonetheless, once I pull up the credit card records showing I was charged $10.22 for shipping a $0.19 pack of zener diodes, the customer service representative changed stance and said that Newark charged me exactly what UPS scanned and charged them AFTER the item was shipped. Basically they are saying that you gave them a blank check for shipping if you ordered from Newark. This is where I decided to stop doing business with Newark. The distributor has all the weight and size data that customers have no access to. They are responsible for quoting how much shipping will cost (at least within ballpark) before we agree to order from them, so we know the actual costs for comparing it with a different distributor.

They also screwed up the web pricing for the Molex tool that I ordered. Everything I was told until I completed checkout said $50.15 (web-only pricing), but the invoice I received says $59 (normal pricing, which is higher than everybody else). They credited me the difference back, but I observed they cannot do it easily and not until the order has shipped, so I had to call back later. This means if you order from Newark, they can stealthily charge you full price when your web-order should have been charged web-only pricing, unless you catch them in the act.

My second last order with them was actually in a hurry, but 3 days is fine so I picked USPS Priority (which is guaranteed to be at most 3 days). The ordered ended up arriving more than a week later because they stealthily shipped with UPS Ground and charged me USPS Priority price because their system has a glitch that prevents them from using USPS. They didn’t put the information anywhere on their webpages (now they do after I called and complained) and nobody told me about that. Apparently they didn’t realize that despite Newark pays more to ship with UPS ground, I got my order slower than the cheaper USPS priority I asked and paid for.

Newark electronics’ system is deeply broken. After leaving them the worst feedback possible with their survey engine, the customer service followed-up with this:

Thank you for your feedback.  I apologize for the frustration which you have experienced with our company regarding your orders.  Please allow me to address the situations as they are listed.

  1. The listed shipping at checkout is an estimation, and the final invoicing is lists the shipping charges based on the scanning of package by UPS with current rates.
  2. Orders may be in separate packaging, as our warehouse is the size of several football fields and putting parts from different sides of the facility into the same box is not a workable solution.
  3. Unless otherwise chosen as “ship complete” on the website by the customer, orders may be shipped in installments as product is available.  Backordered portions will be shipped separately.
  4. In response to UPS shipping as opposed to USPS, the Postal Service’s software has a glitch that does not allow it to communicate with our system.  Updates are being installed and upgrades implemented to resolve this situation.

None of that admits their faults. They ‘addressed’ it by pointing fingers and citing illegitimate excuses, which I am the most upset about:

  1. HOW are we supposed to know how much will it cost to ship something if your ‘estimation’ can be way-off and you are not responsible for even staying in the ballpark?
  2. WHY are we supposed to pay for your logistic problems? The orders I received from Digikey/Mouser/Allied were packed nowhere nearly as wasteful. Yours can’t be the norm. Fix it!
  3. WHEN did you tell me that I’ll be charged for the separate shipments for the installments you decided on your own? Until the order is shipped and I’m stuck with the charges!
  4. WHO did you assign to tell me when you switched to a slower and more expensive shipper because of your software problem (that Mouser/Digikey was able to get around if it was USPS’s fault), and threw my plans off because my order arrived very late?

WTF Newark!

Newark’s operations are completely dysfunctional. I don’t think Newark even intended to bill me for shipping the tiny bag of zener diode separately. I was pissed because the customer service gave me the ‘policy’ bullshit because they don’t want to do the hard work getting to the bottom of it because Newark’s billing jungle is so daunting. I know it’s bullshit because if they could legitimately charge me extra for one separate shipment, they would have done it for the other two separate shipments, which could be much more.

At the end of the day, if I had not caught Newark shortchanging me, I would have paid more than Digikey/Mouser just to get the same parts shipped late. It’s not worth the hassle to get just $10.22 back by spending hours on the phone digging through their accounting nightmare (their billing is kludgy: I got 5 invoices for 1 order, yet I received 4 shipments), but I chose to spend the time to blog about it so others won’t have to deal with this kind of structural incompetence across the board until Newark gets their act together.

I was worse off in every way ordering from Newark.

They make you pay more for less by not telling you the deviations from your original order that Newark introduced for their own convenience until the order has shipped and everything set in stone.

Newark didn’t get more money by making their customers worse off. The company paid a fair share of the unnecessary overheads too. To put it more bluntly: the entire infrastructure is falling apart and nobody gives a shit. I’ve seen more motivated people working at the post office.

Loading