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  2016  2017  2018  <20192020  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  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: database or new record for blocking setpoint/readback process control
From: "Pearson, Matthew R. via Tech-talk" <[email protected]>
To: "Lang, Keenan C." <[email protected]>
Cc: "[email protected] Talk" <[email protected]>
Date: Thu, 25 Apr 2019 21:24:58 +0000
Thanks. I’ll look into this, and also using a subroutine record. It should be fairly easy to implement the tolerances and timeouts in one of these methods.

Cheers,
Matt


> On Apr 25, 2019, at 4:24 PM, Lang, Keenan C. <[email protected]> wrote:
> 
> For these semi-complex situations where you don't want to develop an entirely new program or record type, but where using the basic record types might end up in a large unwieldy mess, the lua module (https://github.com/epics-modules/lua) provides a record type (luascript) with scriptable behavior. It works like the calcout record but with a CODE field (rather than a CALC field) that can reference a function in an external script. State is stored between record processing so you can keep track of inputs over a span of time.
> 
> Might be useful to you.
> 
> 
> Keenan Lang
> 
> 
> From: [email protected] <[email protected]> on behalf of Pearson, Matthew R. via Tech-talk <[email protected]>
> Sent: Thursday, April 25, 2019 2:02:54 PM
> To: Tech-talk
> Subject: database or new record for blocking setpoint/readback process control
>  
> 
> Hi,
> 
> This is a question about analog process control systems like temperature or pressure control, and implementing a blocking setpoint command in a database. Our basic requirement is something like:
> 
> Set temperature to X and wait for readback Y to be equal to X (+/- some tolerance)
> 
> For years we’ve been implementing this in a database template, making use of the busy record (to satisfy put_callback) and calcout records. The calcout records clear the busy record when the process is finished. So our high level software, either scanning software or other database level sequencing software, only needs to do a caput with callback to set something and wait until it gets there. 
> 
> It only takes a few database records to implement that kind of logic.
> 
> However, now we have a few more requirements in order to be a bit smarter about waiting for the process to finish:
> 
> 1) The readback needs to be stable (+/- tolerance) for N seconds (to take into account overshoot and undershoot).
> 
> 2) Need to have a varying timeout (for the callback completion):
>    a) Timeout calculated based on a ramp rate (+ add some buffer time to be safe)
>    b) Timeout manually set
> 
> 3) Status feedback (changing / idle / error)
> 
> 
> Those are the minimum requirements, but I can think of others, like software controlled ramps (with configurable delays between changes in setpoint).
> 
> I can implement the above in a larger more complex database template, but I’m wondering if others have done similar things and at what point do you decide it’s too complex for a database and it needs to be done in C, either a new custom ‘setpoint’ record or SNL program. 
> 
> Cheers,
> Matt
> 
> 
> Data Acquisition and Controls Engineer
> Spallation Neutron Source
> Oak Ridge National Lab


References:
database or new record for blocking setpoint/readback process control Pearson, Matthew R. via Tech-talk
Re: database or new record for blocking setpoint/readback process control Lang, Keenan C. via Tech-talk

Navigate by Date:
Prev: RE: A call to 'assert(dbLockIsInitialized)' by thread '_main_' [SOLVED] Iain Marcuson via Tech-talk
Next: RE: [SNL] possibility to cut the argument string. Laznovsky Michael (PSI) via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: database or new record for blocking setpoint/readback process control Lang, Keenan C. via Tech-talk
Next: A call to 'assert(dbLockIsInitialized)' by thread '_main_' Iain Marcuson via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 26 Apr 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·