Differences between revisions 2 and 12 (spanning 10 versions)
Revision 2 as of 2007-05-30 19:28:55
Size: 748
Editor: TobinFricke
Comment:
Revision 12 as of 2008-08-27 16:54:55
Size: 2874
Editor: YoichiAso
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= GPIB issues =
This page will cover GPIB issues in the 40m lab.
Line 3: Line 5:
= GPIB hardware we have = == GPIB hardware we have ==
Line 6: Line 8:
= GPIB scripting in Python = == Using Agilent 82357B USB-GPIB interface from Linux ==
82357B can be used from Linux using the linux-gpib driver. This section will explain how to install the driver
and use it from python and other languages.

=== Installation ===
===== What you need =====
Linux kernel source (2.6.8 or above)
python, python-dev
fxload (from linux-hotplug project)
lsusb (usbutils package)

Depending on your distribution, you may have to mount usbfs to /proc/bus/usb.
(In Fedora, it is automatically mounted).
If needed, you may want to add the following line to /etc/fstab

{{{
usbfs /proc/bus/usb usbfs defaults 0 0
}}}

===== Installing linux-gpib driver =====
Before installing linux-gpib driver, create a group {{{gpib}}}, by {{{sudo vigr}}}.

You want to add some users (e.g. controls) to {{{gpib}}} group so that those users can
open GPIB devices.

Download the latest version from
http://linux-gpib.sourceforge.net/

Expand the archive and execute the following,

{{{ ./configure --enable-python-binding --with-linux-srcdir=/lib/modules/2.6.24-19/build }}}

where 2.6.24-19 should be replaced by your kernel version.

{{{ make; sudo make install }}} should install the driver.

===== Installing firmwares =====
Download the proprietary firmwares from http://linux-gpib.sourceforge.net/firmware/

Expand the archive and copy {{{agilent_82357a/*.hex}}} to {{{/usr/share/usb/agilent_82357a/}}}.
If the target directory does not exist, make it.

===== Configuration file and scripts =====

Put the following file in {{{/etc/}}}.
attachment:gpib.conf

Add the following lines to your {{{/etc/modprobe.conf}}}

{{{
alias char-major-160 gpib_common
alias char-major-160-0 agilent_82357a
alias gpib0 agilent_82357a
}}}

Put the following files into somewhere in your PATH.

attachment:initGPIB
attachment:getgpibdata.py

Be sure to set the permission of those files to executable.

=== Usage ===
When you connect the GPIB-USB interface to your USB port,


== Alternative way (GPIB scripting in Python) ==

GPIB issues

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.

GPIB hardware we have

Using Agilent 82357B USB-GPIB interface from Linux

82357B can be used from Linux using the linux-gpib driver. This section will explain how to install the driver and use it from python and other languages.

Installation

What you need

Linux kernel source (2.6.8 or above) python, python-dev fxload (from linux-hotplug project) lsusb (usbutils package)

Depending on your distribution, you may have to mount usbfs to /proc/bus/usb. (In Fedora, it is automatically mounted). If needed, you may want to add the following line to /etc/fstab

usbfs   /proc/bus/usb   usbfs   defaults        0       0 

Installing linux-gpib driver

Before installing linux-gpib driver, create a group gpib, by sudo vigr.

You want to add some users (e.g. controls) to gpib group so that those users can open GPIB devices.

Download the latest version from http://linux-gpib.sourceforge.net/

Expand the archive and execute the following,

 ./configure --enable-python-binding --with-linux-srcdir=/lib/modules/2.6.24-19/build 

where 2.6.24-19 should be replaced by your kernel version.

 make; sudo make install  should install the driver.

Installing firmwares

Download the proprietary firmwares from http://linux-gpib.sourceforge.net/firmware/

Expand the archive and copy agilent_82357a/*.hex to /usr/share/usb/agilent_82357a/. If the target directory does not exist, make it.

Configuration file and scripts

Put the following file in /etc/. attachment:gpib.conf

Add the following lines to your /etc/modprobe.conf

alias char-major-160 gpib_common
alias char-major-160-0  agilent_82357a
alias gpib0 agilent_82357a

Put the following files into somewhere in your PATH.

attachment:initGPIB attachment:getgpibdata.py

Be sure to set the permission of those files to executable.

Usage

When you connect the GPIB-USB interface to your USB port,

Alternative way (GPIB scripting in Python)

Software needed:

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