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: how NOT to update the record |
From: | Ralph Lange <[email protected]> |
To: | Tasaddaq Khan <[email protected]> |
Cc: | EPICS Tech-Talk <[email protected]> |
Date: | Wed, 15 Jul 2015 10:50:58 +0200 |
Hi Tasaddaq, I am not sure I understand correctly what you want to achieve. From your last mail, I assume that your record "b" should act as a gate. Whenever "b" gets 1, you want the counter record "time" to start counting from 0, and the counter record "result" to continue counting from where it was left. While "b" is 0, the counter record "time"should be reset to 0, the counter record "result" should keep its value. This can be done using the following database (many other solutions possible): record (bi, "b") { } record (calcout, "time") { field(SCAN, "1 second") field(INPB, "b") field(INPC, "1") field(CALC, "B?VAL+C:0") } record(calcout, "result") { field(SCAN, "1 second") field(INPB, "b") field(INPC, "1") field(CALC, "B?VAL+C:VAL") } Cheers, ~Ralph On 12/07/2015 21:24, Tasaddaq Khan
wrote:
|