40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  PSL  Not logged in ELOG logo
Entry  Mon Dec 12 18:49:57 2016, awade, DailyProgress, Computers, netGPIB python tools and python 3 
    Reply  Wed Dec 14 14:45:10 2016, awade, DailyProgress, Computers, netGPIB python tools and python 3 
Message ID: 1792     Entry time: Wed Dec 14 14:45:10 2016     In reply to: 1788
Author: awade 
Type: DailyProgress 
Category: Computers 
Subject: netGPIB python tools and python 3 

I got this working by just reverting back to python 2.7.  I'm using conda (on mac) to manage python packages so instructions are in reference to that.

To create environment in bash type

bash$ conda create -n py27 python=2.7 anaconda

Then switch to py27 env (on mac)

bash$ source activate py27

Most of the functionality is now condensed into SRmeasure function. Typical useage is

SRmeasure SPSR785template.yml -i <IPaddress> -f <BaseOfFilename>

Where SPSR785template.yml is the measurment configuration file and optional arguments -i and -f override config file to give a different IP address and file name base (before it adds time and date). If these are set in the file then just leave these flag options off.

To reset SR785

SRmeasure -i <IPAddress> --reset

For all other details

SRmeasure --help






I've spent a good chunk of the day working out how to use the set of python scripts used to communicate with the SR785 and the AG4395A through Ethernet. These uses the yellow Prologix gpib card. The main motivation is that I'm sick of using floppy disks, I also have always wanted to just script measurements for LP FFT spans to save time.

For future reference SVN repo: /trunk/getgpibdata/netgpibdata/

Instructions: https://wiki-40m.ligo.caltech.edu/netGPIB#preview (out of date at time of writing)

It appears that the code isn't python 3 ready, many of the print commands are missing parenthesis etc. I fixed most of these, but am hung up on line 16 of  netgpib.py, where 

self.eotNum = struct.unpack('B',eot)[0]

throws and error on the basis that eot (defined as eot = '\004') is a string not a byte-like object. This is just the default end of transmission character, its just not clear to me what has changed between python 2 and 3 in the representation of these characters.  Don't really know what is going on with this.

ericq also has a public git repository here: https://github.com/e-q/netgpibdata , it looks about the same vintage (two years ago) so will probably have the same issue.  



Aside, last post on subject: PSL:1576



ELOG V3.1.3-