Outline
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- ARGUMENTS
- SCRIPT LAYOUT
- SEE ALSO
- KNOWN BUGS
- AUTHOR
- COPYRIGHT AND LICENSE
- Source Code
NAME
gpib-e100.plx - reads devices on the GPIB-ENET/100
SYNOPSIS
gpib-e100.plx [-v|-
vb|--
verbose "int"][--
quiet][-
q][--
list][--
gpib_cmd][--
interactive][--
command "GPIB command"] gpib#:instrument#
gpib-e100.plx 1:16 Connects to gpib box 1, gpib instrument 16.
gpib-e100.plx 192.168.1.55:24 Connects to gpib box 0, gpib instrument 24
gpib-e100.plx 0:12 -command "DATA?" Connects to gpib box 0, instrument 12, sends the command
DATA? and waits for response
Also supports meta-options: --
help, --
usage, --
man, --
version.
DESCRIPTION
This program sends the commands to gpib devices via ethernet and waits for the response.
OPTIONS
Options are parsed using Getopt::Long with no modifications.
- -v,-vb,--verbose "int"
Allows for incrementing verbosity, or assigning it an integer. Diffrent
verbosities print out every more increasing amounts of information.
- --list
Prints out a list of known gpib devices, recomended variable names, units, and lables, and the date when that list was last updated.
- --gpib_cmd
Prints out a short list of gpib commands and what they do.
- --interactive
After connecting to the specified gpib instrument, enters an interactive mode where the user is prompted for the specific gpib commands to enter.
- --command "gpibcommand"
Connects, and then sends the single specified command to the gpib device. (the default does this with the 'MEAS?' command).
- --help, --usage, --man, --version
Get various amounts of meta-command data. (the first three print out ever increasing amounts of this pod document, the last uses rlog to get the rcs data).
ARGUMENTS
Requires a single argument in the form of #:#. The first argument can be the gpib hostname (DNS single number or IP address are all good). The second argument is the instrument number.
SCRIPT LAYOUT
This was created by looking at the packets another program was sending. Hence the various hex codeds. The first part deals with the command line.
After the command line we open up a socket to ping the gpib box. If successful, we get a response back with the name of the box.
It then follows the order of packest that the other program used.
SEE ALSO
For a program that logs information in .cdf format, please look into
reader.plx. Also look at the labview program
keithley_scpi_write_read.vi which does something incredibly similar to this program, but uses labview (and a gui interface) to do it.
KNOWN BUGS
For some reason it doesn't deal well with the 'READ?' commmand. Also it may return a newline at the end of the string it outputs to STDOUT. See
reader.plx for dealing with this. Interactive mode does not support the *nix up arrow key.
AUTHOR
MegaSIMS group, UCLA <
megasims@ess.ucla.edu>.
Miles McCammon, <
miles86@ucla.edu>.
COPYRIGHT AND LICENSE
gpib-e100.plx - read devices attached to a GPIB-ENET/100
Copyright © 2006 MegaSIMS, University of California Regents
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation version 2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To receive a copy of the GNU General Public License, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Source Code
Source code for this version (10/24/08, 12:45) can be downloaded
here.