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: 1788     Entry time: Mon Dec 12 18:49:57 2016     Reply to this: 1792
Author: awade 
Type: DailyProgress 
Category: Computers 
Subject: netGPIB python tools and python 3 

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-