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  <20152016  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  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: areaDetector driver with array parameters
From: "Pearson, Matthew R." <[email protected]>
To: Phil Atkin <[email protected]>
Cc: "[email protected] list" <[email protected]>
Date: Thu, 17 Dec 2015 18:03:53 +0000
Hi Phil,

The list of parameters in the source files is defined by hand, but then we auto generate the associated Epics database template files so that there’s only thing to edit when we change things. The PV table files are also generated to cover all the parameters, although you could generate subsets I guess. 

I couldn’t find any web based documentation for PV table, although there is a YouTube video!
https://www.youtube.com/watch?v=R-eeaDsYTUA

The file format is fairly self explanatory:

<?xml version="1.0"?>
<pvtable version="3.0">
    <pvlist>
        <pv>
           <selected>true</selected>
            <name>BL4B:Det:N1:Det3:TOFTransScale</name>
            <tolerance>0.0</tolerance>
            <saved_value>1.0</saved_value>
        </pv>
    </pvlist>
</pvtable>

The ‘selected’ parameter includes or excludes that PV from the list that is ‘set’ or ‘read’ when you do a global set or read from the PV Table interface in CSS.

The ‘tolerance’ parameter provides a way for PV Table to know if the current value of a PV is different from the value currently in the file, and it highlights it for you. The highlight feature is extremely useful for us. We use it to quickly find out if any PV is different from what it should be. Then we have the option of either updating the file with the current value, or setting it back to the saved value.

Cheers,
Matt


> On Dec 17, 2015, at 11:37 AM, Phil Atkin <[email protected]> wrote:
> 
> Thanks Matt - that looks very promising.
> 
> As I understand it, each of your parameters is defined independently as a scalar value, but you avoid the drudgery by using a tool to automate the production of all the associated definitions.  Then, a PVTable file defines a subset (?) of the values that can be displayed, edited, loaded and saved as a group.  Is that correct?  (I'm afraid I can't find any documentation of the PVTable concept - Google insists on assuming that I really want to know about Excel pivot tables).  I'm guessing that I could also have an IOC with an exhaustive set of possible parameters, and produce a PVTable file that defined only a subset of them that were relevant for a particular detector?
> 
> Cheers,
> 
> Phil
> 
> On 17/12/2015 15:53, Pearson, Matthew R. wrote:
>> Hi Phil,
>> 
>> This may or may not help you, but for dealing with many hundreds of parameters, for one of our projects we use a Python script to generate the database template files from the .cpp files. To help with this we have a standard convention for defining the parameter in the source file, along with a C++ comment on the same line, something like:
>> 
>> createStatusParam("ErrParity",        0x0,  1, 10); // LVDS parity error.            (0=no error,1=error)
>> 
>> (where createStatusParam is a wrapper for one of the asyn port driver parameter library function calls).
>> 
>> I’m not sure our Python script will be useful for other projects, but you get the idea.
>> 
>> We also auto generate CSS PVTable files, which we use for reading and setting the many hundreds of parameters in one go. There’s no support for array (or group) puts though, although there will be in Epics version 4.
>> 
>> Using the CSS PVTable also means you don’t have to develop OPIs for the hundreds of parameters, as the table view is already built into CSS. 
>> 
>> Cheers,
>> Matt
>> 
>> Data Acquisition and Control Engineer
>> Spallation Neutron Source
>> Oak Ridge National Lab
>> 
>> 
>> 
>> 
>>> On Dec 17, 2015, at 10:28 AM, Phil Atkin <[email protected]>
>>>  wrote:
>>> 
>>> Hi folks,
>>> 
>>> My areaDetector driver has a large number of parameters to control the camera, some of which are related entities.  The natural way to arrange this in a non-EPICS context would be to provide a parameter that was an array.
>>> 
>>> Is this possible in an areaDetector context, and if so is there an existing driver that uses this approach?  (I would need to understand how to code the driver, how to create the .template file, and how the values could be adjusted through medm and CSS-BOY).
>>> 
>>> It may be desirable to allow a variable number of elements in the array - but I'm not yet sure whether that will be necessary.
>>> 
>>> Thanks in advance,
>>> 
>>> Phil
>>> 
>>> -- 
>>> <Logo small.png>Pixel Analytics is a limited company registered in England. Company number: 7747526; Registered office: 93A New Road, Haslingfield, Cambridge CB23 1LP
>>> 
> 
> -- 
> <Logo small.png>Pixel Analytics is a limited company registered in England. Company number: 7747526; Registered office: 93A New Road, Haslingfield, Cambridge CB23 1LP



Replies:
Re: areaDetector driver with array parameters Kasemir, Kay
References:
areaDetector driver with array parameters Phil Atkin
Re: areaDetector driver with array parameters Pearson, Matthew R.
Re: areaDetector driver with array parameters Phil Atkin

Navigate by Date:
Prev: RE: areaDetector driver with array parameters Mark Rivers
Next: Re: areaDetector driver with array parameters Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: areaDetector driver with array parameters Phil Atkin
Next: Re: areaDetector driver with array parameters Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·