# Linux-GPIB 4.3.7 Documentation

### Frank Mori Hess

fmhess@users.sourceforge.net

### Dave Penkler

dpenkler@gmail.com

Copyright © 2003-2006, 2008 Frank Mori Hess

Table of Contents
1. Copying
2. Introduction
3. Configuration
  gpib.conf -- GPIB library configuration file
  gpib_config -- GPIB administration program
4. Supported Hardware
  4.1. Supported Hardware Matrix
  4.2. Board-Specific Notes
    4.2.1. Agilent (HP) 82341
    4.2.2. Agilent 82350A/B and 82351A
    4.2.3. Agilent 82357A/B
    4.2.4. Beiming F/S82357
    4.2.5. fmh_gpib_core
    4.2.6. Self-made usb-gpib adapter
    4.2.7. GPIO bitbang adapter
    4.2.8. xyphro compact usb to GPIB adapter
    4.2.9. National Instruments GPIB-USB-B
    4.2.10. National Instruments GPIB-USB-HS and GPIP-USB-HS+
5. GPIB utility programme
  ibterm -- Interactive GPIB terminal
6. Linux-GPIB Reference
  6.1. Global Variables
    ibcnt -- hold number of bytes transferred, or errno
    iberr -- holds error code
    ibsta -- holds status
7. Traditional API Functions
  ibask -- query configuration (board or device)
  ibbna -- change access board (device)
  ibcac -- assert ATN (board)
  ibclr -- clear device (device)
  ibcmd -- write command bytes (board)
  ibcmda -- write command bytes asynchronously (board)
  ibconfig -- change configuration (board or device)
  ibdev -- open a device (device)
  ibeos -- set end-of-string mode (board or device)
  ibeot -- assert EOI with last data byte (board or device)
  ibevent -- get events from event queue (board)
  ibfind -- open a board or device (board or device)
  ibgts -- release ATN (board)
  ibist -- set individual status bit (board)
  iblines -- monitor bus lines (board)
  ibln -- check if listener is present (board or device)
  ibloc -- go to local mode (board or device)
  ibonl -- close or reinitialize descriptor (board or device)
  ibpad -- set primary GPIB address (board or device)
  ibpct -- pass control (board)
  ibppc -- parallel poll configure (board or device)
  ibrd -- read data bytes (board or device)
  ibrda -- read data bytes asynchronously (board or device)
  ibrdf -- read data bytes to file (board or device)
  ibrpp -- perform a parallel poll (board or device)
  ibrsc -- request system control (board)
  ibrsp -- read status byte / serial poll (device)
  ibrsv -- request service (board)
  ibrsv2 -- request service (board)
  ibsad -- set secondary GPIB address (board or device)
  ibsic -- perform interface clear (board)
  ibspb -- obtain length of serial poll bytes queue (device)
  ibsre -- set remote enable (board)
  ibstop -- abort asynchronous i/o operation (board or device)
  ibtmo -- adjust io timeout (board or device)
  ibtrg -- trigger device (device)
  ibvers -- Obtain the current linux gpib version.
  ibwait -- wait for event (board or device)
  ibwrt -- write data bytes (board or device)
  ibwrta -- write data bytes asynchronously (board or device)
  ibwrtf -- write data bytes from file (board or device)
8. "Multidevice" API Functions
  AllSPoll -- serial poll multiple devices
  DevClear -- clear a device
  DevClearList -- clear multiple devices
  EnableLocal -- put devices into local mode.
  EnableRemote -- put devices into remote mode.
  FindLstn -- find devices
  FindRQS -- find device requesting service and read its status byte
  PassControl -- make device controller-in-charge
  PPoll -- parallel poll devices
  PPollConfig -- configure a device's parallel poll response
  PPollUnconfig -- disable devices' parallel poll response
  RcvRespMsg -- read data
  ReadStatusByte -- serial poll a device
  Receive -- perform receive addressing and read data
  ReceiveSetup -- perform receive addressing
  ResetSys -- reset system
  Send -- perform send addressing and write data
  SendCmds -- write command bytes onto bus
  SendDataBytes -- write data
  SendIFC -- perform interface clear
  SendList -- write data to multiple devices
  SendLLO -- put devices into local lockout mode
  SendSetup -- perform send addressing
  SetRWLS -- put devices into remote with lockout state
  TestSRQ -- query state of SRQ bus line
  TestSys -- perform self-test queries on devices
  Trigger -- trigger a device
  TriggerList -- trigger multiple devices
  WaitSRQ -- sleep until the SRQ bus line is asserted
9. Utility Functions
  AsyncIbcnt -- ibcnt, ibcntl values for last asynchronous I/O operation
  AsyncIberr -- iberr value for last asynchronous I/O operation
  AsyncIbsta -- ibsta value for last asynchronous I/O operation
  CFGn -- generate 'configure n meters' command byte
  GetPAD -- extract primary address from an Addr4882_t value
  GetSAD -- extract secondary address from an Addr4882_t value
  MakeAddr -- pack primary and secondary address into an Addr4882_t value
  MLA -- generate 'my listen address' command byte
  MSA -- generate 'my secondary address' command byte
  MTA -- generate 'my talk address' command byte
  PPE_byte -- generate 'parallel poll enable' command byte
  ThreadIbcnt -- thread-specific ibcnt, ibcntl values
  ThreadIberr -- thread-specific iberr value
  ThreadIbsta -- thread-specific ibsta value
10. GPIB protocol
  10.1. GPIB command bytes
  10.2. GPIB bus lines
A. GNU Free Documentation License
  A.1. PREAMBLE
  A.2. APPLICABILITY AND DEFINITIONS
  A.3. VERBATIM COPYING
  A.4. COPYING IN QUANTITY
  A.5. MODIFICATIONS
  A.6. COMBINING DOCUMENTS
  A.7. COLLECTIONS OF DOCUMENTS
  A.8. AGGREGATION WITH INDEPENDENT WORKS
  A.9. TRANSLATION
  A.10. TERMINATION
  A.11. FUTURE REVISIONS OF THIS LICENSE
  A.12. ADDENDUM: How to use this License for your documents

# 1. Copying

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Alternatively, you may redistribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

|  | Next
|  | Introduction