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  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Multiple device support for a record type
From: Michael Davidsaver <[email protected]>
To: [email protected]
Date: Thu, 11 Aug 2016 07:32:33 -0400
The short answer is to use the INP or OUT link field to hold address
information.  This can be parsed/processed in the init_record device
support function.  A simple place to start for a VME device is to put a
base address here.

> record(ai, "rec:a") {
>    field(DTYPE, "HW Channel")
>    field(INP  , "@0x20001000")
> ...
> record(ai, "rec:b") {
>    field(DTYPE, "HW Channel")
>    field(INP  , "@0x20002000")

The format of the INP/OUT fields depends on the HW link type.  The
example I give is INST_IO.  Your example 'device()' lines use VME_IO.
You'll run into some problems here if your device using anything wider
than A16.  You should not feel bound to use VME_IO just because it has
VME in its name.

For a longer discussion.

http://mdavidsaver.github.io/epics-doc/epics-ioc.html


On 08/11/2016 06:39 AM, Stefen Paul wrote:
> Hi All,
> 
> I've built device support for ai record for a vme based ADC board.
> 
> I've used the following to add the support:
> 
> device(ai,VME_IO, devAiADCtype1, "HW Channel");
> 
> where devAiADCtype1 is the structure in the device support routine.
> 
> The things are working fine. When I insert an ai record, I get a DTYP as
> 'HW Channel' , I pass on the relevant VME_IO address ant the board gets
> read.
> 
> Now I want to build device support for ai record to support one more
> type of vme based ADC board to be used in the same system.
> 
> How do I do it ? Should I write something like : 
> 
> device(ai,VME_IO, devAiADCtype2, "HW Channel 2");
> 
> or is there another method of doing so ?
> 
> I mean how make multiple device support for a given record type ?
> 
> Please suggest,
> 
> Thanks,
> Stefen
> 
> 


References:
Multiple device support for a record type Stefen Paul

Navigate by Date:
Prev: Multiple device support for a record type Stefen Paul
Next: Re: Multiple device support for a record type Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Multiple device support for a record type Stefen Paul
Next: Re: Multiple device support for a record type Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 11 Aug 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·