Products > Test Equipment
HP E2050A LAN/GPIB Gateway setup instructions
CodingMarco:
Hi all,
I know the E2050A LAN/GPIB gateway is not widely used, but anyway I wanted to post these short instructions on how to set it up because it may not be very intuitive at first, even with the manual.
Steps 2. and 9. were the most unintuitive ones for me.
Initial setup for usage with PyVISA:
1. Plug in power and connect the Gateway with a LAN cable to your computer
2. Press the "Config Preset" button on the back of the E2050A. This will temporarily start the gateway with a default configuration. The saved configuration is not changed or resetted except when you tell it explicitly to do so. When it is rebooted, the saved configuration is loaded again.
3. Configure your LAN interface:
- IPv4 address: 192.0.0.1
- Netmask: 255.255.255.0
- Gateway: doesn't matter (eg. 0.0.0.0)
4. Connect to the E2050A using telnet: telnet 192.0.0.192. This IP is the default IP when the "Config Preset" button was pressed.
5. Enter factory-reset, hit enter. Confirm and reconnect as necessary.
6. Enter ip: 192.168.178.188 (or whatever IP address you like)
7. Enter default-gw: 192.168.178.1. The subnet (here: 192.168.178) has to match that of the IP above
8. Enter subnet-mask: 255.255.255.0
9. Enter hpib-name: gpib0. This is a very important step. The zero is there intentionally.
10. Change other configuration values if you like
11. Enter reboot to save the config and reboot
12. Configure your LAN interface to match the configuration you chose for the gateway:
- IPv4 address: same as default-gw
- Netmask: 255.255.255.0
- Gateway: doesn't matter (eg. 0.0.0.0)
Connect to instruments through the gateway using PyVISA:
--- Code: ---import pyvisa
rm = pyvisa.ResourceManager()
instr = rm.open_resource("TCPIP0::<IP of E2050A>::gpib0,<gpib address>::INSTR")
print(instr.query("*IDN?"))
--- End code ---
Hope this helps and saves some headaches.
gslick:
I haven't tried using PyVISA with my E2050A yet, I have only used it with the Agilent / Keysight IO Libraries software so far. I'll have to try using it with PyVISA sometime.
It is also possible to do the initial configuration of the E2050A through the serial port instead getting it configured for a Telnet connection. That might be easier in some cases.
You can connect a terminal or PC running a terminal emulator to the E2050A RS-232 port using a null modem cable at 19200,N,8,1 and after hitting <CR> it should bring up the configuration menu.
Serial port output at 19200,N,8,1 after sending a CR to the E2050A after power up:
--- Code: ---Welcome to the E2050A LAN/HP-IB Gateway configuration utility.
Commands
? Show additional commands
exit, quit Exit WITHOUT saving configuration changes
reboot Save configuration changes and restart
status Show the LAN/HP-IB Gateway connection status
Configuration Parameters
hostname: E2050 # Internet domain name
hardware-addr: 0800091AEE6E # Ethernet station address
ip: 192.168.1.20 # Internet Protocol address
default-gw: 192.168.1.1 # Default subnet gateway IP address
subnet-mask: 255.255.255.0 # Network subnet mask
syslog-svr: 0.0.0.0 # Syslog server IP address
bootp: OFF # Obtain config via BOOTP/TFTP
lan-timeout: 0 # LAN connect timeout in seconds
io-timeout: 120 # Server I/O timeout in seconds
allow: * # IP allow list
hpib-address: 21 # HP-IB System Controller Address
hpib-name: gpib0 # HP-IB interface symbolic name
hpib-unit: 7 # HP-IB logical unit number
> ?
Available commands are:
allow: <ip> [<ip>] Set the allow list for IP security
bootp: <ON|OFF> Turn ON or OFF use of BOOTP/TFTP
bye Quit without saving configuration - see reboot
config Show current settings
default-gw: <ip address> Set the default subnet gateway address
exit Exit without saving configuration - see reboot
factory-reset Reset configuration to factory defaults and reboot
hardware-addr Display the ethernet station address
help Print help information
hostname: <string*35> Set the internet domain name
hpib-address: <0-30> Set the HP-IB system controller address
hpib-name: <string*15> Set the HP-IB interface symbolic name
hpib-unit: <1-255> Set the HP-IB logical unit number
io-timeout: <seconds> Set the server I/O timeout in seconds. 0 is Off.
ip: <ip address> Set the IP address
lan-timeout: <seconds> Set the LAN connect timeout in seconds. 0 is Off.
quit Quit without saving configuration - see reboot
reboot Save configuration and restart
status Show the LAN/HP-IB Gateway connection status
subnet-mask: <mask> Set the network subnet mask
syslog-clear Clear the syslog
syslog-display Display the syslog contents
syslog-svr: <ip address> Set the syslog server address
version Show the firmware revision
> version
Software revision A.01.03
Bootrom revision A.01.00
--- End code ---
dxl:
--- Quote from: CodingMarco on September 11, 2022, 05:48:14 pm ---
--- Code: ---import pyvisa
rm = pyvisa.ResourceManager()
instr = rm.open_resource("TCPIP0::<IP of E2050A>::gpib0,<gpib address>::INSTR")
print(instr.query("*IDN?"))
--- End code ---
--- End quote ---
I build a simple GPIB-LAN gateway with the help of a GPIB-USB-HS Adapter, a raspberry pi and some python software. One thing that doesn't work is the automatic discovery of gpib devices. I've somewhere read that TCPIP::IP::gpib0::INSTR is used for that - so simply specifying gpib0 instead of gpib0.X. Do you know anything about that, or could you try what happens if you send such a request?
Thanks! :)
CodingMarco:
--- Quote from: dxl on September 19, 2022, 08:15:52 pm ---I build a simple GPIB-LAN gateway with the help of a GPIB-USB-HS Adapter, a raspberry pi and some python software. One thing that doesn't work is the automatic discovery of gpib devices.
--- End quote ---
I think you'll have to implement this yourself. For example use rm.list_resources() on the raspberry pi and somehow return the result.
--- Quote from: dxl on September 19, 2022, 08:15:52 pm ---I've somewhere read that TCPIP::IP::gpib0::INSTR is used for that - so simply specifying gpib0 instead of gpib0.X. Do you know anything about that, or could you try what happens if you send such a request?
--- End quote ---
I don't think this address syntax is used. At least I can't find it in the manual of any LAN-GPIB gateway. If I try to open the E2050A like that, open_resource() works, but any operation on the opened resource results in an I/O error.
However, Keysight IOLibs support auto-discovery of instrument with the E2050A. I have attached a Wireshark dump of the packets being sent during the auto-discovery process. To me, it looks like it's just probing all addresses.
dxl:
--- Quote from: CodingMarco on September 21, 2022, 07:47:44 am ---
--- Quote from: dxl on September 19, 2022, 08:15:52 pm ---I build a simple GPIB-LAN gateway with the help of a GPIB-USB-HS Adapter, a raspberry pi and some python software. One thing that doesn't work is the automatic discovery of gpib devices.
--- End quote ---
I think you'll have to implement this yourself. For example use rm.list_resources() on the raspberry pi and somehow return the result.
--- End quote ---
Well, i did that. I used the python-vxi11-server from https://github.com/coburnw/python-vxi11-server.git as a "framework".
--- Quote from: CodingMarco on September 21, 2022, 07:47:44 am ---
--- Quote from: dxl on September 19, 2022, 08:15:52 pm ---I've somewhere read that TCPIP::IP::gpib0::INSTR is used for that - so simply specifying gpib0 instead of gpib0.X. Do you know anything about that, or could you try what happens if you send such a request?
--- End quote ---
I don't think this address syntax is used. At least I can't find it in the manual of any LAN-GPIB gateway. If I try to open the E2050A like that, open_resource() works, but any operation on the opened resource results in an I/O error.
However, Keysight IOLibs support auto-discovery of instrument with the E2050A. I have attached a Wireshark dump of the packets being sent during the auto-discovery process. To me, it looks like it's just probing all addresses.
--- End quote ---
Thanks, that's very helpful. I'll take a look. The auto discovery feature isn't really required, but it would be a 'nice to have".
Otherwise it's already useful - i wrote a python script to calibrate the flatness on my 8563E which suffers from the usually RYTHM problem with the help of a 8340A Sweeper.
Navigation
[0] Message Index
[#] Next page
Go to full version