GPIB Support
Message Passing Facility

Release 1-5

Marty Kraimer
August 2003

License Agreement

mpfGpib is available via the open source license described at the end of this document

Requires

Acknowledgements

This support was derived from the GPIB support Jim Kowalkowski implemented for Hideos.
Tom Coleman wrote the first version for MPF.
Ron Sluiter helped improve the robustness of the implementation.

Introduction

Gpib support consists of the following: The Gpib support is complete in the sense that most users will not have to extend it. It is compatible with the Gpib support provided with epics base.

Restriction: Only one of GpibHideosLocal or GpibHideosRemote can be used on a particular processor. Removing this restriction requires changes to the version of drvGpib supplied with base.

GpibHideosXXX

These two source modules were written to be compatible with the Hideos support for the version of devGpib that appears in epics base releases 3.13.xxx and earlier. Hopefully drvGpib will be changed some day to allow interface specific gpib support  to register itself with the driver. When this day comes GpibHideosXXX should be replaced.

The gpib support for mpf was written to be completely compatible with devGpibCommon and drvGpib.

Using the support in applications

In <top>/config edit the file RELEASE

Add the line

MPF_GPIB=<full path name>
In pre 3.13.1 versions of makeBaseApp it is also necessary to edit the file CONFIG_APP. Add the lines
ifdef MPF_GPIB
MPF_GPIB_BIN = $(MPF_GPIB)/bin/$(T_A)
endif
In your source directory edit Makefile.Vx:
LIBOBJS += $(MPF_GPIB_BIN)/GpibHideosRemote.o

LIBOBJS += $(MPF_BIN)/mpfLib
For local mode the st.cmd file must have the following command.
...
initIpacCarrier("carrierName", 0)
initGpibGsTi9914("moduleName","carrierName","carrierSite",intVec)
HiDEOSGpibLinkConfig(link,0,"moduleName")
For remote mode
Server
...
initIpacCarrier("carrierName", 0)
initGpibGsTi9914("moduleName","carrierName","carrierSite",intVec)
initGpibServer("serverName","moduleName",bufsize,queuesize)
Client
HiDEOSGpibLinkConfig(link,0,"serverName")
Parameter Value
moduleName The IP module name.  It is used to link the initGpibGsTi9914 and HiDEOSGpibLinkConfig commands. 
carrierName The name of the IP carrier. It links the initGpibGsTi9914 command with an initIpacCarrier commmand. See MPF documentation for details about initIpacCarrier.
carrierSite The carrier site. Normally IP_a or IP_b or IP_c or IP_d
intVec The vme interrupt vector to use. NOTE: intVec must be odd. If an even number is specified an error message is generated and intVec is increased by 1.
link This is the link number as specified in the INP or OUT fields of records attached to this gpib interface
serverName The name that connects the client to the correct server
bufsize The read buffer size
queuesize The maximum number of requests to queue

gpibSniff("moduleName",seconds)

This vxWorks shell command shows every character transmitted and received by the specified module for the number of seconds specified. For example:
 
gpibSniff("a-ip488",3) 
value = 0 = 0x0
iochp3458> 
R
T_?V
R-8.874270409E-01 0x0d 0x0a
T_?_?V
R-9.341735006E-01 0x0d 0x0a
T_?_?V
R-9.575970835E-01 0x0d 0x0a
T_?_?V
R-1.004537279E+00 0x0d 0x0a
T_?_?V
R-1.027972941E+00 0x0d 0x0a
T_?_?V
R-1.051432207E+00 0x0d 0x0a
T_?
gpibSniff done

License Agreement

Copyright (c) 2002 University of Chicago. All rights reserved.

mpfGpib is distributed subject to the following license conditions:

 SOFTWARE LICENSE AGREEMENT
 Software: mpfGpib

 1. The "Software", below, refers to mpfGpib (in either source code, or
    binary form and accompanying documentation). Each licensee is
    addressed as "you" or "Licensee."

 2. The copyright holders shown above and their third-party licensors
    hereby grant Licensee a royalty-free nonexclusive license, subject to
    the limitations stated herein and U.S. Government license rights.

 3. You may modify and make a copy or copies of the Software for use
    within your organization, if you meet the following conditions:
      a. Copies in source code must include the copyright notice and this
         Software License Agreement.
      b. Copies in binary form must include the copyright notice and this
         Software License Agreement in the documentation and/or other
         materials provided with the copy.

 4. You may modify a copy or copies of the Software or any portion of it,
    thus forming a work based on the Software, and distribute copies of
    such work outside your organization, if you meet all of the following
    conditions:
      a. Copies in source code must include the copyright notice and this
         Software License Agreement;
      b. Copies in binary form must include the copyright notice and this
         Software License Agreement in the documentation and/or other
         materials provided with the copy;
      c. Modified copies and works based on the Software must carry
         prominent notices stating that you changed specified portions of
         the Software.

 5. Portions of the Software resulted from work developed under a U.S.
    Government contract and are subject to the following license: the
    Government is granted for itself and others acting on its behalf a
    paid-up, nonexclusive, irrevocable worldwide license in this computer
    software to reproduce, prepare derivative works, and perform publicly
    and display publicly.

 6. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY
    OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY LICENSORS, THE
    UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR
    EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
    BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
    FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME
    ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS,
    OR USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE
    SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT
    THAT THE SOFTWARE WILL FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE
    OR THAT ANY ERRORS WILL BE CORRECTED.

 7. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR
    THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT
    OF ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
    CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE,
    INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY
    REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF
    CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR
    OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
    POSSIBILITY OF SUCH LOSS OR DAMAGES.