EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: histogram record device support
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Mon, 21 Oct 2002 19:06:59 -0500
Graham Waters wrote:

I am trying to add VME_IO support to the histogram record, specifically
the Highland V680 Time-To-digital Converter. However try as a might
and dispite anything I place in my .dbd file eg:
   device(histogram, VME_IO, devHiV680, "V680")
the SVL field in my database is always over-written with "PV_LINK" or
"CA_LINK".

Hmm, interesting. You must be the first person to try writing hardware device support for the histogram record since R3.11.x or even earlier, and it appears to me that nobody else can currently be using anything other than soft support with it. Here's why:


The static database access library used by iocCore maintains an implied connection between the DTYP field of a record and one other link field which must be named either "INP" or "OUT". The setting in the DTYP field determines what the link type is of the related field; all other link fields have their types set to be PV links (or constants).

The histogram record doesn't have either an INP of OUT field, it appears to use the field name "SVL" instead. Therefor it is currently impossible for the link type of that field to be set to anything other than a PV link, which will be converted to either a DB or CA link at runtime.

There are three ways to fix this, in order of increasing preference:

1. Rename the SVL field to INP would seem to be the logical change, but would break all databases that currently set the SVL link. I don't think that would be acceptable to existing sites.

2. Add SVL to the list of fields that dbStaticLib associates with the DTYP field of a record. This would be fairly simple to do (at a first glance I can only find 5 places in dbStaticLib.c that need a one-line addition), but it's a pity to have to add another exception just for one record type (which should really have used the INP name).

3. Change your device support so that it expects a CONSTANT in the SVL field, which used as an index into a table of V680 cards that have been registered with it in the st.cmd file before iocInit(). This approach will get you going without making any changes to Base or existing databases.


Also what field points to the histogram array so I can plot it with DM

It looks like the VAL field should provide access to the array (it is marked SPC_DBADDR, and the cvt_dbaddr() routine looks to be setting the right kind of stuff for this), but I'm not an experienced user of the histogram record so I could be wrong.


- Andrew
--
"Life is what happens while you're busy making other plans." - John Lennon


References:
histogram record device support Graham Waters

Navigate by Date:
Prev: RE: histogram record device support Jeff Hill
Next: RE: histogram record device support Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: histogram record device support Jeff Hill
Next: RE: histogram record device support Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·