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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Generating a 'binary output pulse' by processing an ao record? [SEC=UNCLASSIFIED] |
From: | "LYNCH, Damien" <[email protected]> |
To: | Nicklas <[email protected]>, "[email protected]" <[email protected]> |
Date: | Thu, 19 Jun 2014 00:06:28 +0000 |
Hi Niklas, It looks like when you have a constant in YY’s DOL it is only retrieved when the record initialises. Have a look at init_record() and process() in src/rec/boRecord.c.
So after the first time YY processes it’s VAL will remain at 0. One solution is the following. Another might be to set the DOL of YY to a record whose value is always one and FLNK XX to YY. If you only want YY to go high if XX is non-zero you could make ZZ
a calc record. record(ao, "XX") { field(FLNK, "ZZ") } record(bo, "ZZ") { field(DOL, "1") field(OMSL, "closed_loop") field(OUT, "YY PP") } record(bo, "YY") { field(HIGH, "0.5") field(ZNAM, "Off") field(ONAM, "On") } Thanks, Damien From: [email protected] [mailto:[email protected]]
On Behalf Of Nicklas Dear all, I am new to epics so I would really appreciate some help. record (ao, "XX") { ... field(FLNK, "YY") } record (bo, "YY") { ... field (DOL, "1") field (OMSL, "closed_loop") field (HIGH, "0.5") } This works fine the first time "XX" is processed (using dbpf), but the next time "XX" is processed (using dbpf), it doesn't work. Any tips/thoughts on this would be highly appreciated. Best regards, Nicklas Bjärnhall Prytz, Engineering Physics Student at FREIA Uppsala University Sweden |