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: EPICS database macro warning |
From: | Wang Xiaoqiang <[email protected]> |
To: | Amien Crombie <[email protected]>, EPICS Tech-Talk <[email protected]> |
Date: | Wed, 31 Jan 2018 14:47:09 +0100 |
Hi,I actually use this 'bug' to selectively mask out certain parts of the database.
In the following example, if HS='#', the sequence selects "jog to limit". Otherwise, it "jog to home switch". Without this trick, I would need to create another record for this selection.
record(sseq, "INITSEQ") { ... field (DOL2, "1") field (WAIT2,"Wait") field (LNK2, "TOLIMIT.PROC CA") # Jog to limit $(HS) field (LNK2, "TOHS.PROC CA") # Jog to home switch .... } If the 'bug' is useful, it probably becomes a feature. Best Xiaoqiang On 01/31/2018 10:28 AM, Amien Crombie wrote:
Hi I inadvertently stumbled upon this strange 'bug' in my ioc.db file I had the following record: record(subArray, "$(uid):attenuator") { field(INP, "$(uid):raw") field(NELM, "9") field(MALM, "9") field(INDX, "9") field(FTVL, "LONG") # field(FLNK, "$(dd):getX") }Now the field '*FLNK*' is commented out and I have deleted my macro $(dd) in my substitution file.When I run my IOC, I get the following warning /macLib: macro dd is undefined (expanding string # field(FLNK, "$(dd)")/ /Warning: 'db/dbExample1.db' line 16 has undefined macros/So the comment (#) still evaluates the macro, even if the documentation says it ignores the whole line. Of course if the macro exist it runs without the warning.Not a critical issue but can be misleading. Thanks Amien