EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: GPIB secondary address
From: Eric Norum <[email protected]>
To: "Nicholas P. DiMonte" <[email protected]>
Cc: TechTalk EPICS <[email protected]>
Date: Thu, 22 Apr 2010 07:01:33 -0700
Yes, the ASYN version of devGpib supports secondary addressing.  Here's the salient portion of the documentation (devGpib.html):

===================================================================
An EPICS record is connected to GPIB by the fields DTYP and INP or OUT.

The DTYP field has the format:

    field(DTYP,"<device support name>")
where

<device support name> - Is the name from a device database definition, i.e. a definition of the form:

    device(<record type>,GPIB_IO,<dsetName>,"<device support name>")
The INP or OUT field has the format:

    field(INP,"#L<link> A<addr> @<number>")
    or
    field(OUT,"#L<link> A<addr> @<number>")

where

<link>
Link number. Low level drivers use portName to provide access to a specific communication interface. In order to keep compatibility with link numbers, the portName MUST be Lxxx where xxx is the value that appears in the #Lxxx portion of the INP or OUT fields of record instances.
<addr>
GPIB address of your device, which can be a primary address or an extended address. A primary address has a value <=30. An extended address is of the form PSS, where P represents the primary address and SS is the secondary address. It is not possible to express an extended address if the primary address is 0. Some examples are:
A9    primary address 9
A900  extended address: primary address is 9, secondary address is 0
A906  extended address: primary address is 9, secondary address is 6. 

<number>
An integer that identifies a gpibCmd definition in a GPIB device support module. If the implementer is nice, documentation like the following is provided:
   recordType  @<number>   Description
If such documentation is not available, look at the device support itself for statements like:
  /* Param 12 */
  {&DSET_LI, GPIBREAD, IB_Q_LOW, "*ESR?",  "%ld", 0, 20, 0, 0, 0, 0, 0, 0},

The above states that @12 is a GPIB read command via a longin record. Thus the record definition would be:
    record(longin,"<name>") {
        field(DTYP,"<device support name>")
        ...
        field(OUT,"#L<link> A<addr> @12")
        ...
    }
=======================================================================================
The only drawback of this trick is that you can't have a secondary address if the primary address is 0.


On Apr 22, 2010, at 5:26 AM, Nicholas P. DiMonte wrote:

> Hi,
> 
> How do you address the secondary addresses in a GPIB device using either R3.13 GPIB support or asynGpib support in R3.14?
> Do I need to use a convert routine and if so, how?
> 
> Thanks, 
> Nick 
> -- 
> Nicholas P. DiMonte 
> Advanced Photon Source, 
> AES Controls Group
> Argonne National Laboratory
> (630) 252-8856   [email protected]
> www.aps.anl.gov 
> 
> 

-- 
Eric Norum
[email protected]






References:
GPIB secondary address Nicholas P. DiMonte

Navigate by Date:
Prev: Re: GPIB secondary address Benjamin Franksen
Next: Striptool crashes for Fedora 11 64 bit version... Ramu Denduluri
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: GPIB secondary address Benjamin Franksen
Next: Striptool crashes for Fedora 11 64 bit version... Ramu Denduluri
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·