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 <2019> 2020 2021 2022 2023 2024 2025 | 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 <2019> 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: database or new record for blocking setpoint/readback process control |
From: | "Lang, Keenan C. via Tech-talk" <[email protected]> |
To: | "Pearson, Matthew R." <[email protected]>, "[email protected] Talk" <[email protected]> |
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: [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 |