EPICS Controls 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  2019  2020  <20212022  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Trouble with macro substitutions
From: "Leblanc, Gregory via Tech-talk" <tech-talk at aps.anl.gov>
To: "Johnson, Andrew N." <anj at anl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Tue, 24 Aug 2021 16:54:24 +0000

Thanks, that’s got the macro problem straightened out.  Not sure how any of this was really intended to work, yet. 

    Greg

 

From: Johnson, Andrew N. <anj at anl.gov>
Sent: Monday, August 23, 2021 1:05 PM
To: Johnson, Andrew N. <anj at anl.gov>
Cc: Leblanc, Gregory <leblanc at ohio.edu>; EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Trouble with macro substitutions

 

On Aug 23, 2021, at 11:43 AM, Johnson, Andrew N. via Tech-talk <tech-talk at aps.anl.gov> wrote:

 

Well the obvious explanation is that the empty value intended for your $(s) macro in the substitutions file is being ignored — you have actually found a bug in our msi tool.

 

Actually looking at the code both msi and the dbLoadTemplates() iocsh command ignore an empty pattern value, so I’m not sure that this is actually a bug, it looks to be be how the code was originally intended to work, so the fix would be to use empty quotes for any empty macro values as I suggested before, either single or double quotes should work:



If it were setting $(s) to an empty string the PV name should begin with a colon character ‘:’ in the expanded version but it doesn’t — is that what you want to happen? For a workaround if you want $(s) to be empty you can do that by using an empty pair of double-quotes instead, I have just tried that and it works.

 

- Andrew

 

-- 

Complexity comes for free, simplicity you have to work for.

 


References:
Trouble with macro substitutions Leblanc, Gregory via Tech-talk
Re: Trouble with macro substitutions Johnson, Andrew N. via Tech-talk
Re: Trouble with macro substitutions Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: EPICS support for Keithley 6517A unavailable, does anyone have it? Adam Szwandziak - STFC UKRI via Tech-talk
Next: Re: LIB_LIBS getting ignored Johnson, Andrew N. 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  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: Trouble with macro substitutions Johnson, Andrew N. via Tech-talk
Next: AD Stats with URL camera Profile problem Smith, William 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  2019  2020  <20212022  2023  2024 
ANJ, 24 Aug 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·