GPIB Intro

This page will cover GPIB issues in the 40m lab. Test equipment with a GPIB interface (such as the SR785) may be scripted from a computer.

This page explains the netgpib package, a collection of python scripts/modules to communicate with network connected GPIB devices.

GPIB hardware we have

Controlling GPIB instruments through network

This section describes how to setup and control GPIB instruments through network.

Overview

The basic idea is to talk to a GPIB instrument through a TCP/IP network using the prologix GPIB-Ethernet converter. For some GPIB instruments, like spectrum analyzers, it is convenient to be able to move them around freely. For this purpose, we connect the prologix box to the Martian wireless network through an ethernet-wireless bridge.

After proper setup work, the GPIB-Ethernet converter works as a host in the Martian network. It waits for connections at TCP/IP port 1234. You can talk to the converter by telnet. Simple tasks can be done in this way. More complicated tasks can be accomplished by, for example, python scripts. A python script netgpibdata.py to download data from analyzers will be explained later.

Hardware setup

Prologix

Unpack the box. Connect the prologix to a local network using an Ethernet cable. Connect your PC to the same network.

Execute netfinder.exe. On linux, you can use Wine to execute this file. For example, on Ubuntu, I was able to just install Wine from standard packages, and double clicking the netfinder.exe worked fine.

netfinder.exe will search prologix converters on the local network and let you configure the network settings of the converter. Assign a free Martian IP address to the box. You may want to ask Rana to assign a suitable host name for the box. If a hostname is assigned, please update the name server database on linux1.

Alternatively, if you would rather use python than Wine, you can use these python scripts: pynetfinder.tar.gz. You can search for controllers with python nfcli.py --list, and set parameters with something like python nfcli.py --eth_addr='00-21-69-01-03-99' --gateway='131.215.123.254' --ip_addr='131.215.123.65' --ip_type='static' --netmask='255.255.255.0'

The manual for the prologix converter is here: PrologixGpibLanManual.pdf

Linksys WET54G

You have to tell the WET54G which wireless network to connect.

Connect the WET54G and your computer directly with an Ethernet cable. Manually assign 192.168.1.25 to your computer. The netmask is 255.255.255.0 and the gateway is 192.168.1.1.

Open a web browser and go to 192.168.1.226. A password prompt should come up. Enter admin for both username and password. You may want to change the admin password later.

Setup the WET54G for the Martian network. The SSID is "40MARS". Security is off. Enable the MAC address cloning should be enabled.

Check the MAC address of the WET54G wireless port. Register this MAC address to the Martian wireless router. You can access the router by going to 131.215.113.220 from a Martian machine. The setting is in [Wireless]->[Wireless MAC Filter]

Assembly

Connect the Prologix box to a GPIB instrument. Then connect to the WET54G through an Ethernet cable. Confirm the connection by

 telnet 131.215.113.105 1234,

where 131.215.113.105 should be replaced by the IP address assigned to the Prologix box. The above command works only from a computer connected to the Martian network.

Basic usage

First, telnet to a Prologix converter. You can send commands by entering ascii text. Any statements starting with ++ will be interpreted as a command to the Prologix box. Otherwise, the string you entered is forwarded to the GPIB instrument.

++addr 10 will set the GPIB address of the instrument to which the Prologix box will talk with to 10.

++mode 1 sets the operation mode of the Prologix box. You will use mode 1 (controller) most of the time.

netgpibdata.py

This script downloads data from spectrum analyzers through network. It is on the 40m svn repository. You can download it from https://nodus.ligo.caltech.edu:30889/svn/trunk/getgpibdata/netgpibdata/.

Synopsis: netgpibdata.py [-f filename] [-d devicename] [-i ip_address] [-a gpib_address]

filename is the name of the file, without extension, to which the data is saved. If you specify -f spectrumdata , the downloaded data will be saved to spectrumdata.dat and the measurement parameters will be saved in spectrumdata.par.

The device name can be specified by -d devicename. Currently SR785 and AG4395A (Agilent 4395A network analyzer) are supported.

ip_address is the IP address or hostname of the Prologix converter.

gpib_address is the GPIB address of the instrument to talk to.

This script is now a part of netgpib package. More information is available here.

Old USB way

If you want to talk to a GPIB device through USB ports, some information is here.

Controlling GPIB devices through USB port

GPIB (last edited 2013-04-26 19:15:51 by EricquinteroATligoDOTorg)