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  2021  2022  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: [External] RE: using macros in Action, Execute Command
From: Paul Sichta via Tech-talk <tech-talk at aps.anl.gov>
To: "Zhang, Tong" <ZhangT at frib.msu.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 20 Mar 2023 11:09:08 -0400
Hello Tong,
You are correct and Kay also indicated this was fixed February 2, 2023.  I was using an old tagged version 4.6.6.
The current master works as-expected!

Thanks, all.
-ps


On Mon, Mar 20, 2023 at 10:12 AM Zhang, Tong <ZhangT at frib.msu.edu> wrote:

I also came across the similar issue but I was trying to access the widget property, e.g. $(name) through an argument of a command. And I believe this PR resolved it https://github.com/ControlSystemStudio/phoebus/pull/2532

 

If it does not support env, either report a new issue, or try to use a dummy property of a widget to host the env, and use it in a command, for multiple envs, you can also parse the string in your command into multiple variables.

 

Thanks,

Tong

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Paul Sichta via Tech-talk
Sent: Friday, March 17, 2023 17:19
To: tech-talk at aps.anl.gov
Subject: using macros in Action, Execute Command

 

[EXTERNAL] This email originated from outside of FRIB

Using phoebus, I used an action button and added an Execute Command.  My macro will not work when used in the Command line.  The macro will work in action type WritePV,  or as a PVname for an object on the display.

 

Example: I add to my environment before starting phoebus,  export myLS=ls

In the action command line I use       $(myLS)  

 

When I run the action I get an error

Cannot run program "$myLS" (in directory  blah...); error=2, No such file or directory

 

If I simply use    ls    in the command it works fine.

The help, about,  inspect environmental variables it shows:  myLS = ls

 

Is there a way to use macros from the user's environment on these Execute Commands?

In particular, I want to use a macro to be a directory path on my system

 

Regards,

-ps


References:
using macros in Action, Execute Command Paul Sichta via Tech-talk
RE: using macros in Action, Execute Command Zhang, Tong via Tech-talk

Navigate by Date:
Prev: Re: Output records in StreamDevice Zimoch Dirk via Tech-talk
Next: RE: [External] Re: Output records in StreamDevice Leblanc, Gregory 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  2021  2022  <20232024 
Navigate by Thread:
Prev: RE: using macros in Action, Execute Command Zhang, Tong via Tech-talk
Next: Phoebus: using macros in Action, Execute Command Paul Sichta 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  2021  2022  <20232024 
ANJ, 20 Mar 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·