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  <20192020  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: [SNL] possibility to cut the argument string.
From: "Johnson, Andrew N. via Tech-talk" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Mon, 15 Apr 2019 16:13:33 +0000
Hi Alexis,

On 4/15/19 10:21 AM, GAGET Alexis via Tech-talk wrote:
I have a SNL sequence with a lot of macro, i find the call in the iocshell really not readable

i.e :

seq myExample “macro1=MyExp:MyDevice-01:Unit, macro2=MyExp:MyDevice-02:Unit, macro3=MyExp:MyDevice-03:Unit, macro4=MyExp:MyDevice-04:Unit….To infinity and beyond”

 

Is there any way to maybe cut the string ?

i.e :

seq myExample “macro1=MyExp:MyDevice-01:Unit”+

“macro1=MyExp:MyDevice-02:Unit”+

“macro2=MyExp:MyDevice-03:Unit”+

“ macro3=MyExp:MyDevice-04:Unit”+

“….To infinity and beyond”

(of course it doesn’t work, I’ve tried different possibility but I haven’t found… maybe it’s obvious

 

I want my sequence as much generic as possible, so substitutions macros offers a good possibility to call differents PVs.


You could use an environment variable for that, like this:
epicsEnvSet exa        "macro1=MyExp:MyDevice-01:Unit"
epicsEnvSet exa "$(exa),macro2=MyExp:MyDevice-02:Unit"
epicsEnvSet exa "$(exa),macro3=MyExp:MyDevice-03:Unit"
epicsEnvSet exa "$(exa),macro4=MyExp:MyDevice-04:Unit"
seq myExample "$(exa), ... To infinity and beyond"

There are many similar ways you could create the argument string using variables; if you could re-use those macros elsewhere, for loading databases say, something like this might be more useful:
epicsEnvSet m1 "macro1=MyExp:MyDevice-01:Unit"
epicsEnvSet m2 "macro2=MyExp:MyDevice-02:Unit"
epicsEnvSet m3 "macro3=MyExp:MyDevice-03:Unit"
epicsEnvSet m4 "macro4=MyExp:MyDevice-04:Unit"
...
seq myExample "$(m1),$(m2),$(m3),$(m4), ... To infinity and beyond"

I'm sure you get the idea.

HTH,

- Andrew
-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

References:
[SNL] possibility to cut the argument string. GAGET Alexis via Tech-talk

Navigate by Date:
Prev: Re: [SNL] possibility to cut the argument string. Mooney, Tim M. via Tech-talk
Next: Stopping IOC boot on failure to load database Paduan Donadio, Marcio 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: [SNL] possibility to cut the argument string. Mooney, Tim M. via Tech-talk
Next: RE: [SNL] possibility to cut the argument string. Laznovsky Michael (PSI) 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  <20192020  2021  2022  2023  2024 
ANJ, 26 Apr 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·