Last active
February 13, 2024 23:31
Revisions
-
C.A.P. Linssen revised this gist
Jan 2, 2019 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,14 +17,13 @@ make sudo make install cd .. sudo ln -s /usr/local/lib/libgpib.so.0 /lib/libgpib.so.0 sudo cp -v gpib.conf /etc/gpib.conf sudo modprobe gpib_common sudo modprobe agilent_82357a sudo fxload -D /dev/bus/usb/`lsusb | grep Agilent | cut -f 2 -d " "`/`lsusb | grep Agilent | cut -f 4 -d " " | cut -f 1 -d ":"` -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex sleep 10 sudo fxload -D /dev/bus/usb/`lsusb | grep Agilent | cut -f 2 -d " "`/`lsusb | grep Agilent | cut -f 4 -d " " | cut -f 1 -d ":"` -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex sleep 10 sudo gpib_config echo "See https://gist.github.com/turingbirds/6eb05c9267a6437183a9567700e8581a for troubleshooting/further instructions" -
C.A.P. Linssen revised this gist
Dec 28, 2018 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,6 @@ Also download the firmware binary for the 82357B: wget --content-disposition --no-check-certificate http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz tar xvfz gpib_firmware-2008-08-10.tar.gz `fxload` is used to upload firmware to the GPIB interface. -
C.A.P. Linssen revised this gist
Dec 26, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ GPIB interfacing using Agilent 82357B on Ubuntu Linux I initially had some problems installing on my laptop, so decided to boot Ubuntu 12.04.5 LTS, 3.13.0-32-generic from USB and work from there. For an automated installation script, see `gpib_install.sh` (and `gpib.conf`) below. The rest of this document describes the actions of the installation script step-by-step. First, get the packages that are necessary to support Python bindings: :: -
C.A.P. Linssen revised this gist
Dec 26, 2018 . 3 changed files with 0 additions and 0 deletions.There are no files selected for viewing
Binary file not shown.Binary file not shown.Binary file not shown. -
C.A.P. Linssen revised this gist
Dec 26, 2018 . 1 changed file with 82 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,82 @@ /*********************************************************************** GPIB.CONF IEEE488 library config file ------------------- copyright : (C) 2002 by Frank Mori Hess (C) 1994 by C.Schroeter email : fmhess@users.sourceforge.net ***************************************************************************/ /*************************************************************************** * * Syntax: * * interface { ... } starts new interface board section * device {...} device configuration * ***************************************************************************/ /* This section configures the configurable driver characteristics * for an interface board, such as board address, and interrupt level. * minor = 0 configures /dev/gpib0, minor = 1 configures /dev/gpib1, etc. */ interface { minor = 0 /* board index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1, etc. */ board_type = "agilent_82357a" /* type of interface board being used */ name = "agi" /* optional name, allows you to get a board descriptor using ibfind() */ pad = 0 /* primary address of interface */ sad = 0 /* secondary address of interface */ timeout = T3s /* timeout for commands */ eos = 0x0a /* EOS Byte, 0xa is newline and 0xd is carriage return */ set-reos = yes /* Terminate read if EOS */ set-bin = no /* Compare EOS 8-bit */ set-xeos = no /* Assert EOI whenever EOS byte is sent */ set-eot = yes /* Assert EOI with last byte on writes */ /* settings for boards that lack plug-n-play capability */ base = 0 /* Base io ADDRESS */ irq = 0 /* Interrupt request level */ dma = 0 /* DMA channel (zero disables) */ /* pci_bus and pci_slot can be used to distinguish two pci boards supported by the same driver */ /* pci_bus = 0 */ /* pci_slot = 7 */ master = yes /* interface board is system controller */ } /* This is how you might set up a pcIIa board on /dev/gpib1, uncomment to use. */ /******************* interface { minor = 1 board_type = "pcIIa" pad = 0 sad = 0 timeout = T3s eos = 0x0a set-reos = yes set-bin = no base = 0x2e1 irq = 7 dma = 1 master = yes } *********************/ /* Now the device sections define the device characteristics for each device. * These are only used if you want to open the device using ibfind() (instead * of ibdev() ) */ device { minor = 0 name = "hp3456a" pad = 22 } -
C.A.P. Linssen revised this gist
Dec 26, 2018 . 1 changed file with 30 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ #!/usr/bin/env bash sudo apt-get update sudo apt-get install python-dev libboost-python-dev python-setuptools --yes wget --content-disposition --no-check-certificate https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/3.2.20/linux-gpib-3.2.20.tar.gz/download tar xvfz linux-gpib-3.2.20.tar.gz cd linux-gpib-3.2.20 ./configure make -j8 sudo make install cd .. wget --content-disposition --no-check-certificate http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz tar xvfz gpib_firmware-2008-08-10.tar.gz wget --content-disposition --no-check-certificate https://downloads.sourceforge.net/project/linux-hotplug/fxload/2008_10_13/fxload-2008_10_13.tar.gz tar xvfz fxload-2008_10_13.tar.gz cd fxload-2008_10_13 make sudo make install cd .. sudo ln -s /usr/local/lib/libgpib.so.0 /lib/libgpib.so.0 sudo gpib_config sudo cp -v gpib.conf /etc/gpib.conf sudo modprobe gpib_common sudo modprobe agilent_82357a sudo fxload -D /dev/bus/usb/`lsusb | grep Agilent | cut -f 2 -d " "`/`lsusb | grep Agilent | cut -f 4 -d " " | cut -f 1 -d ":"` -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex sleep 3 sudo fxload -D /dev/bus/usb/`lsusb | grep Agilent | cut -f 2 -d " "`/`lsusb | grep Agilent | cut -f 4 -d " " | cut -f 1 -d ":"` -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex sleep 1 sudo gpib_config echo "See https://gist.github.com/turingbirds/6eb05c9267a6437183a9567700e8581a for troubleshooting/further instructions" -
C.A.P. Linssen revised this gist
Dec 26, 2018 . 1 changed file with 31 additions and 19 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,13 +3,19 @@ GPIB interfacing using Agilent 82357B on Ubuntu Linux I initially had some problems installing on my laptop, so decided to boot Ubuntu 12.04.5 LTS, 3.13.0-32-generic from USB and work from there. First, get the packages that are necessary to support Python bindings: :: sudo apt-get update sudo apt-get install python-dev libboost-python-dev python-setuptools --yes Download the linux-gpib package, unpack and build: :: wget --content-disposition --no-check-certificate https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/3.2.20/linux-gpib-3.2.20.tar.gz/download tar xvfz linux-gpib-3.2.20.tar.gz cd linux-gpib-3.2.20 ./configure @@ -24,9 +30,8 @@ Also download the firmware binary for the 82357B: wget --content-disposition --no-check-certificate http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz tar xvfz gpib_firmware-2008-08-10.tar.gz cd .. `fxload` is used to upload firmware to the GPIB interface. :: @@ -37,20 +42,25 @@ Use `fxload` to upload firmware to the GPIB interface: sudo make install cd .. Edit ``/etc/gpib.conf`` (as superuser) to fill in the correct board type: :: interface { board_type = "agilent_82357a" name = "agi" ... } See the attached `gpib.conf` for the full contents of the file (other parameters were left at their default values). Load kernel module(s): :: sudo modprobe gpib_common sudo modprobe agilent_82357a Insert the dongle into the USB port. Only the red "FAIL" LED should be on. Find the bus and device ID: :: @@ -66,7 +76,7 @@ e.g. ... Plug the found bus and device ID into the command for fxload: :: sudo fxload -D /dev/bus/usb/002/005 -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex @@ -88,7 +98,7 @@ e.g. ... Run fxload again with the new bus and device ID: :: sudo fxload -D /dev/bus/usb/002/006 -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex @@ -107,32 +117,34 @@ Now, initialize the dongle. ``gpib_config`` has some trouble finding the library sudo ln -s /usr/local/lib/libgpib.so.0 /lib/libgpib.so.0 sudo gpib_config Only the green "READY" LED should now be on. Now, make an entry for your device in ``/etc/gpib.conf``. Default HP3456B factory address is ASCII "V" (22 dec) for talk and "6" for listen. :: device { name = "hp3456a" pad = 22 ... } You can use ``ibtest`` to do some testing. :: ibtest A simple Python interface can now be made using the linux-gpib Python bindings: :: import gpib dev = gpib.find("hp3456a") # corresponds to device ID in ``/etc/gpib.conf`` print gpib.read(dev, 99) For more advanced applications, consider using the visa (PyVISA) libraries. References -
turingbirds revised this gist
Dec 25, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Also download the firmware binary for the 82357B: :: wget --content-disposition --no-check-certificate http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz tar xvfz gpib_firmware-2008-08-10.tar.gz cd .. -
turingbirds revised this gist
Dec 16, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -131,7 +131,7 @@ A simple Python interface can now be made using the linux-gpib Python bindings. import gpib dev = gpib.find("hp3456a") # N.B. define device ID in ``/etc/gpib.conf`` print gpib.read(dev, 99) -
turingbirds revised this gist
Dec 16, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -106,7 +106,7 @@ Now, initialize the dongle. ``gpib_config`` has some trouble finding the library :: sudo ln -s /usr/local/lib/libgpib.so.0 /lib/libgpib.so.0 sudo gpib_config Only the green "READY" LED should now be on. -
turingbirds revised this gist
Dec 16, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,15 +22,15 @@ Also download the firmware binary for the 82357B: :: wget http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz tar xvfz gpib_firmware-2008-08-10.tar.gz cd .. Use `fxload` to upload firmware to the GPIB interface: :: wget --content-disposition --no-check-certificate https://downloads.sourceforge.net/project/linux-hotplug/fxload/2008_10_13/fxload-2008_10_13.tar.gz tar xvfz fxload-2008_10_13.tar.gz cd fxload-2008_10_13 make -
turingbirds revised this gist
Dec 16, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Download the linux-gpib package, unpack and build. Get ``python-setuptools`` fir wget --content-disposition --no-check-certificate https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/3.2.20/linux-gpib-3.2.20.tar.gz/download sudo apt-get update sudo apt-get install python-dev libboost-python-dev python-setuptools --yes tar xvfz linux-gpib-3.2.20.tar.gz cd linux-gpib-3.2.20 ./configure -
turingbirds revised this gist
Dec 16, 2016 . 1 changed file with 30 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,13 +19,17 @@ Download the linux-gpib package, unpack and build. Get ``python-setuptools`` fir Also download the firmware binary for the 82357B: :: wget http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz tar gpib_firmware-2008-08-10.tar.gz cd .. Use `fxload` to upload firmware to the GPIB interface: :: wget --content-disposition --no-check-certificate https://sourceforge.net/projects/linux-hotplug/files/fxload/2008_10_13.tar.gz/download tar xvfz fxload-2008_10_13.tar.gz cd fxload-2008_10_13 @@ -35,70 +39,96 @@ Use `fxload` to upload firmware to the GPIB interface: Edit ``/etc/gpib.conf`` (as superuser) to say :: board_type = "agilent_82357a" name = "agi" Load kernel module(s): :: sudo modprobe gpib_common sudo modprobe agilent_82357a Insert the dongle into the USB port. Only the red "FAIL" LED should be on. Find the bus and device ID: :: lsusb e.g. :: ... Bus 002 Device 005: ID 0957:0518 Agilent Technologies, Inc. ... Plug the found bus and device ID into the command for fxload: :: sudo fxload -D /dev/bus/usb/002/005 -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex Still only the "FAIL" LED is on. The USB bus and device ID have now changed. Wait a moment and get the new ID: :: lsusb e.g. :: ... Bus 002 Device 006: ID 0957:0518 Agilent Technologies, Inc. ... Run fxload again with the new bus and device ID: :: sudo fxload -D /dev/bus/usb/002/006 -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex All lights should be on. Change permissions on ``/dev/gpib0`` (ideally, you would manage this with a "gpib" usergroup instead): :: sudo chmod 666 /dev/gpib0 Now, initialize the dongle. ``gpib_config`` has some trouble finding the library, so create a symbolic link first: :: sudo ln -s /usr/local/lib/libgpib.so.0 /lib/libgpib.so.0 gpib_config Only the green "READY" LED should now be on. Now, make an entry for your device in ``/etc/gpib.conf``. Default HP3456B factory address is ASCII "V" (22 dec) for talk and "6" for listen :: ... name = "hp3456a" pad = 22 ... You can use ``ibtest`` to do some testing. :: ibtest A simple Python interface can now be made using the linux-gpib Python bindings. For more advanced applications, consider using the visa (PyVISA) libraries. :: import gpib dev = gpib.find("hp3456a") # N.B. define device ID in ``/etc/gpib.conf`` print dev.read() -
turingbirds revised this gist
Dec 16, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ I initially had some problems installing on my laptop, so decided to boot Ubuntu Download the linux-gpib package, unpack and build. Get ``python-setuptools`` first for later Python bindings support. :: wget --content-disposition --no-check-certificate https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/3.2.20/linux-gpib-3.2.20.tar.gz/download sudo apt-get update -
turingbirds revised this gist
Dec 16, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,8 @@ I initially had some problems installing on my laptop, so decided to boot Ubuntu Download the linux-gpib package, unpack and build. Get ``python-setuptools`` first for later Python bindings support. .. wget --content-disposition --no-check-certificate https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/3.2.20/linux-gpib-3.2.20.tar.gz/download sudo apt-get update sudo apt-get install python-dev libboost-python-dev python-setuptools -
turingbirds created this gist
Dec 16, 2016 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,110 @@ GPIB interfacing using Agilent 82357B on Ubuntu Linux ----------------------------------------------------- I initially had some problems installing on my laptop, so decided to boot Ubuntu 12.04.5 LTS, 3.13.0-32-generic from USB and work from there. Download the linux-gpib package, unpack and build. Get ``python-setuptools`` first for later Python bindings support. wget --content-disposition --no-check-certificate https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/3.2.20/linux-gpib-3.2.20.tar.gz/download sudo apt-get update sudo apt-get install python-dev libboost-python-dev python-setuptools tar xvfz linux-gpib-3.2.20.tar.gz cd linux-gpib-3.2.20 ./configure make -j8 sudo make install cd .. Also download the firmware binary for the 82357B: wget http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz tar gpib_firmware-2008-08-10.tar.gz cd .. Use `fxload` to upload firmware to the GPIB interface: wget --content-disposition --no-check-certificate https://sourceforge.net/projects/linux-hotplug/files/fxload/2008_10_13.tar.gz/download tar xvfz fxload-2008_10_13.tar.gz cd fxload-2008_10_13 make sudo make install cd .. Edit ``/etc/gpib.conf`` (as superuser) to say board_type = "agilent_82357a" name = "agi" Load kernel module(s): sudo modprobe gpib_common sudo modprobe agilent_82357a Insert the dongle into the USB port. Only the red "FAIL" LED should be on. Find the bus and device ID: lsusb e.g. ... Bus 002 Device 005: ID 0957:0518 Agilent Technologies, Inc. ... Plug the found bus and device ID into the command for fxload: sudo fxload -D /dev/bus/usb/002/005 -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex Still only the "FAIL" LED is on. The USB bus and device ID have now changed. Wait a moment and get the new ID: lsusb e.g. ... Bus 002 Device 006: ID 0957:0518 Agilent Technologies, Inc. ... Run fxload again with the new bus and device ID: sudo fxload -D /dev/bus/usb/002/006 -t fx2 -I gpib_firmware-2008-08-10/agilent_82357a/measat_releaseX1.8.hex All lights should be on. Change permissions on ``/dev/gpib0`` (ideally, you would manage this with a "gpib" usergroup instead): sudo chmod 666 /dev/gpib0 Now, initialize the dongle. ``gpib_config`` has some trouble finding the library, so create a symbolic link first: sudo ln -s /usr/local/lib/libgpib.so.0 /lib/libgpib.so.0 gpib_config Only the green "READY" LED should now be on. Now, make an entry for your device in ``/etc/gpib.conf``. Default HP3456B factory address is ASCII "V" (22 dec) for talk and "6" for listen ... name = "hp3456a" pad = 22 ... You can use ``ibtest`` to do some testing. ibtest A simple Python interface can now be made using the linux-gpib Python bindings. For more advanced applications, consider using the visa (PyVISA) libraries. import gpib dev = gpib.find("hp3456a") # N.B. define device ID in ``/etc/gpib.conf`` print dev.read() References ---------- .. [pyvisa] PyVISA https://pyvisa.readthedocs.io/en/stable/ .. [linux-gpib] linux-gpib : http://linux-gpib.sourceforge.net/