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  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 
<== Date ==> <== Thread ==>

Subject: Re: database or new record for blocking setpoint/readback process control
From: "Lang, Keenan C. via Tech-talk" <tech-talk@aps.anl.gov>
To: "Pearson, Matthew R." <pearsonmr@ornl.gov>, "tech-talk@aps.anl.gov Talk" <Tech-talk@aps.anl.gov>
Date: Thu, 25 Apr 2019 20:24:53 +0000

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: tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> on behalf of Pearson, Matthew R. via Tech-talk <tech-talk@aps.anl.gov>
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








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

Navigate by Date:
Prev: Re: A call to 'assert(dbLockIsInitialized)' by thread '_main_' Michael Davidsaver via Tech-talk
Next: RE: A call to 'assert(dbLockIsInitialized)' by thread '_main_' [SOLVED] 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 
Navigate by Thread:
Prev: database or new record for blocking setpoint/readback process control Pearson, Matthew R. via Tech-talk
Next: Re: database or new record for blocking setpoint/readback process control Pearson, Matthew R. 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 
ANJ, 25 Apr 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·